From c5cee6ee5c00b057443b1542614dde8ffc2c663f Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 23 Oct 2024 14:44:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BC=96=E8=BE=91=E8=A7=92?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/UserManage.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pages/UserManage.vue b/src/pages/UserManage.vue index 0df199a..d71ad6f 100644 --- a/src/pages/UserManage.vue +++ b/src/pages/UserManage.vue @@ -239,10 +239,15 @@ function edieUserData(row: User) { userInfo.name = row.name; userInfo.mobile = row.mobile; userInfo.registerTime = row.registerTime; - userInfo.roleList = row.roleList; - userInfo.Rids = row.roleList.map((item) => { - return item.roleId; - }); + if (row?.roleList) { + userInfo.roleList = row.roleList; + userInfo.Rids = row.roleList.map((item) => { + return item.roleId; + }); + } else { + userInfo.roleList = []; + userInfo.Rids = []; + } editFormShow.value = true; }