From 60f8b0fb6d2bfa53ecc0d3504425cae25dd89393 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 29 Jul 2024 10:25:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20base=20menu=E6=9B=B4=E6=96=B0=E6=97=B6?= =?UTF-8?q?=E5=8F=98=E6=9B=B4options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ops/menu.vue | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/views/ops/menu.vue b/src/views/ops/menu.vue index cff60154..53a9298d 100644 --- a/src/views/ops/menu.vue +++ b/src/views/ops/menu.vue @@ -20,7 +20,7 @@ + @selection-change="selectionChange" hidePagination @dataChange="updateOptions"> @@ -53,9 +53,9 @@ - 目录 - 菜单 - 按钮 + 模块 + 页面 + 接口 @@ -123,9 +123,9 @@ export default { type: [{ required: true, message: "请选择类型" }], }, types: { - 10: "目录", - 20: "菜单", - 30: "按钮", + 10: "模块", + 20: "页面", + 30: "接口", }, groupsProps: { // value: "id", @@ -140,19 +140,15 @@ export default { }, mounted() { - this.getGroup(); this.getPermCodes(); }, methods: { + updateOptions(data) { + this.group = genTree(data) + }, getPermCodes() { this.permCodes = this.$API.system.permission.codes.req(); }, - //加载树数据 - async getGroup() { - var res = await this.$API.system.permission.list.req({ page: 0 }); - this.group = genTree(res); - }, - //添加 addMenu() { this.type = "add";