优化菜单管理上级菜单选择
This commit is contained in:
parent
742a37aac6
commit
8fc1a47ea2
@ -322,11 +322,11 @@ function getList() {
|
|||||||
/** 查询菜单下拉树结构 */
|
/** 查询菜单下拉树结构 */
|
||||||
function getTreeselect() {
|
function getTreeselect() {
|
||||||
listMenu().then((response) => {
|
listMenu().then((response) => {
|
||||||
menuOptions.value = []
|
menuOptions.value = response.data
|
||||||
const menu = { menuId: 0, menuName: '根菜单', children: [] }
|
// const menu = { menuId: 0, menuName: '根菜单', children: [] }
|
||||||
|
|
||||||
menu.children = response.data
|
// menu.children = response.data
|
||||||
menuOptions.value.push(menu)
|
// menuOptions.value.push(menu)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
@ -337,7 +337,7 @@ function cancel() {
|
|||||||
/** 表单重置 */
|
/** 表单重置 */
|
||||||
function reset() {
|
function reset() {
|
||||||
form.value = {
|
form.value = {
|
||||||
menuId: 0,
|
menuId: undefined,
|
||||||
parentId: 0,
|
parentId: 0,
|
||||||
menuName: undefined,
|
menuName: undefined,
|
||||||
icon: undefined,
|
icon: undefined,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user