|
@@ -1,28 +1,39 @@
|
|
|
<template>
|
|
|
- <div class="context-menu-tool">
|
|
|
- 右键菜单
|
|
|
- <div>{{data}}</div>
|
|
|
+ <div class="context-menu-tool" :context-menu-tools="true">
|
|
|
+ <div class="del __hover" :context-menu-tools="true" @click="onDel">删除</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import {getCurrentInstance, reactive, ref} from "vue";
|
|
|
+import {getCurrentInstance, reactive} from "vue";
|
|
|
|
|
|
const emits = defineEmits([])
|
|
|
const props = defineProps({
|
|
|
- data: {}
|
|
|
+ data: {},
|
|
|
+ graph: {},
|
|
|
+ onClose: <any>{},
|
|
|
})
|
|
|
const {proxy}: any = getCurrentInstance()
|
|
|
+
|
|
|
const state: any = reactive({
|
|
|
})
|
|
|
+const onDel = () => {
|
|
|
+ console.log(props.data)
|
|
|
+ console.log(props.graph)
|
|
|
+ props.onClose(null, true)
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.context-menu-tool {
|
|
|
+ min-width: 100px;
|
|
|
padding: 10px;
|
|
|
background-color: #ffffff;
|
|
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
border-radius: 10px;
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
|
+ .del {
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|