From 0c3fa62a27b57fcdba18bb584b405859c99c3909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Mon, 20 Mar 2023 10:44:00 +0800 Subject: [PATCH] =?UTF-8?q?chore(=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=F0=9F=9A=B8=20=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=B7=BB=E5=8A=A0=E5=AD=90=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/system/menu/crud.tsx | 48 +++++------------------------- 1 file changed, 8 insertions(+), 40 deletions(-) diff --git a/web/src/views/system/menu/crud.tsx b/web/src/views/system/menu/crud.tsx index 539d479..9727a3d 100644 --- a/web/src/views/system/menu/crud.tsx +++ b/web/src/views/system/menu/crud.tsx @@ -104,6 +104,14 @@ export const createCrudOptions = function ({ crudExpose, menuButtonRef }: { crud menuButtonRef.value.initGet(); }, }, + addChildren:{ + text: "添加子级", + type:"warning", + click(context){ + const rowId =context.row.id + crudExpose.openAdd({ row: { parent: rowId } }) + } + } } }, columns: { @@ -146,46 +154,6 @@ export const createCrudOptions = function ({ crudExpose, menuButtonRef }: { crud }, }, }, - parent: { - title: '父级菜单', - column: { - show: false, - }, - type: 'dict-cascader', - dict: dict({ - url: menuPrefix, - value: 'id', - label: 'name', - children: 'children', - isTree: true, - getData: async ({ url }: { url: string }) => { - return request({ - url: url, - params: { limit: 100, status: 1, is_catalog: 1 }, - }).then((ret: any) => { - const responseData = ret.data; - const result = XEUtils.toArrayTree(responseData, { - parentKey: 'parent', - strict: true, - }); - return [{ id: null, name: '根节点', children: result }]; - }); - }, - }), - form: { - component: { - filterable: true, - placeholder: '请选择父级菜单', - props: { - props: { - checkStrictly: true, - value: 'id', - label: 'name', - }, - }, - }, - }, - }, name: { title: '菜单名称', search: {