feat: right-click menu supports multiple levels

This commit is contained in:
vben
2020-11-01 17:28:38 +08:00
parent c8021ef325
commit f645680a3b
15 changed files with 138 additions and 52 deletions

View File

@@ -32,6 +32,7 @@ export default defineComponent({
const { icon, prefix } = props;
return `${prefix ? prefix + ':' : ''}${icon}`;
});
const update = async () => {
const el = unref(elRef);
if (el) {
@@ -67,6 +68,7 @@ export default defineComponent({
});
watch(() => props.icon, update, { flush: 'post' });
onMounted(update);
return () => (