李志伟 3 lat temu
rodzic
commit
ac5babc4b0

+ 15
- 0
src/pages/SystemManagement/Cooperative/index.less Wyświetl plik

1
+@import (reference) '~antd/es/style/themes/index';
2
+
3
+.treeClass {
4
+  .ant-tree-list {
5
+    & div {
6
+      width: 100% !important;
7
+      .ant-tree-switcher-noop {
8
+        display: none !important;
9
+      }
10
+      span:nth-child(3) {
11
+        width: 100%;
12
+      }
13
+    }
14
+  }
15
+}

+ 12
- 6
src/pages/SystemManagement/Cooperative/index2.jsx Wyświetl plik

12
 
12
 
13
 import POI from '@/components/POI/POI';
13
 import POI from '@/components/POI/POI';
14
 import { CloseOutlined } from '@ant-design/icons';
14
 import { CloseOutlined } from '@ant-design/icons';
15
+import './index.less';
15
 
16
 
16
 const FormItem = Form.Item;
17
 const FormItem = Form.Item;
17
 const { TextArea } = Input;
18
 const { TextArea } = Input;
18
 const { Option } = Select;
19
 const { Option } = Select;
19
-const { TreeNode } = Tree;
20
 const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } };
20
 const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } };
21
 
21
 
22
 export default (props) => {
22
 export default (props) => {
66
 
66
 
67
   const handelNode = (item) => {
67
   const handelNode = (item) => {
68
     let node = (
68
     let node = (
69
-      <div key={item.orgId} style={{ position: 'relative' }}>
70
-        <span onClick={() => handleslect(item.key)}>{item.title}</span>
69
+      <div
70
+        key={item.orgId}
71
+        style={{ justifyContent: 'space-between', display: 'flex', width: '100%' }}
72
+        onClick={() => handleslect(item.key)}
73
+      >
74
+        <span>{item.title}</span>
71
         <Popconfirm
75
         <Popconfirm
72
           title="您是否确认删除 ?"
76
           title="您是否确认删除 ?"
73
           onConfirm={() => handleDelete(item.key)}
77
           onConfirm={() => handleDelete(item.key)}
74
           okText="确定"
78
           okText="确定"
75
           cancelText="取消"
79
           cancelText="取消"
76
         >
80
         >
77
-          <CloseOutlined style={{ color: 'red' }} />
81
+          <CloseOutlined style={{ color: 'red', marginTop: '6px' }} />
78
         </Popconfirm>
82
         </Popconfirm>
79
       </div>
83
       </div>
80
     );
84
     );
124
       .then((res) => {
128
       .then((res) => {
125
         setRegionList(res.records || []);
129
         setRegionList(res.records || []);
126
       })
130
       })
127
-      .catch((err) => {});
131
+      .catch((err) => {
132
+        message.error(err.message || err);
133
+      });
128
   }, []);
134
   }, []);
129
   useEffect(() => {
135
   useEffect(() => {
130
     if (orgId) {
136
     if (orgId) {
153
               </a>
159
               </a>
154
             }
160
             }
155
           >
161
           >
156
-            <Tree titleRender={(data) => handelNode(data)} treeData={data} />
162
+            <Tree className="treeClass" titleRender={(data) => handelNode(data)} treeData={data} />
157
           </Card>
163
           </Card>
158
         </Col>
164
         </Col>
159
         <Col span={16}>
165
         <Col span={16}>

+ 1
- 0
src/pages/Welcome.jsx Wyświetl plik

7
 const CodePreview = ({ children }) => (
7
 const CodePreview = ({ children }) => (
8
   <pre className={styles.pre}>
8
   <pre className={styles.pre}>
9
     <code>
9
     <code>
10
+      66666
10
       <Typography.Text copyable>{children}</Typography.Text>
11
       <Typography.Text copyable>{children}</Typography.Text>
11
     </code>
12
     </code>
12
   </pre>
13
   </pre>