🐛 Fixing a bug. 修复菜单管理新增二级bug

This commit is contained in:
aeizzz 2023-02-24 10:53:43 +08:00
parent 374ba6795f
commit 5e500600b1

View File

@ -96,7 +96,6 @@ const menuDialogFormRef = ref();
//
const state = reactive({
ruleForm: {
id: '',
menuId: '',
name: '',
permission: '',
@ -166,7 +165,7 @@ const dataRules = reactive({
//
const openDialog = (type: string, row?: any) => {
if (row?.id && type === 'edit') {
state.ruleForm.id = row.id
state.ruleForm.menuId = row.id
//
loading.value = true
info(row.id).then(res => {
@ -189,7 +188,7 @@ const openDialog = (type: string, row?: any) => {
//
const onSubmit = () => {
//
if (state.ruleForm.id) {
if (state.ruleForm.menuId) {
loading.value = true
update(state.ruleForm).then(() => {
visible.value = false;