|
@@ -2,14 +2,16 @@
|
|
<el-form-item label="颜色:">
|
|
<el-form-item label="颜色:">
|
|
<el-color-picker v-model="value" color-format="rgba" show-alpha />
|
|
<el-color-picker v-model="value" color-format="rgba" show-alpha />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <Del @delete="$emit('delete')" />
|
|
</template>
|
|
</template>
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import { ref, watchEffect } from "vue";
|
|
import { ref, watchEffect } from "vue";
|
|
import { BoardShape } from "../board";
|
|
import { BoardShape } from "../board";
|
|
import { ElColorPicker } from "element-plus";
|
|
import { ElColorPicker } from "element-plus";
|
|
|
|
+import Del from "./delete.vue";
|
|
|
|
|
|
const props = defineProps<{ shape: BoardShape }>();
|
|
const props = defineProps<{ shape: BoardShape }>();
|
|
-const emit = defineEmits<{ (e: "blur"): void }>();
|
|
|
|
|
|
+const emit = defineEmits<{ (e: "blur"): void; (e: "delete"): void }>();
|
|
const value = ref<string>(props.shape.data.color || "rgba(0,0,0,1)");
|
|
const value = ref<string>(props.shape.data.color || "rgba(0,0,0,1)");
|
|
|
|
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|