邓洁 : 修改菜单细节

This commit is contained in:
邓洁
2023-12-20 10:51:06 +08:00
parent 1c44044063
commit ba634fa907

View File

@@ -295,15 +295,15 @@ const handleEdit = async (menuId) => {
title.value = '修改菜单' title.value = '修改菜单'
restFrom() restFrom()
await getMenuInfo(menuId).then(res => { await getMenuInfo(menuId).then(res => {
if(res.data.isFrame==false){ if(form.value.isFrame==false){
res.data.isFrame='0' form.value.isFrame='0'
}else { }else {
res.data.isFrame='1' form.value.isFrame='1'
} }
if(res.data.isCache==false){ if(form.value.isCache==false){
res.data.isCache='0' form.value.isCache='0'
}else { }else {
res.data.isCache='1' form.value.isCache='1'
} }
form.value = {...res.data} form.value = {...res.data}
}) })
@@ -336,6 +336,8 @@ const handleSubmit = async (instance) => {
if (!instance) return if (!instance) return
instance.validate(async (valid, fields) => { instance.validate(async (valid, fields) => {
if (!valid) return if (!valid) return
form.value.isFrame = form.value.isFrame !== '0';
form.value.isCache = form.value.isCache !== '0';
if (title.value === '新增菜单') { if (title.value === '新增菜单') {
await addMenu(form.value).then(res => { await addMenu(form.value).then(res => {
if (res.code === 1000) { if (res.code === 1000) {