张延森 4 years ago
parent
commit
ead69d7a23

BIN
public/yz_logo.png View File


+ 3
- 3
src/components/TableList/TableList.jsx View File

4
 
4
 
5
 const Actions = (props) => {
5
 const Actions = (props) => {
6
   const style = {
6
   const style = {
7
-    marginBottom: '1em'
7
+    padding: '1em',
8
   }
8
   }
9
 
9
 
10
   return (
10
   return (
15
 }
15
 }
16
 
16
 
17
 export default (props) => {
17
 export default (props) => {
18
-  const { actions, ...leftProps } = props
18
+  const { actionRender, ...leftProps } = props
19
 
19
 
20
   const tableProps = {
20
   const tableProps = {
21
     ...leftProps,
21
     ...leftProps,
24
   
24
   
25
   return (
25
   return (
26
     <div className={Styles['box-wrapper']}>
26
     <div className={Styles['box-wrapper']}>
27
-      {actions && <Actions>{actions}</Actions>}
27
+      {typeof actionRender === 'function' && <Actions>{actionRender()}</Actions>}
28
       <Table {...tableProps} />
28
       <Table {...tableProps} />
29
     </div>
29
     </div>
30
   )
30
   )

+ 6
- 1
src/pages/building/List/index.jsx View File

1
 import React, { useMemo, useRef, useCallback, useState } from 'react'
1
 import React, { useMemo, useRef, useCallback, useState } from 'react'
2
 // import { PageHeaderWrapper } from '@ant-design/pro-layout'
2
 // import { PageHeaderWrapper } from '@ant-design/pro-layout'
3
-import { notification, Spin } from 'antd'
3
+import { Button, notification, Spin } from 'antd'
4
 import QueryTable from '@/components/QueryTable'
4
 import QueryTable from '@/components/QueryTable'
5
 import request from '@/utils/request'
5
 import request from '@/utils/request'
6
 import apis from '@/services/apis'
6
 import apis from '@/services/apis'
44
     })
44
     })
45
   }, [page])
45
   }, [page])
46
 
46
 
47
+  const actionRender = () => {
48
+    return <Button type="primary" icon="plus">新增</Button>
49
+  }
50
+
47
   return (
51
   return (
48
     // <PageHeaderWrapper>
52
     // <PageHeaderWrapper>
49
       <Spin spinning={loading}>
53
       <Spin spinning={loading}>
53
           api={apis.building.getList}
57
           api={apis.building.getList}
54
           searchFields={searchFields}
58
           searchFields={searchFields}
55
           columns={tableColumns}
59
           columns={tableColumns}
60
+          actionRender={actionRender}
56
           onPageChange={(pg) => setPage(pg)}
61
           onPageChange={(pg) => setPage(pg)}
57
         />
62
         />
58
       </Spin>
63
       </Spin>

+ 3
- 3
src/pages/document.ejs View File

170
       <div
170
       <div
171
         style="display: flex;justify-content: center;align-items: center;flex-direction: column;min-height: 420px;height: 100%;"
171
         style="display: flex;justify-content: center;align-items: center;flex-direction: column;min-height: 420px;height: 100%;"
172
       >
172
       >
173
-        <img src="/pro_icon.svg" alt="logo" width="256" />
173
+        <!-- <img src="/pro_icon.svg" alt="logo" width="256" /> -->
174
         <div class="page-loading-warp">
174
         <div class="page-loading-warp">
175
           <div class="ant-spin ant-spin-lg ant-spin-spinning">
175
           <div class="ant-spin ant-spin-lg ant-spin-spinning">
176
             <span class="ant-spin-dot ant-spin-dot-spin"
176
             <span class="ant-spin-dot ant-spin-dot-spin"
181
         </div>
181
         </div>
182
         <div style="display: flex;justify-content: center;align-items: center;">
182
         <div style="display: flex;justify-content: center;align-items: center;">
183
           <img
183
           <img
184
-            src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg"
184
+            src="./yz_logo.png"
185
             width="32"
185
             width="32"
186
             style="margin-right: 8px;"
186
             style="margin-right: 8px;"
187
           />
187
           />
188
-          Ant Design
188
+          南京 云致
189
         </div>
189
         </div>
190
       </div>
190
       </div>
191
     </div>
191
     </div>