From 35befe4dde6d25d2409f5c997d8d9cf3db33b509 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Wed, 24 May 2023 11:35:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- userManagement/yunSite/detail.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/userManagement/yunSite/detail.vue b/userManagement/yunSite/detail.vue index 3256f89..e9f3db4 100644 --- a/userManagement/yunSite/detail.vue +++ b/userManagement/yunSite/detail.vue @@ -101,7 +101,9 @@ onLoad(options) { if (options.item) { this.postData = JSON.parse(decodeURI(options.item)) - if (!this.postData.sysRoleList) this.postData.sysRoleList = [] + if (!this.postData.sysRoleList) { + this.$set(this.postData,'sysRoleList',[]) + } } else this.isAdd = this.wantUpdate = true uni.$on('yunSiteServiceStation', (item) => { @@ -119,6 +121,7 @@ }) uni.$on('yunSiteAuth', (item) => { + // console.log('item',item) if (!item.isChecked) { let index = this.postData.sysRoleList.findIndex(secItem => secItem.id == item.id) if (index !== -1) { @@ -127,6 +130,7 @@ return } this.postData.sysRoleList.push(item) + console.log('this.postData.sysRoleList',this.postData.sysRoleList) })