outaozhen 3 yıl önce
ebeveyn
işleme
543af9e472

+ 5 - 1
src/pages/Permission/Role/components/PermTabs/index.tsx

@@ -13,10 +13,14 @@ const PermTabs = ({
     frontPermission: rolesPermission
   }
 }) => {
+  console.log(rolesPermission)
+
   const [state, setState] = useState({
     frontPermission: [], // 前台权限
     backstagePermission: [] // 后台权限
   })
+  console.log(state.frontPermission)
+
   const { run: trySetRolePermission } = useRequest(
     (params: API.SetRolePermissionParams) => setRolePermission(params),
     {
@@ -54,7 +58,7 @@ const PermTabs = ({
     if (activeKey === '2') {
       setState({
         ...state,
-        frontPermission: rolesPermission?.toString()
+        frontPermission: [].concat(rolesPermission)
       })
     }
   }, [activeKey])