Browse Source

fix: 本地化存储数据权限下拉列表

lanjianrong 5 năm trước cách đây
mục cha
commit
93bba5e578
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/app.tsx

+ 2 - 2
src/app.tsx

@@ -15,8 +15,8 @@ export async function render(oldRender) {
     const { data = [] } = await apiGetRoles()
     const permVal = PermDataList.find(item => path.startsWith(item.key))?.value
     if (permVal) {
-      const { prem = [] } = await getDataPerm()
-      setAuthCache(PERM_LIST_KEY, prem)
+      const prem = await getDataPerm()
+      setAuthCache(PERM_LIST_KEY, prem?.data || [])
     }
     setAuthority(data)
   }