Skip to content

新添加的菜单设置首页后,未保存导致首页无权限 #2054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 18 additions & 23 deletions web/src/view/superAdmin/authority/components/menus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,29 @@
:default-checked-keys="menuTreeIds"
:props="menuDefaultProps"
default-expand-all
highlight-current
node-key="ID"
show-checkbox
:filter-node-method="filterNode"
@check="nodeChange"
>
<template #default="{ node, data }">
<span class="custom-tree-node">
<div class="custom-tree-node flex item-center">
<span>{{ node.label }}</span>
<span v-if="node.checked">
<el-button
type="primary"
link
:style="{
color:
row.defaultRouter === data.name ? '#E6A23C' : '#85ce61'
}"
@click.stop="() => setDefault(data)"
>
{{ row.defaultRouter === data.name ? '首页' : '设为首页' }}
</el-button>
<span v-if="row.defaultRouter === data.name" style="color: #E6A23C">首页
</span>
<span v-if="data.menuBtn.length">
<el-button type="primary" link @click.stop="() => OpenBtn(data)">
分配按钮
</el-button>
</span>
</span>
<el-button
v-if="node.checked && row.defaultRouter !== data.name"
type="primary"
link
style="color: #85ce61"
@click.stop="() => setDefault(data)"
>
设为首页
</el-button>
<el-button v-if="data.menuBtn.length" type="primary" link @click.stop="() => OpenBtn(data)">
分配按钮
</el-button>
</div>
</template>
</el-tree>
</el-scrollbar>
Expand Down Expand Up @@ -100,9 +95,6 @@
children: 'children',
label: function (data) {
return data.meta.title
},
disabled: function (data) {
return props.row.defaultRouter === data.name
}
})

Expand Down Expand Up @@ -229,5 +221,8 @@
span + span {
@apply ml-3;
}
button{
@apply ml-3;
}
}
</style>