Selaa lähdekoodia

前端:代码生成:选择父菜单默认前端路径

Signed-off-by: IMaster <logole@live.cn>
IMaster 1 vuosi sitten
vanhempi
commit
a87ade041f
1 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  1. 6 0
      Web/src/views/system/codeGen/component/editCodeGenDialog.vue

+ 6 - 0
Web/src/views/system/codeGen/component/editCodeGenDialog.vue

@@ -87,6 +87,7 @@
 								clearable
 								class="w100"
 								v-model="state.ruleForm.menuPid"
+								@change="menuChange"
 							>
 								<template #default="{ node, data }">
 									<span>{{ data.title }}</span>
@@ -210,6 +211,11 @@ const tableChanged = (item: any) => {
 	state.ruleForm.busName = item.tableComment;
 };
 
+// 菜单改变
+const menuChange = (menu: any) => {
+	state.ruleForm.pagePath = state.menuData.find((x) => x.id == menu)?.name;
+};
+
 // print改变
 const printTypeChanged = () => {
 	if (state.ruleForm.printType === '') return;