优化菜单管理上级菜单选择

This commit is contained in:
不做码农 2022-04-29 15:48:31 +08:00
parent 742a37aac6
commit 8fc1a47ea2

View File

@ -322,11 +322,11 @@ function getList() {
/** 查询菜单下拉树结构 */
function getTreeselect() {
listMenu().then((response) => {
menuOptions.value = []
const menu = { menuId: 0, menuName: '根菜单', children: [] }
menuOptions.value = response.data
// const menu = { menuId: 0, menuName: '', children: [] }
menu.children = response.data
menuOptions.value.push(menu)
// menu.children = response.data
// menuOptions.value.push(menu)
})
}
/** 取消按钮 */
@ -337,7 +337,7 @@ function cancel() {
/** 表单重置 */
function reset() {
form.value = {
menuId: 0,
menuId: undefined,
parentId: 0,
menuName: undefined,
icon: undefined,