refactor(仪表板、数据大屏): 调整功能菜单顺序

This commit is contained in:
wangjiahao 2024-06-14 14:25:19 +08:00
parent ec31351791
commit 3afdfbf6a2
2 changed files with 8 additions and 12 deletions

View File

@ -52,7 +52,8 @@ const handleCommand = (command: string | number | object) => {
}
const callBack = param => {
if (props.node.leaf && props.node?.weight >= 7) {
menus.value.splice(2, 0, param)
menus.value[0]['divided'] = true
menus.value.splice(0, 0, param)
}
}
const emit = defineEmits(['handleCommand'])

View File

@ -133,6 +133,11 @@ const resourceTypeList = computed(() => {
const menuList = computed(() => {
const list = [
{
label: '复制',
command: 'copy',
svgName: 'dv-copy-dark'
},
{
label: '移动到',
command: 'move',
@ -148,23 +153,13 @@ const menuList = computed(() => {
command: 'delete',
svgName: 'dv-delete',
divided: true
},
{
label: '编辑',
command: 'edit',
svgName: 'dv-edit'
},
{
label: '复制',
command: 'copy',
svgName: 'dv-copy-dark'
}
]
return list
})
const dvId = embeddedStore.dvId || router.currentRoute.value.query.dvId
if (dvId) {
if (dvId && showPosition.value === 'preview') {
selectedNodeKey.value = dvId
returnMounted.value = true
}