kn-cli 1.0.133 → 1.0.135

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/build/shellUtil.sh +2 -2
  2. package/build/start.sh +3 -2
  3. package/build/vite.config.js +1 -0
  4. package/package.json +1 -1
  5. package/templates/template_admin_antd5/package.json +3 -3
  6. package/templates/template_admin_antd5/public/src/_antd.less +4 -4
  7. package/templates/template_admin_antd5/public/src/_reset.module.less +1 -1
  8. package/templates/template_admin_antd5/public/src/_variable.module.less +5 -5
  9. package/templates/template_admin_antd5/public/src/assets/images/expand-hover.png +0 -0
  10. package/templates/template_admin_antd5/public/src/assets/images/expand.png +0 -0
  11. package/templates/template_admin_antd5/public/src/assets/images/icon-add.png +0 -0
  12. package/templates/template_admin_antd5/public/src/assets/images/icon-full-size.png +0 -0
  13. package/templates/template_admin_antd5/public/src/assets/images/icon-resize.png +0 -0
  14. package/templates/template_admin_antd5/public/src/assets/images/icon-user.png +0 -0
  15. package/templates/template_admin_antd5/public/src/assets/images/login/bg.png +0 -0
  16. package/templates/template_admin_antd5/public/src/assets/images/login/logo.png +0 -0
  17. package/templates/template_admin_antd5/public/src/assets/images/nav/slogan.png +0 -0
  18. package/templates/template_admin_antd5/public/src/assets/images/unexpand-hover.png +0 -0
  19. package/templates/template_admin_antd5/public/src/assets/images/unexpand.png +0 -0
  20. package/templates/template_admin_antd5/public/src/components/antd/antProvider.jsx +16 -4
  21. package/templates/template_admin_antd5/public/src/components/antd/drawer/README.md +336 -0
  22. package/templates/template_admin_antd5/public/src/components/antd/drawer/index.jsx +264 -0
  23. package/templates/template_admin_antd5/public/src/components/antd/index.jsx +19 -7
  24. package/templates/template_admin_antd5/public/src/components/antd/index.module.less +26 -0
  25. package/templates/template_admin_antd5/public/src/components/antd/modal/README.md +324 -0
  26. package/templates/template_admin_antd5/public/src/components/antd/modal/index.jsx +185 -0
  27. package/templates/template_admin_antd5/public/src/components/antd/select/index.jsx +1 -1
  28. package/templates/template_admin_antd5/public/src/components/antd/spin/index.jsx +92 -0
  29. package/templates/template_admin_antd5/public/src/components/antd/spin/index.module.less +58 -0
  30. package/templates/template_admin_antd5/public/src/components/antd/theme.js +19 -8
  31. package/templates/template_admin_antd5/public/src/components/antd/tooltip/detail/index.jsx +19 -56
  32. package/templates/template_admin_antd5/public/src/components/debug/index.jsx +7 -2
  33. package/templates/template_admin_antd5/public/src/components/error/index.jsx +0 -5
  34. package/templates/template_admin_antd5/public/src/components/icon/expand/index.jsx +17 -0
  35. package/templates/template_admin_antd5/public/src/components/icon/expand/index.module.less +22 -0
  36. package/templates/template_admin_antd5/public/src/components/icon/fullSize/index.jsx +13 -0
  37. package/templates/template_admin_antd5/public/src/components/icon/fullSize/index.module.less +28 -0
  38. package/templates/template_admin_antd5/public/src/components/icon/index.jsx +7 -1
  39. package/templates/template_admin_antd5/public/src/components/image/preview.jsx +7 -10
  40. package/templates/template_admin_antd5/public/src/components/layout/basic/index.module.less +1 -1
  41. package/templates/template_admin_antd5/public/src/components/leftMenu/index.jsx +1 -2
  42. package/templates/template_admin_antd5/public/src/components/link/index.module.less +2 -2
  43. package/templates/template_admin_antd5/public/src/components/menuIcon/index.module.less +3 -3
  44. package/templates/template_admin_antd5/public/src/components/popup/index.jsx +91 -50
  45. package/templates/template_admin_antd5/public/src/components/popup/index.module.less +22 -15
  46. package/templates/template_admin_antd5/public/src/components/react/index.jsx +23 -9
  47. package/templates/template_admin_antd5/public/src/components/resizeBox/index.jsx +3 -3
  48. package/templates/template_admin_antd5/public/src/components/select/defaultServicesSelect/index.jsx +151 -40
  49. package/templates/template_admin_antd5/public/src/components/select/dictSelect/index.jsx +19 -3
  50. package/templates/template_admin_antd5/public/src/components/select/useSelectList.jsx +65 -65
  51. package/templates/template_admin_antd5/public/src/components/table/index.jsx +48 -327
  52. package/templates/template_admin_antd5/public/src/components/table/index.module.less +0 -110
  53. package/templates/template_admin_antd5/public/src/components/table/table/index.jsx +242 -0
  54. package/templates/template_admin_antd5/public/src/components/table/table/index.module.less +85 -0
  55. package/templates/template_admin_antd5/public/src/components/table/withPage.jsx +53 -0
  56. package/templates/template_admin_antd5/public/src/components/topMenu/index.jsx +46 -11
  57. package/templates/template_admin_antd5/public/src/components/topMenu/index.module.less +10 -7
  58. package/templates/template_admin_antd5/public/src/components/topMenu/popmenu/index.jsx +89 -0
  59. package/templates/template_admin_antd5/public/src/components/topMenu/popmenu/index.module.less +76 -0
  60. package/templates/template_admin_antd5/public/src/components/topMenu/topBar/index.module.less +4 -3
  61. package/templates/template_admin_antd5/public/src/components/video/index.jsx +1 -1
  62. package/templates/template_admin_antd5/public/src/components/video/preview.jsx +7 -10
  63. package/templates/template_admin_antd5/public/src/config.js +3 -0
  64. package/templates/template_admin_antd5/public/src/hooks/useLoading.jsx +2 -2
  65. package/templates/template_admin_antd5/public/src/index.jsx +2 -4
  66. package/templates/template_admin_antd5/public/src/mock/demo.js +3 -3
  67. package/templates/template_admin_antd5/public/src/pages/antdComponents/button/index.jsx +22 -0
  68. package/templates/template_admin_antd5/public/src/pages/antdComponents/check/index.jsx +12 -0
  69. package/templates/template_admin_antd5/public/src/pages/antdComponents/index.jsx +57 -114
  70. package/templates/template_admin_antd5/public/src/pages/antdComponents/index.module.less +5 -0
  71. package/templates/template_admin_antd5/public/src/pages/antdComponents/input/index.jsx +14 -0
  72. package/templates/template_admin_antd5/public/src/pages/antdComponents/loading/index.jsx +31 -0
  73. package/templates/template_admin_antd5/public/src/pages/antdComponents/message/index.jsx +102 -0
  74. package/templates/template_admin_antd5/public/src/pages/antdComponents/message/index.module.less +17 -0
  75. package/templates/template_admin_antd5/public/src/pages/antdComponents/radio/index.jsx +26 -0
  76. package/templates/template_admin_antd5/public/src/pages/antdComponents/select/index.jsx +13 -0
  77. package/templates/template_admin_antd5/public/src/pages/antdComponents/switch/index.jsx +12 -0
  78. package/templates/template_admin_antd5/public/src/pages/antdComponents/tableWithPage/index.jsx +70 -0
  79. package/templates/template_admin_antd5/public/src/pages/antdComponents/text/index.jsx +21 -0
  80. package/templates/template_admin_antd5/public/src/pages/auth/user/dialog/index.jsx +48 -75
  81. package/templates/template_admin_antd5/public/src/pages/auth/user/index.jsx +17 -23
  82. package/templates/template_admin_antd5/public/src/pages/lazyLoad/index.jsx +11 -0
  83. package/templates/template_admin_antd5/public/src/pages/login/index.jsx +8 -3
  84. package/templates/template_admin_antd5/public/src/pages/login/index.module.less +18 -10
  85. package/templates/template_admin_antd5/public/src/route.jsx +14 -9
  86. package/templates/template_admin_antd5/public/src/services/demo.js +38 -2
  87. package/templates/template_admin_antd5/public/src/services/interceptor/index.js +30 -3
  88. package/templates/template_admin_antd5/public/src/types/global.d.js +306 -0
  89. package/templates/template_admin_antd5/public/src/utils/format.js +1 -1
  90. package/templates/template_admin_antd5/public/src/utils/index.js +3 -3
  91. package/templates/template_admin_antd5/public/src/utils/moment.js +15 -0
  92. package/templates/template_admin_antd5/public/src/components/_table/column.jsx +0 -47
  93. package/templates/template_admin_antd5/public/src/components/_table/column.module.less +0 -12
  94. package/templates/template_admin_antd5/public/src/components/_table/index.jsx +0 -71
  95. package/templates/template_admin_antd5/public/src/components/_table/index.module.less +0 -15
  96. package/templates/template_admin_antd5/public/src/components/badge/index.jsx +0 -47
  97. package/templates/template_admin_antd5/public/src/components/badge/index.module.less +0 -44
  98. package/templates/template_admin_antd5/public/src/components/page/pageLoading/index.jsx +0 -51
  99. package/templates/template_admin_antd5/public/src/components/page/pageLoading/index.module.less +0 -29
  100. package/templates/template_admin_antd5/public/src/components/table/aliTable/index.jsx +0 -250
  101. package/templates/template_admin_antd5/public/src/components/table/aliTable/index.module.less +0 -105
  102. package/templates/template_admin_antd5/public/src/components/toast/index.jsx +0 -79
  103. package/templates/template_admin_antd5/public/src/components/toast/index.module.less +0 -43
  104. package/templates/template_admin_antd5/public/src/type.js +0 -67
  105. package/templates/template_admin_antd5/renamejstojsx.js +0 -45
  106. package/templates/template_admin_antd5/renameless.js +0 -53
  107. /package/templates/template_admin_antd5/public/src/components/{button → antd/button}/index.jsx +0 -0
  108. /package/templates/template_admin_antd5/public/src/components/resizeBox/{index.module.css → index.module.less} +0 -0
@@ -0,0 +1,102 @@
1
+ import React, { useState } from 'react';
2
+ import { Button, Space, message as gMessage, App } from '@/components/antd';
3
+ import { showModal, showDrawer } from '@/components/antd';
4
+ import { InfoCircleFilled, InfoCircleOutlined } from '@/components/icon';
5
+ import styles from './index.module.less';
6
+ import showPopup,{destoryAll} from '@/components/popup';
7
+
8
+ const Dialog=props=>{
9
+ const {close} = props;
10
+
11
+
12
+ const onCancel = () => {
13
+ close(true);
14
+ };
15
+ return (
16
+ <section className={styles.wrap}>
17
+ <div>123</div>
18
+ <div onClick={onCancel}>确认</div>
19
+ </section>
20
+ )
21
+ }
22
+
23
+
24
+ const showPopupForm =async () =>{
25
+ const req = await showPopup({
26
+ content:<Dialog/>,
27
+ closeOnClick:true,
28
+ })
29
+ return req;
30
+ }
31
+
32
+
33
+ const MessageDemo = () => {
34
+ const { message } = App.useApp();
35
+ const [result, setResult] = useState('-');
36
+
37
+ const onCreate1= async ()=>{
38
+ const res = await showPopupForm();
39
+ setResult(res ? '确定' : '取消');
40
+ }
41
+ const onCreate3=()=>{
42
+ showPopupForm();
43
+ showPopupForm();
44
+ showPopupForm();
45
+ }
46
+ const onCloseAll=()=>{
47
+ destoryAll();
48
+ }
49
+
50
+ return (
51
+ <Space direction='horizontal' wrap>
52
+ <Button onClick={() => { message.info('测试', 0); }}>App.message.info</Button>
53
+
54
+ <Button onClick={() => { gMessage.info('测试', 0); }}>message.info</Button>
55
+
56
+ <Button onClick={() => {
57
+ showModal({
58
+ title: '标题',
59
+ content: '内容',
60
+ onOk: () => {
61
+ return new Promise(resolve => {
62
+ setTimeout(resolve, 5000);
63
+ });
64
+ }
65
+ });
66
+ }}>modal</Button>
67
+
68
+ <Button onClick={() => {
69
+ showDrawer({
70
+ title: '标题',
71
+ content: '内容',
72
+ onOk: () => {
73
+ return new Promise(resolve => {
74
+ setTimeout(resolve, 5000);
75
+ });
76
+ }
77
+ });
78
+ }}>showDrawer</Button>
79
+
80
+
81
+ <Button type="primary" onClick={onCreate1}>
82
+ 创建一个
83
+ </Button>
84
+ <Button type="primary" onClick={onCreate3}>
85
+ 创建3个
86
+ </Button>
87
+
88
+ <Button type="primary" onClick={onCloseAll}>
89
+ 销毁所有Popup
90
+ </Button>
91
+ <div>上次操作结果:{result}</div>
92
+
93
+
94
+
95
+ <InfoCircleFilled />
96
+ <InfoCircleOutlined />
97
+ <span className={styles.text}>test css</span>
98
+ </Space>
99
+ );
100
+ };
101
+
102
+ export default MessageDemo;
@@ -0,0 +1,17 @@
1
+ @import '~@/_mixin.module.less';
2
+
3
+ .text {
4
+ .no-select;
5
+ }
6
+
7
+
8
+
9
+ .wrap{
10
+ width: 400px;
11
+ height: 300px;
12
+ background-color: white;
13
+ border-radius: 4px;
14
+ border: 1px solid black;
15
+ display: flex;
16
+ flex-direction: column;
17
+ }
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { Radio, Space } from '@/components/antd';
3
+
4
+ const RadioDemo = () => {
5
+ return (
6
+ <Space direction='horizontal' wrap>
7
+ <Radio.Group
8
+ options={[
9
+ { label: 'Apple', value: 'Apple' },
10
+ { label: 'Pear', value: 'Pear' },
11
+ ]}
12
+ optionType="button"
13
+ buttonStyle="solid"
14
+ />
15
+ <Radio.Group
16
+ options={[
17
+ { label: 'Apple', value: 'Apple' },
18
+ { label: 'Pear', value: 'Pear' },
19
+ ]}
20
+ buttonStyle="solid"
21
+ />
22
+ </Space>
23
+ );
24
+ };
25
+
26
+ export default RadioDemo;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { Space } from '@/components/antd';
3
+ import SelectUser from '@/pages/components/select/user';
4
+
5
+ const SelectDemo = () => {
6
+ return (
7
+ <Space direction='horizontal' wrap>
8
+ <SelectUser mode={'multiple'} style={{ width: '200px' }} allowClear />
9
+ </Space>
10
+ );
11
+ };
12
+
13
+ export default SelectDemo;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { Switch, Space } from '@/components/antd';
3
+
4
+ const SwitchDemo = () => {
5
+ return (
6
+ <Space direction='horizontal' wrap>
7
+ <Switch checkedChildren="开启" unCheckedChildren="关闭" />
8
+ </Space>
9
+ );
10
+ };
11
+
12
+ export default SwitchDemo;
@@ -0,0 +1,70 @@
1
+ import React from 'react';
2
+ import { Button, Space, Input, Form } from '@/components/antd';
3
+ import Table, { TableTools, DefaultPagination } from '@/components/table';
4
+ import { usePaginationWithForm } from '@/hooks';
5
+ import { GET_LIST } from '@/services/demo';
6
+
7
+ const TableWithPageDemo = () => {
8
+ const [form] = Form.useForm();
9
+
10
+ const page = usePaginationWithForm({
11
+ afterService: [(req) => {
12
+ const { records, current, pages, size, total } = req.data;
13
+ return {
14
+ code: 0,
15
+ data: records,
16
+ page: { current, total, pageSize: size, cursor: '' }
17
+ };
18
+ }],
19
+ beforeService: [],
20
+ service: GET_LIST,
21
+ pagination: DefaultPagination(),
22
+ form
23
+ });
24
+
25
+ const onSearch = () => {
26
+ page.update({ pagination: { current: 1 }, clear: true });
27
+ };
28
+
29
+ return (
30
+ <>
31
+ <Space direction='horizontal' wrap>
32
+ <Form form={form} layout='inline'>
33
+ <Form.Item name='id'><Input /></Form.Item>
34
+ <Form.Item><Button onClick={onSearch}>查询</Button></Form.Item>
35
+ </Form>
36
+ </Space>
37
+ <div style={{ width: '1024px', height: '700px', overflow: 'hidden' }}>
38
+ <Table
39
+ page={page}
40
+ pagination={{
41
+ onChange: (current, pageSize) => {
42
+ page.update({ pagination: { current, pageSize }, clear: true });
43
+ }
44
+ }}
45
+ heightMode={TableTools.heightMode.inWrap}
46
+ columns={[
47
+ {
48
+ title: <div>
49
+ <p>id</p>
50
+ <p>fsajfkl</p>
51
+ <p>fsajfkl</p>
52
+ </div>,
53
+ dataIndex: 'id'
54
+ },
55
+ {
56
+ title: 'name',
57
+ dataIndex: 'name'
58
+ }
59
+ ]}
60
+ expandable={{
61
+ expandRowByClick: true,
62
+ expandIcon: TableTools.expandIcon
63
+ }}
64
+ />
65
+ </div>
66
+ </>
67
+ );
68
+ };
69
+
70
+ export default TableWithPageDemo;
@@ -0,0 +1,21 @@
1
+ import React, { useState } from 'react';
2
+ import { Tooltip } from '@/components/antd';
3
+ import { Button, Space } from '@/components/antd';
4
+
5
+ const Demo = () => {
6
+ const [text,setText] = useState(()=>{
7
+ let req='';
8
+ for(let i=0;i<1000;i++){
9
+ req+=`${i};`
10
+ }
11
+ return req;
12
+ })
13
+
14
+ return (
15
+ <Space direction='horizontal' wrap>
16
+ <Tooltip title={text}>详情</Tooltip>
17
+ </Space>
18
+ );
19
+ };
20
+
21
+ export default Demo;
@@ -1,96 +1,69 @@
1
- import React, { useEffect, useState } from 'react';
1
+ import React, { useEffect, useImperativeHandle, useState } from 'react';
2
2
  // @ts-ignore
3
- import { Modal, Form, Input, message,Spin } from '@/components/antd';
4
- import Popup from '@/components/popup';
5
- import { UPDATE,GET_DETAIL } from '@/services/demo';
3
+ import { showModal, Form, Input, message, Spin } from '@/components/antd';
4
+ import { UPDATE, GET_DETAIL } from '@/services/demo';
6
5
  import rule from '@/utils/rule';
7
- import { ReactRender } from '@/components/react';
8
6
 
9
7
 
10
-
11
-
12
- const DialogEdit = (props) => {
13
- const { destory, id=null } = props;
8
+ const DialogEdit = React.forwardRef((props, ref) => {
9
+ const { id = null } = props;
14
10
  const [form] = Form.useForm();
15
- const [record,setRecord]=useState(null)
11
+ const [record, setRecord] = useState(null);
16
12
 
17
- const init=async ()=>{
18
- if(id){
19
- const req= await GET_DETAIL({id})
20
- if(req?.code==0 && req?.data){
21
- let item= req.data;
22
- setRecord(item);
13
+ useImperativeHandle(ref, () => ({ onOk }));
14
+
15
+ const init = async () => {
16
+ if (id) {
17
+ const req = await GET_DETAIL({ id });
18
+ if (req?.code == 0 && req?.data) {
19
+ setRecord(req.data);
23
20
  return;
24
21
  }
25
22
  }
26
- setRecord({})
27
- }
28
- const onOk = async () => {
29
- try {
30
- const values = await form.validateFields();
31
- const params = {
32
- ...values,
33
- };
34
- let res = null;
35
- if (id) {
36
- res = await UPDATE({id,...params});
37
- }
38
- if (res?.code === 0) {
39
- message.success('成功');
40
- destory && destory(true);
41
- }
42
- } catch (errorInfo) {
43
- console.log('Failed:', errorInfo);
44
- }
23
+ setRecord({});
45
24
  };
46
25
 
47
- const onCancel = () => {
48
- form.resetFields();
49
- destory && destory(false);
26
+ const onOk = async () => {
27
+ // const values = await form.validateFields();
28
+ // const res = await UPDATE({ id, ...values });
29
+ // if (res?.code === 0) {
30
+ // message.success('成功');
31
+ // } else {
32
+ // throw new Error('保存失败');
33
+ // }
34
+ message.success('成功');
35
+ return true;
50
36
  };
51
37
 
52
- useEffect(()=>{
38
+ useEffect(() => {
53
39
  init();
54
- },[])
55
- const isEdit=id?true:false;
56
- return (
57
- <Modal
58
- maskClosable={false}
59
- title={isEdit? '编辑用户' : '新增用户'}
60
- width={600}
61
- open={true}
62
- onOk={onOk}
63
- onCancel={onCancel}
64
- >
65
- {
66
- !record?
67
- <Spin/>:
68
- <Form labelCol={{ span: 5 }} wrapperCol={{ span: 19 }} form={form} initialValues={record||{}}>
69
- <Form.Item
70
- label="姓名"
71
- name="userId"
72
- ruler={rule.INPUT}
73
- required
74
- >
75
- <Input placeholder="请输入" disabled={isEdit}/>
76
- </Form.Item>
77
- <Form.Item label="昵称" name="bindNickname" ruler={rule.INPUT}>
78
- <Input placeholder="请输入" />
79
- </Form.Item>
40
+ }, []);
80
41
 
81
- </Form>
82
- }
83
- </Modal>
42
+ if (!record) return <Spin />;
43
+
44
+ return (
45
+ <Form labelCol={{ span: 5 }} wrapperCol={{ span: 19 }} form={form} initialValues={record}>
46
+ <Form.Item label="姓名" name="userId" ruler={rule.INPUT} required>
47
+ <Input placeholder="请输入" disabled={!!id} />
48
+ </Form.Item>
49
+ <Form.Item label="昵称" name="bindNickname" ruler={rule.INPUT}>
50
+ <Input placeholder="请输入" />
51
+ </Form.Item>
52
+ </Form>
84
53
  );
85
- };
54
+ });
55
+
86
56
 
87
57
  const ShowEdit = (props = {}) => {
88
- return new Promise((resolve) => {
89
- let popup = Popup(resolve);
90
- ReactRender(
91
- <DialogEdit destory={popup.destory} {...props} />,
92
- popup.dom
93
- );
58
+ const { id = null } = props;
59
+
60
+ return showModal({
61
+ title: id ? '编辑用户' : '新增用户',
62
+ width: 600,
63
+ maskClosable: false,
64
+ content: <DialogEdit {...props} />,
65
+ hideCancel:true,
94
66
  });
95
67
  };
68
+
96
69
  export default ShowEdit;
@@ -4,9 +4,7 @@ import {
4
4
  Form,
5
5
  Button,
6
6
  Input,
7
- Select,
8
7
  Tabs,
9
- Badge
10
8
  // @ts-ignore
11
9
  } from '@/components/antd';
12
10
  // @ts-ignore
@@ -15,13 +13,13 @@ import {useNavigate,} from 'react-router-dom';
15
13
  import {PlusOutlined} from '@ant-design/icons';
16
14
 
17
15
  import ruler from '@/utils/rule';
18
- import {px2rem} from '@/utils';
19
16
  import {Layout,SearchBar,TitleBar,Content,Panel} from '@/pages/components/layout'
20
- import Table from '@/components/table';
17
+ import Table,{TableTools} from '@/components/table';
21
18
  import { usePaginationWithForm } from '@/hooks';
22
19
  import Link from '@/components/link';
23
- import {FormatTableService,FormatGetRequest} from '@/services'
20
+ import {FormatGetRequest} from '@/services'
24
21
  import {
22
+ FormatDemoTableService,
25
23
  GET_LIST,
26
24
  } from '@/services/demo';
27
25
 
@@ -35,7 +33,7 @@ const AuthUser = () => {
35
33
  const [form] = Form.useForm();
36
34
 
37
35
  const page = usePaginationWithForm({
38
- afterService: [FormatTableService],
36
+ afterService: [FormatDemoTableService],
39
37
  beforeService:[FormatGetRequest],
40
38
  service: GET_LIST,
41
39
  pagination: { pageSize: 15 },
@@ -56,43 +54,39 @@ const AuthUser = () => {
56
54
  }
57
55
  const onEdit=async (record)=>{
58
56
  const req = await ShowEdit({id:record.id})
57
+ console.log('onEdit :',req)
59
58
  }
60
59
 
61
60
  const columnsInternalUsers = [
62
61
  {
63
62
  title: '姓名',
64
63
  dataIndex: 'name',
65
- render:(text,record)=>(<Table.Column minWidth={60} maxWidth={88}>{text}</Table.Column>)
66
- },
67
- {
68
- title: '用户名',
69
- dataIndex: 'name',
70
- render:(text,record)=>(<Table.Column minWidth={60} maxWidth={80}>{text}</Table.Column>)
64
+ render:(text,record)=>(<TableTools.Column minWidth={60} maxWidth={88}>{text}</TableTools.Column>)
71
65
  },
72
66
  {
73
67
  title: '职位',
74
68
  dataIndex: 'name',
75
- render:(text,record)=>(<Table.Column minWidth={60} maxWidth={94}>{text}</Table.Column>)
69
+ render:(text,record)=>(<TableTools.Column minWidth={60} maxWidth={94}>{text}</TableTools.Column>)
76
70
  },
77
71
  {
78
72
  title: '所在部门',
79
73
  dataIndex: 'longName',
80
- render:(text,record)=>(<Table.Column minWidth={100} maxWidth={224}>{text}</Table.Column>)
74
+ render:(text,record)=>(<TableTools.Column minWidth={100} maxWidth={224}>{text}</TableTools.Column>)
81
75
  },
82
76
  {
83
77
  title: '角色',
84
78
  dataIndex: 'name',
85
- render:(text,record)=>(<Table.Column minWidth={80} maxWidth={111}>{text}</Table.Column>)
79
+ render:(text,record)=>(<TableTools.Column minWidth={80} maxWidth={111}>{text}</TableTools.Column>)
86
80
  },
87
81
  {
88
82
  title: '模块权限(补充)',
89
83
  dataIndex: 'longName',
90
- render:(text,record)=>(<Table.Column minWidth={120} maxWidth={187}>{text}</Table.Column>)
84
+ render:(text,record)=>(<TableTools.Column minWidth={120} maxWidth={187}>{text}</TableTools.Column>)
91
85
  },
92
86
  {
93
87
  title: '产品权限(补充)',
94
88
  dataIndex: 'longName',
95
- render:(text,record)=>(<Table.Column minWidth={129} maxWidth={211}>{text}</Table.Column>)
89
+ render:(text,record)=>(<TableTools.Column minWidth={129} maxWidth={211}>{text}</TableTools.Column>)
96
90
  },
97
91
 
98
92
  {
@@ -112,33 +106,33 @@ const AuthUser = () => {
112
106
  title: '姓名',
113
107
  dataIndex: 'name',
114
108
  fixed:'left',
115
- render:(text,record)=>(<Table.Column minWidth={60} maxWidth={88} item={record}>{text}</Table.Column>)
109
+ render:(text,record)=>(<TableTools.Column minWidth={60} maxWidth={88} item={record}>{text}</TableTools.Column>)
116
110
 
117
111
  },
118
112
  {
119
113
  title: '公司',
120
114
  dataIndex: 'name',
121
- render:(text,record)=>(<Table.Column minWidth={80} maxWidth={224}>{text}</Table.Column>)
115
+ render:(text,record)=>(<TableTools.Column minWidth={80} maxWidth={224}>{text}</TableTools.Column>)
122
116
  },
123
117
  {
124
118
  title: '所在部门',
125
119
  dataIndex: 'name',
126
- render:(text,record)=>(<Table.Column minWidth={80} maxWidth={224}>{text}</Table.Column>)
120
+ render:(text,record)=>(<TableTools.Column minWidth={80} maxWidth={224}>{text}</TableTools.Column>)
127
121
  },
128
122
  {
129
123
  title: '角色',
130
124
  dataIndex: 'name',
131
- render:(text,record)=>(<Table.Column minWidth={60} maxWidth={110}>{text}</Table.Column>)
125
+ render:(text,record)=>(<TableTools.Column minWidth={60} maxWidth={110}>{text}</TableTools.Column>)
132
126
  },
133
127
  {
134
128
  title: '模块权限(补充)',
135
129
  dataIndex: 'longName',
136
- render:(text,record)=>(<Table.Column minWidth={120} maxWidth={187}>{text}</Table.Column>)
130
+ render:(text,record)=>(<TableTools.Column minWidth={120} maxWidth={187}>{text}</TableTools.Column>)
137
131
  },
138
132
  {
139
133
  title: '产品权限(补充)',
140
134
  dataIndex: 'longName',
141
- render:(text,record)=>(<Table.Column minWidth={129} maxWidth={211}>{text}</Table.Column>)
135
+ render:(text,record)=>(<TableTools.Column minWidth={129} maxWidth={211}>{text}</TableTools.Column>)
142
136
  },
143
137
 
144
138
  {
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+
3
+ const LazyLoad = () => {
4
+ return (
5
+ <div>
6
+ <p>懒加载成功(延迟 5 秒)</p>
7
+ </div>
8
+ );
9
+ };
10
+
11
+ export default LazyLoad;
@@ -14,6 +14,8 @@ import {jumpUrl} from '@/utils';
14
14
  import imgSlogan from '@/assets/images/login/slogan.png';
15
15
  // @ts-ignore
16
16
  import imgLogo2 from '@/assets/images/login/logo.png';
17
+ // @ts-ignore
18
+ import imgBg from '@/assets/images/login/bg.png';
17
19
 
18
20
 
19
21
  const Page = () => {
@@ -87,16 +89,19 @@ const Page = () => {
87
89
 
88
90
  return (
89
91
  <section className={styles.body}>
92
+ <section className={styles.leftWrap}>
93
+ <img src={imgBg}/>
94
+ </section>
90
95
  {/* 左上角slogan */}
91
- <section className={styles.sloganWrap}>
96
+ {/* <section className={styles.sloganWrap}>
92
97
  <img src={imgSlogan} className={styles.slogan} />
93
- </section>
98
+ </section> */}
94
99
 
95
100
  <section className={styles.loginWrap}>
96
101
 
97
102
  <div className={styles.centerWrap}>
98
103
  <img src={imgLogo2} className={styles.logo} data-run={state!='login'} />
99
- <p className={styles.title}>欢迎登录<b>宙斯系统</b></p>
104
+ <p className={styles.title}>欢迎登录</p>
100
105
  {
101
106
  state=='login'?<Tabs defaultActiveKey='1' items={tabs} onChange={onTab} />
102
107
  :<p className={styles.logining}>登录中...</p>
@@ -18,10 +18,18 @@
18
18
  display: flex;
19
19
  justify-content: center;
20
20
  align-items: center;
21
- flex-direction: column;
22
- background-image: url('~@/assets/images/login/bg.png');
23
- background-size: cover;
24
-
21
+ // flex-direction: column;
22
+ // background-image: url('~@/assets/images/login/bg.png');
23
+ // background-size: cover;
24
+ }
25
+ .leftWrap{
26
+ height:100%;
27
+ flex: 1;
28
+ img{
29
+ height: 100%;
30
+ width: 100%;
31
+ object-fit: cover;
32
+ }
25
33
  }
26
34
  .bg2{
27
35
  width: 100%;
@@ -38,9 +46,9 @@
38
46
 
39
47
 
40
48
  .loginWrap{
41
- position: fixed;
42
- right:0;
43
- top:0;
49
+ // position: fixed;
50
+ // right:0;
51
+ // top:0;
44
52
  height: 100%;
45
53
  max-width: 560px;
46
54
  min-width: 384px;
@@ -66,7 +74,7 @@
66
74
  .phoneLogin,
67
75
  .kssoLogin{
68
76
  width: 100%;
69
- margin-top: 24px;
77
+ margin-top: 8px;
70
78
  min-height: 240px;
71
79
 
72
80
  .codeGroup{
@@ -76,7 +84,7 @@
76
84
  width: 100%;
77
85
  .sendCode{
78
86
  font-size: 14px;
79
- color:#0974F2;
87
+ color:var(--theme-color-primary);
80
88
  cursor: pointer;
81
89
  .no-select;
82
90
  }
@@ -109,7 +117,7 @@
109
117
  .no-select;
110
118
  }
111
119
  .logo{
112
- width: 64px;
120
+ width: 300px;
113
121
 
114
122
  &[data-run='true']{
115
123
  animation: rotate 2s linear infinite;