@@ -67,31 +67,33 @@ const top = computed(() => {
67
67
>
68
68
<template v-for =" item , index of currentContextMenu .items .value " :key =" index " >
69
69
<div v-if =" item === 'separator'" :key =" index" class =" w-full my1 border-t border-main" />
70
- <div
71
- v-else-if =" item.small"
72
- class =" p-2 w-[40px] h-[40px] inline-block text-center cursor-pointer rounded flex"
73
- :class =" item.disabled ? `op40` : `hover:bg-active`"
74
- :title =" (item.label as string)"
75
- @click =" item.action"
76
- >
77
- <div v-if =" typeof item.icon === 'string'" :class =" item.icon" class =" text-1.2em ma" />
78
- <component :is =" item.icon" v-else />
79
- </div >
80
- <div
81
- v-else
82
- class =" w-full grid grid-cols-[35px_1fr] p-2 pl-0 cursor-pointer rounded"
83
- :class =" item.disabled ? `op40` : `hover:bg-active`"
84
- @click =" item.action"
85
- >
86
- <div class =" mx-auto flex" >
70
+ <template v-else-if =" item .show ?? true " >
71
+ <div
72
+ v-if =" item.small"
73
+ class =" p-2 w-[40px] h-[40px] inline-block text-center cursor-pointer rounded flex"
74
+ :class =" item.disabled ? `op40` : `hover:bg-active`"
75
+ :title =" (item.label as string)"
76
+ @click =" item.action"
77
+ >
87
78
<div v-if =" typeof item.icon === 'string'" :class =" item.icon" class =" text-1.2em ma" />
88
79
<component :is =" item.icon" v-else />
89
80
</div >
90
- <div v-if =" typeof item.label === 'string'" >
91
- {{ item.label }}
81
+ <div
82
+ v-else
83
+ class =" w-full grid grid-cols-[35px_1fr] p-2 pl-0 cursor-pointer rounded"
84
+ :class =" item.disabled ? `op40` : `hover:bg-active`"
85
+ @click =" item.action"
86
+ >
87
+ <div class =" mx-auto flex" >
88
+ <div v-if =" typeof item.icon === 'string'" :class =" item.icon" class =" text-1.2em ma" />
89
+ <component :is =" item.icon" v-else />
90
+ </div >
91
+ <div v-if =" typeof item.label === 'string'" >
92
+ {{ item.label }}
93
+ </div >
94
+ <component :is =" item.label" v-else />
92
95
</div >
93
- <component :is =" item.label" v-else />
94
- </div >
96
+ </template >
95
97
</template >
96
98
<template v-if =" ! isExplicitEnabled " >
97
99
<div class =" w-full my1 border-t border-main" />
0 commit comments