From 5897aa190700975ca0c7ec8af0aa999b68629a4b Mon Sep 17 00:00:00 2001 From: smallchill Date: Sat, 1 Feb 2020 16:34:51 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E5=8A=A8=E6=80=81=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E8=B7=AF=E7=94=B1=E7=9A=84=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/menu.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/views/system/menu.vue b/src/views/system/menu.vue index fd105d1..92124b9 100644 --- a/src/views/system/menu.vue +++ b/src/views/system/menu.vue @@ -41,6 +41,7 @@ import {getLazyList, remove, update, add, getMenu} from "@/api/system/menu"; import {mapGetters} from "vuex"; import iconList from "@/config/iconList"; + import func from "@/util/func"; export default { data() { @@ -193,7 +194,16 @@ data: [] }; }, - + watch: { + 'form.category'() { + const category = func.toInt(this.form.category); + this.$refs.crud.option.column.filter(item => { + if (item.prop === "path") { + item.rules[0].required = category === 1; + } + }); + } + }, computed: { ...mapGetters(["permission"]), permissionList() {