Merge pull request #10289 from dataease/pr@dev-v2@refactor_menu-sort3

refactor(仪表板、数据大屏): 调整功能菜单顺序
This commit is contained in:
王嘉豪 2024-06-14 14:26:25 +08:00 committed by GitHub
commit 5d14981ca2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 11 deletions

View File

@ -52,7 +52,8 @@ const handleCommand = (command: string | number | object) => {
} }
const callBack = param => { const callBack = param => {
if (props.node.leaf && props.node?.weight >= 7) { 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']) const emit = defineEmits(['handleCommand'])

View File

@ -133,6 +133,11 @@ const resourceTypeList = computed(() => {
const menuList = computed(() => { const menuList = computed(() => {
const list = [ const list = [
{
label: '复制',
command: 'copy',
svgName: 'dv-copy-dark'
},
{ {
label: '移动到', label: '移动到',
command: 'move', command: 'move',
@ -148,16 +153,6 @@ const menuList = computed(() => {
command: 'delete', command: 'delete',
svgName: 'dv-delete', svgName: 'dv-delete',
divided: true divided: true
},
{
label: '编辑',
command: 'edit',
svgName: 'dv-edit'
},
{
label: '复制',
command: 'copy',
svgName: 'dv-copy-dark'
} }
] ]
return list return list