更新.gitignore配置,添加ContextMenu组件类型声明,构建发布dist目录
This commit is contained in:
36
src/components/contextMenu.vue
Normal file
36
src/components/contextMenu.vue
Normal file
@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<Teleport to="body" v-if="show">
|
||||
<div class="fixed z-[99999]" :style="menuStyle">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</Teleport>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
//mark import
|
||||
|
||||
//mark data
|
||||
const props = defineProps<{
|
||||
show: boolean,
|
||||
options: any
|
||||
}>()
|
||||
let timer:any = null
|
||||
const menuStyle = computed(() => {
|
||||
return {
|
||||
top: props.options.y + 'px',
|
||||
left: props.options.x + 'px',
|
||||
}
|
||||
})
|
||||
//mark method
|
||||
|
||||
|
||||
//mark 周期、内置函数等
|
||||
onMounted(() => {
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user