浏览代码

fix: 调整数据权限ant-form-item的css

outaozhen 3 年之前
父节点
当前提交
7aedcf85ea

+ 3 - 1
src/pages/Role/Customer/index.tsx

@@ -4,6 +4,8 @@ import ProForm, { ProFormCheckbox, ProFormDependency, ProFormSwitch } from '@ant
 import type { FormInstance } from 'antd'
 import { message, Table, Tabs, Radio, Space, Popconfirm } from 'antd'
 import React, { useRef, useMemo, useState, useEffect } from 'react'
+import styles from '@/pages/Role/index.less'
+import classNames from 'classnames'
 
 import {
   fetchRoleStaffListByRoleId,
@@ -173,7 +175,7 @@ const Customer = () => {
     <PageContainer title={false} breadcrumb={false}>
       <div className="h-full w-full flex flex-row">
         <RoleMenu menuId={menuId} onSelect={onSelect} itemCount={state.roleStaff?.length || 0} />
-        <div className="w-max-3/4">
+        <div className={classNames('w-max-3/4', styles.formItemWrap)}>
           <div className="ml-8 bg-white p-4 shadow-md shadow-hex-3e2c5a relative">
             <div className="absolute right-4 top-4 z-100">
               {state.id && (

+ 3 - 1
src/pages/Role/Hr/index.tsx

@@ -4,6 +4,8 @@ import ProForm, { ProFormCheckbox, ProFormDependency, ProFormSwitch } from '@ant
 import type { FormInstance } from 'antd'
 import { message, Table, Tabs, Popconfirm } from 'antd'
 import React, { useRef, useMemo, useState, useEffect } from 'react'
+import styles from '@/pages/Role/index.less'
+import classNames from 'classnames'
 
 import {
   fetchRoleStaffListByRoleId,
@@ -164,7 +166,7 @@ const Hr = () => {
     <PageContainer title={false} breadcrumb={false}>
       <div className="h-full w-full flex flex-row">
         <RoleMenu menuId={menuId} onSelect={onSelect} itemCount={state.roleStaff?.length || 0} />
-        <div className="w-max-3/4">
+        <div className={classNames('w-max-3/4', styles.formItemWrap)}>
           <div className="ml-8 bg-white p-4 shadow-md shadow-hex-3e2c5a relative">
             <div className="absolute right-4 top-4 z-100">
               {state.id && (

+ 0 - 10
src/pages/Role/Product/index.less

@@ -1,10 +0,0 @@
-@import '~antd/es/style/themes/default.less';
-
-.laberContent {
-  :global(.ant-form-item) {
-    margin-bottom: 5px;
-  }
-  :global(.ant-form-item:last-child) {
-    margin-bottom: 24px;
-  }
-}

+ 3 - 1
src/pages/Role/Product/index.tsx

@@ -4,6 +4,8 @@ import ProForm, { ProFormCheckbox, ProFormDependency, ProFormSwitch } from '@ant
 import type { FormInstance } from 'antd'
 import { message, Table, Tabs, Radio, Space, Popconfirm } from 'antd'
 import React, { useRef, useMemo, useState, useEffect } from 'react'
+import styles from '@/pages/Role/index.less'
+import classNames from 'classnames'
 import {
   fetchRoleStaffListByRoleId,
   updateRolePermission,
@@ -165,7 +167,7 @@ const Product = () => {
     <PageContainer title={false} breadcrumb={false}>
       <div className="h-full w-full flex flex-row">
         <RoleMenu menuId={menuId} onSelect={onSelect} itemCount={state.roleStaff?.length || 0} />
-        <div className="w-max-3/4">
+        <div className={classNames('w-max-3/4', styles.formItemWrap)}>
           <div className="ml-8 bg-white p-4 shadow-md shadow-hex-3e2c5a relative">
             <div className="absolute right-4 top-4 z-100">
               {state.id && (

+ 3 - 1
src/pages/Role/Statistic/index.tsx

@@ -4,6 +4,8 @@ import ProForm, { ProFormDependency, ProFormSwitch, ProFormCheckbox } from '@ant
 import type { FormInstance } from 'antd'
 import { message, Table, Tabs, Radio, Space, Popconfirm } from 'antd'
 import React, { useRef, useMemo, useState, useEffect } from 'react'
+import styles from '@/pages/Role/index.less'
+import classNames from 'classnames'
 
 import {
   fetchRoleStaffListByRoleId,
@@ -166,7 +168,7 @@ const Statistic = () => {
     <PageContainer title={false} breadcrumb={false}>
       <div className="h-full w-full flex flex-row">
         <RoleMenu menuId={menuId} onSelect={onSelect} itemCount={state.roleStaff?.length || 0} />
-        <div className="w-max-3/4">
+        <div className={classNames('w-max-3/4', styles.formItemWrap)}>
           <div className="ml-8 bg-white p-4 shadow-md shadow-hex-3e2c5a relative">
             <div className="absolute right-4 top-4 z-100">
               {state.id && (

+ 3 - 1
src/pages/Role/System/index.tsx

@@ -4,6 +4,8 @@ import ProForm, { ProFormCheckbox, ProFormDependency, ProFormSwitch } from '@ant
 import type { FormInstance } from 'antd'
 import { message, Table, Tabs, Popconfirm } from 'antd'
 import React, { useRef, useMemo, useState, useEffect } from 'react'
+import styles from '@/pages/Role/index.less'
+import classNames from 'classnames'
 import {
   fetchRoleStaffListByRoleId,
   updateRolePermission,
@@ -133,7 +135,7 @@ const System = () => {
     <PageContainer title={false} breadcrumb={false}>
       <div className="h-full w-full flex flex-row">
         <RoleMenu menuId={menuId} onSelect={onSelect} itemCount={state.roleStaff?.length || 0} />
-        <div className="w-max-3/4">
+        <div className={classNames('w-max-3/4', styles.formItemWrap)}>
           <div className="ml-8 bg-white p-4 shadow-md shadow-hex-3e2c5a relative">
             <div className="absolute right-4 top-4 z-100">
               {state.id && (

+ 3 - 1
src/pages/Role/Workbench/index.tsx

@@ -5,6 +5,8 @@ import type { FormInstance } from 'antd'
 import { Radio, Space } from 'antd'
 import { message, Table, Tabs, Popconfirm, Form } from 'antd'
 import React, { useRef, useMemo, useState, useEffect } from 'react'
+import styles from '@/pages/Role/index.less'
+import classNames from 'classnames'
 import {
   fetchRoleStaffListByRoleId,
   // updateRolePermission,
@@ -144,7 +146,7 @@ const Workbench = () => {
     <PageContainer title={false} breadcrumb={false}>
       <div className="h-full w-full flex flex-row">
         <RoleMenu menuId={menuId} onSelect={onSelect} itemCount={state.roleStaff?.length || 0} />
-        <div className="w-max-3/4">
+        <div className={classNames('w-max-3/4', styles.formItemWrap)}>
           <div className="ml-8 bg-white p-4 shadow-md shadow-hex-3e2c5a relative">
             <div className="absolute right-4 top-4 z-100">
               {state.id && (

+ 5 - 0
src/pages/Role/index.less

@@ -0,0 +1,5 @@
+.formItemWrap {
+  :global(.ant-form-item) {
+    margin-bottom: 16px;
+  }
+}

+ 0 - 11
src/pages/Role/index.tsx

@@ -1,11 +0,0 @@
-import React from 'react'
-
-const Role = () => {
-  return (
-    <div>
-      <h2>角色权限管理</h2>
-    </div>
-  )
-}
-
-export default Role