File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 11<template >
22 <el-dialog :title =" state.ruleForm.menuId ? $t('common.editBtn') : $t('common.addBtn')" width =" 600" v-model =" visible"
3- :close-on-click-modal =" false" :destroy-on-close = " true " draggable >
3+ :close-on-click-modal =" false" draggable >
44 <el-form ref =" menuDialogFormRef" :model =" state.ruleForm" :rules =" dataRules" label-width =" 90px" v-loading =" loading" >
55 <el-form-item :label =" $t('sysmenu.menuType')" prop =" menuType" >
66 <el-radio-group v-model =" state.ruleForm.menuType" >
@@ -115,22 +115,24 @@ const dataRules = reactive({
115115});
116116
117117// 打开弹窗
118- const openDialog = (type : string , row ? : any ) => {
118+ const openDialog = async (type : string , row ? : any ) => {
119119 state .ruleForm .menuId = ' ' ;
120120 visible .value = true ;
121121
122- nextTick (() => {
123- menuDialogFormRef .value ?.resetFields ();
124- state .ruleForm .parentId = row ?.id || ' -1' ;
125- });
122+ await nextTick ();
123+
124+ menuDialogFormRef .value ?.resetFields ();
125+ state .ruleForm .parentId = row ?.id || ' -1' ;
126+ state .ruleForm .path = ' ' ;
127+ state .ruleForm .permission = ' ' ;
126128
127129 if (row ?.id && type === ' edit' ) {
128130 state .ruleForm .menuId = row .id ;
129131 // 获取当前节点菜单信息
130- getMenuDetail (row .id );
132+ await getMenuDetail (row .id );
131133 }
132134 // 渲染上级菜单列表树
133- getAllMenuData ();
135+ await getAllMenuData ();
134136};
135137
136138// 获取菜单节点的详细信息
You can’t perform that action at this time.
0 commit comments