@baic/yolk-cli 2.0.1-alpha.36 → 2.0.1-alpha.39
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.
- package/lib/index.js +1 -1
- package/package.json +2 -2
- package/templates/{mobile → ice-mobile}/.editorconfig +0 -0
- package/templates/{mobile → ice-mobile}/.eslintrc +0 -0
- package/templates/ice-mobile/.gitignore.tpl +26 -0
- package/templates/ice-mobile/.ice.ts +3 -0
- package/templates/ice-mobile/.prettierignore +9 -0
- package/templates/{mobile → ice-mobile}/.prettierrc +0 -0
- package/templates/{mobile → ice-mobile}/.stylelintrc +0 -0
- package/templates/{web → ice-mobile}/README.md.tpl +0 -0
- package/templates/ice-mobile/package.json.tpl +11 -0
- package/templates/{mobile → ice-mobile}/public/favicon.ico +0 -0
- package/templates/ice-mobile/public/index.html +13 -0
- package/templates/ice-mobile/src/app.tsx +12 -0
- package/templates/{mobile → ice-mobile}/src/common/request.ts +0 -0
- package/templates/{mobile → ice-mobile}/src/common/util.ts +0 -0
- package/templates/{mobile → ice-mobile}/src/components/index.ts +0 -0
- package/templates/{mobile → ice-mobile}/src/global.less +0 -0
- package/templates/ice-mobile/src/layouts/index.tsx +5 -0
- package/templates/{mobile → ice-mobile}/src/pages/404.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/demo/examples/BarCode.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/demo/examples/Iconfont.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/demo/examples/Input.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/demo/examples/Loading.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/demo/examples/NumberInput/1.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/demo/examples/NumberInput/2.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/demo/examples/NumberInput/3.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/demo/examples/NumberInput/4.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/demo/examples/QrCode.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/demo/examples/Required.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/demo/examples/TimerButton.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/demo/examples/usePreload.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/demo/index.tsx +0 -0
- package/templates/{mobile → ice-mobile}/src/pages/index.tsx +0 -0
- package/templates/ice-mobile/src/routes.ts +28 -0
- package/templates/{mobile → ice-mobile}/src/types/user.d.ts +0 -0
- package/templates/ice-mobile/tsconfig.json +26 -0
- package/templates/{mobile → ice-mobile}/typings.d.ts +0 -0
- package/templates/{web → ice-web}/.editorconfig +0 -0
- package/templates/ice-web/.eslintcache +1 -0
- package/templates/{web → ice-web}/.eslintrc +0 -0
- package/templates/ice-web/.gitignore.tpl +26 -0
- package/templates/ice-web/.ice.ts +3 -0
- package/templates/ice-web/.prettierignore +9 -0
- package/templates/{web → ice-web}/.prettierrc +0 -0
- package/templates/{web → ice-web}/.stylelintrc +0 -0
- package/templates/ice-web/README.md.tpl +34 -0
- package/templates/{web → ice-web}/package.json.tpl +1 -1
- package/templates/{web → ice-web}/public/favicon.ico +0 -0
- package/templates/ice-web/public/index.html +13 -0
- package/templates/ice-web/src/app.tsx +12 -0
- package/templates/{web → ice-web}/src/common/request.ts +0 -0
- package/templates/{web → ice-web}/src/common/util.ts +0 -0
- package/templates/{web → ice-web}/src/components/index.ts +0 -0
- package/templates/ice-web/src/global.less +5 -0
- package/templates/ice-web/src/layouts/index.tsx +5 -0
- package/templates/ice-web/src/pages/404.tsx +17 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/BankInput.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/BarCode.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Collapse.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/DatePicker.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Flex.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Grid/1.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Grid/2.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Grid/3.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Grid/4.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Grid/5.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Grid/6.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Iconfont.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/ImagePreview.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Input/1.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Input/2.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/LinkButton/1.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/LinkButton/2.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/LinkButton/3.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Loading.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/MobileInput.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/NumberInput.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/PagingTable.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/QrCode.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/RangeNumber/1.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/RangeNumber/2.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Required.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/SearchLayout.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Table/1.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Table/2.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Table/3.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Table/4.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/TimerButton.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Title/1.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Title/2.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/WaterMark.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/Wrapper.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/examples/usePreload.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/demo/index.tsx +0 -0
- package/templates/{web → ice-web}/src/pages/index.tsx +0 -0
- package/templates/ice-web/src/routes.ts +28 -0
- package/templates/{web → ice-web}/src/types/user.d.ts +0 -0
- package/templates/ice-web/tsconfig.json +26 -0
- package/templates/{web → ice-web}/typings.d.ts +0 -0
- package/templates/miniprogram/package.json.tpl +1 -1
- package/templates/umi-mobile/.editorconfig +16 -0
- package/templates/umi-mobile/.eslintrc +6 -0
- package/templates/{mobile → umi-mobile}/.gitignore.tpl +0 -0
- package/templates/{mobile → umi-mobile}/.prettierignore +0 -0
- package/templates/umi-mobile/.prettierrc +11 -0
- package/templates/umi-mobile/.stylelintrc +3 -0
- package/templates/{mobile → umi-mobile}/.umirc.ts.tpl +0 -0
- package/templates/{mobile → umi-mobile}/LICENSE +0 -0
- package/templates/{mobile → umi-mobile}/README.md.tpl +0 -0
- package/templates/umi-mobile/package.json.tpl +11 -0
- package/templates/umi-mobile/public/favicon.ico +0 -0
- package/templates/{mobile → umi-mobile}/src/app.tsx +0 -0
- package/templates/umi-mobile/src/common/request.ts +3 -0
- package/templates/umi-mobile/src/common/util.ts +7 -0
- package/templates/umi-mobile/src/components/index.ts +0 -0
- package/templates/{web → umi-mobile}/src/global.less +0 -0
- package/templates/{mobile → umi-mobile}/src/layouts/index.tsx +0 -0
- package/templates/umi-mobile/src/pages/404.tsx +10 -0
- package/templates/umi-mobile/src/pages/demo/examples/BarCode.tsx +4 -0
- package/templates/umi-mobile/src/pages/demo/examples/Iconfont.tsx +18 -0
- package/templates/umi-mobile/src/pages/demo/examples/Input.tsx +17 -0
- package/templates/umi-mobile/src/pages/demo/examples/Loading.tsx +12 -0
- package/templates/umi-mobile/src/pages/demo/examples/NumberInput/1.tsx +17 -0
- package/templates/umi-mobile/src/pages/demo/examples/NumberInput/2.tsx +17 -0
- package/templates/umi-mobile/src/pages/demo/examples/NumberInput/3.tsx +17 -0
- package/templates/umi-mobile/src/pages/demo/examples/NumberInput/4.tsx +17 -0
- package/templates/umi-mobile/src/pages/demo/examples/QrCode.tsx +4 -0
- package/templates/umi-mobile/src/pages/demo/examples/Required.tsx +4 -0
- package/templates/umi-mobile/src/pages/demo/examples/TimerButton.tsx +4 -0
- package/templates/umi-mobile/src/pages/demo/examples/usePreload.tsx +9 -0
- package/templates/umi-mobile/src/pages/demo/index.tsx +76 -0
- package/templates/umi-mobile/src/pages/index.tsx +3 -0
- package/templates/umi-mobile/src/types/user.d.ts +3 -0
- package/templates/{mobile → umi-mobile}/tsconfig.json +0 -0
- package/templates/umi-mobile/typings.d.ts +16 -0
- package/templates/umi-web/.editorconfig +16 -0
- package/templates/umi-web/.eslintrc +6 -0
- package/templates/{web → umi-web}/.gitignore.tpl +0 -0
- package/templates/{web → umi-web}/.prettierignore +0 -0
- package/templates/umi-web/.prettierrc +11 -0
- package/templates/umi-web/.stylelintrc +3 -0
- package/templates/{web → umi-web}/.umirc.ts.tpl +0 -0
- package/templates/{web → umi-web}/LICENSE +0 -0
- package/templates/umi-web/README.md.tpl +34 -0
- package/templates/{mobile → umi-web}/package.json.tpl +1 -1
- package/templates/umi-web/public/favicon.ico +0 -0
- package/templates/{web → umi-web}/src/app.tsx +0 -0
- package/templates/umi-web/src/common/request.ts +3 -0
- package/templates/umi-web/src/common/util.ts +7 -0
- package/templates/umi-web/src/components/index.ts +0 -0
- package/templates/umi-web/src/global.less +3 -0
- package/templates/{web → umi-web}/src/layouts/index.tsx +0 -0
- package/templates/{web → umi-web}/src/pages/404.tsx +0 -0
- package/templates/umi-web/src/pages/demo/examples/BankInput.tsx +13 -0
- package/templates/umi-web/src/pages/demo/examples/BarCode.tsx +4 -0
- package/templates/umi-web/src/pages/demo/examples/Collapse.tsx +4 -0
- package/templates/umi-web/src/pages/demo/examples/DatePicker.tsx +4 -0
- package/templates/umi-web/src/pages/demo/examples/Flex.tsx +10 -0
- package/templates/umi-web/src/pages/demo/examples/Grid/1.tsx +25 -0
- package/templates/umi-web/src/pages/demo/examples/Grid/2.tsx +26 -0
- package/templates/umi-web/src/pages/demo/examples/Grid/3.tsx +37 -0
- package/templates/umi-web/src/pages/demo/examples/Grid/4.tsx +43 -0
- package/templates/umi-web/src/pages/demo/examples/Grid/5.tsx +36 -0
- package/templates/umi-web/src/pages/demo/examples/Grid/6.tsx +28 -0
- package/templates/umi-web/src/pages/demo/examples/Iconfont.tsx +18 -0
- package/templates/umi-web/src/pages/demo/examples/ImagePreview.tsx +20 -0
- package/templates/umi-web/src/pages/demo/examples/Input/1.tsx +4 -0
- package/templates/umi-web/src/pages/demo/examples/Input/2.tsx +80 -0
- package/templates/umi-web/src/pages/demo/examples/LinkButton/1.tsx +4 -0
- package/templates/umi-web/src/pages/demo/examples/LinkButton/2.tsx +9 -0
- package/templates/umi-web/src/pages/demo/examples/LinkButton/3.tsx +12 -0
- package/templates/umi-web/src/pages/demo/examples/Loading.tsx +12 -0
- package/templates/umi-web/src/pages/demo/examples/MobileInput.tsx +4 -0
- package/templates/umi-web/src/pages/demo/examples/NumberInput.tsx +4 -0
- package/templates/umi-web/src/pages/demo/examples/PagingTable.tsx +21 -0
- package/templates/umi-web/src/pages/demo/examples/QrCode.tsx +4 -0
- package/templates/umi-web/src/pages/demo/examples/RangeNumber/1.tsx +4 -0
- package/templates/umi-web/src/pages/demo/examples/RangeNumber/2.tsx +15 -0
- package/templates/umi-web/src/pages/demo/examples/Required.tsx +4 -0
- package/templates/umi-web/src/pages/demo/examples/SearchLayout.tsx +46 -0
- package/templates/umi-web/src/pages/demo/examples/Table/1.tsx +64 -0
- package/templates/umi-web/src/pages/demo/examples/Table/2.tsx +29 -0
- package/templates/umi-web/src/pages/demo/examples/Table/3.tsx +39 -0
- package/templates/umi-web/src/pages/demo/examples/Table/4.tsx +42 -0
- package/templates/umi-web/src/pages/demo/examples/TimerButton.tsx +4 -0
- package/templates/umi-web/src/pages/demo/examples/Title/1.tsx +4 -0
- package/templates/umi-web/src/pages/demo/examples/Title/2.tsx +5 -0
- package/templates/umi-web/src/pages/demo/examples/WaterMark.tsx +8 -0
- package/templates/umi-web/src/pages/demo/examples/Wrapper.tsx +40 -0
- package/templates/umi-web/src/pages/demo/examples/usePreload.tsx +9 -0
- package/templates/umi-web/src/pages/demo/index.tsx +135 -0
- package/templates/umi-web/src/pages/index.tsx +3 -0
- package/templates/umi-web/src/types/user.d.ts +3 -0
- package/templates/{web → umi-web}/tsconfig.json +0 -0
- package/templates/umi-web/typings.d.ts +16 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MenuOutlined } from '@ant-design/icons';
|
|
3
|
+
import { Table } from '@baic/yolk-web';
|
|
4
|
+
|
|
5
|
+
export default () => (
|
|
6
|
+
<Table
|
|
7
|
+
bordered
|
|
8
|
+
dragSort={{
|
|
9
|
+
header: false,
|
|
10
|
+
body: {
|
|
11
|
+
selfDrag: false,
|
|
12
|
+
},
|
|
13
|
+
}}
|
|
14
|
+
columns={[
|
|
15
|
+
{
|
|
16
|
+
title: '排序',
|
|
17
|
+
render: () =>
|
|
18
|
+
Table.createDragSortComponent(
|
|
19
|
+
<MenuOutlined style={{ cursor: 'grab', color: '#999' }} />,
|
|
20
|
+
),
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
dataIndex: 'a',
|
|
24
|
+
title: 'a',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
dataIndex: 'b',
|
|
28
|
+
title: 'b',
|
|
29
|
+
},
|
|
30
|
+
]}
|
|
31
|
+
dataSource={[
|
|
32
|
+
{
|
|
33
|
+
a: '1',
|
|
34
|
+
b: '1',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
a: '2',
|
|
38
|
+
b: '2',
|
|
39
|
+
},
|
|
40
|
+
]}
|
|
41
|
+
/>
|
|
42
|
+
);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button, Divider, Radio } from 'antd';
|
|
3
|
+
import { RadioChangeEvent } from 'antd/es/radio/interface';
|
|
4
|
+
import { Wrapper, WrapperInstance } from '@baic/yolk-web';
|
|
5
|
+
import { Mode } from '@baic/yolk-web/lib/wrapper';
|
|
6
|
+
|
|
7
|
+
export default () => {
|
|
8
|
+
const ref = React.useRef<WrapperInstance>(null);
|
|
9
|
+
const [mode, setMode] = React.useState<Mode>('page');
|
|
10
|
+
const onClickHandler = React.useCallback(() => ref.current?.open(), []);
|
|
11
|
+
const onChangeHandler = React.useCallback(
|
|
12
|
+
(e: RadioChangeEvent) => setMode(e.target.value),
|
|
13
|
+
[],
|
|
14
|
+
);
|
|
15
|
+
return (
|
|
16
|
+
<>
|
|
17
|
+
<Button onClick={onClickHandler}>打开</Button>
|
|
18
|
+
<Divider type="vertical" />
|
|
19
|
+
<Radio.Group onChange={onChangeHandler} defaultValue={mode}>
|
|
20
|
+
<Radio value="modal">Modal模式</Radio>
|
|
21
|
+
<Radio value="page">Page模式</Radio>
|
|
22
|
+
<Radio value="inline">Inline模式</Radio>
|
|
23
|
+
</Radio.Group>
|
|
24
|
+
<Divider />
|
|
25
|
+
<div
|
|
26
|
+
style={{
|
|
27
|
+
position: 'relative',
|
|
28
|
+
overflow: 'hidden',
|
|
29
|
+
width: 500,
|
|
30
|
+
height: 500,
|
|
31
|
+
border: '1px solid #ddd',
|
|
32
|
+
}}
|
|
33
|
+
>
|
|
34
|
+
<Wrapper ref={ref} mode={mode} title="标题">
|
|
35
|
+
这里是内容
|
|
36
|
+
</Wrapper>
|
|
37
|
+
</div>
|
|
38
|
+
</>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
import { Tabs } from 'antd';
|
|
6
|
+
|
|
7
|
+
import BankInput from './examples/BankInput';
|
|
8
|
+
import BarCode from './examples/BarCode';
|
|
9
|
+
import Collapse from './examples/Collapse';
|
|
10
|
+
import DatePicker from './examples/DatePicker';
|
|
11
|
+
import Flex from './examples/Flex';
|
|
12
|
+
import Grid1 from './examples/Grid/1';
|
|
13
|
+
import Grid2 from './examples/Grid/2';
|
|
14
|
+
import Grid3 from './examples/Grid/3';
|
|
15
|
+
import Grid4 from './examples/Grid/4';
|
|
16
|
+
import Grid5 from './examples/Grid/5';
|
|
17
|
+
import Grid6 from './examples/Grid/6';
|
|
18
|
+
import Iconfont from './examples/Iconfont';
|
|
19
|
+
import ImagePreview from './examples/ImagePreview';
|
|
20
|
+
import Input1 from './examples/Input/1';
|
|
21
|
+
import Input2 from './examples/Input/2';
|
|
22
|
+
import LinkButton1 from './examples/LinkButton/1';
|
|
23
|
+
import LinkButton2 from './examples/LinkButton/2';
|
|
24
|
+
import LinkButton3 from './examples/LinkButton/3';
|
|
25
|
+
import Loading from './examples/Loading';
|
|
26
|
+
import MobileInput from './examples/MobileInput';
|
|
27
|
+
import NumberInput from './examples/NumberInput';
|
|
28
|
+
import PagingTable from './examples/PagingTable';
|
|
29
|
+
import QrCode from './examples/QrCode';
|
|
30
|
+
import RangeNumber1 from './examples/RangeNumber/1';
|
|
31
|
+
import RangeNumber2 from './examples/RangeNumber/2';
|
|
32
|
+
import Required from './examples/Required';
|
|
33
|
+
import SearchLayout from './examples/SearchLayout';
|
|
34
|
+
import Table1 from './examples/Table/1';
|
|
35
|
+
import Table2 from './examples/Table/2';
|
|
36
|
+
import Table3 from './examples/Table/3';
|
|
37
|
+
import Table4 from './examples/Table/4';
|
|
38
|
+
import TimerButton from './examples/TimerButton';
|
|
39
|
+
import Title1 from './examples/Title/1';
|
|
40
|
+
import Title2 from './examples/Title/2';
|
|
41
|
+
import usePreload from './examples/usePreload';
|
|
42
|
+
import WaterMark from './examples/WaterMark';
|
|
43
|
+
import Wrapper from './examples/Wrapper';
|
|
44
|
+
|
|
45
|
+
const { TabPane } = Tabs;
|
|
46
|
+
|
|
47
|
+
const tabs: Record<
|
|
48
|
+
string,
|
|
49
|
+
React.FunctionComponent | Record<string, React.FunctionComponent>
|
|
50
|
+
> = {
|
|
51
|
+
BankInput,
|
|
52
|
+
BarCode,
|
|
53
|
+
Collapse,
|
|
54
|
+
DatePicker,
|
|
55
|
+
Flex,
|
|
56
|
+
Grid: {
|
|
57
|
+
Grid1,
|
|
58
|
+
Grid2,
|
|
59
|
+
Grid3,
|
|
60
|
+
Grid4,
|
|
61
|
+
Grid5,
|
|
62
|
+
Grid6,
|
|
63
|
+
},
|
|
64
|
+
Iconfont,
|
|
65
|
+
ImagePreview,
|
|
66
|
+
Input: {
|
|
67
|
+
Input1,
|
|
68
|
+
Input2,
|
|
69
|
+
},
|
|
70
|
+
LinkButton: {
|
|
71
|
+
LinkButton1,
|
|
72
|
+
LinkButton2,
|
|
73
|
+
LinkButton3,
|
|
74
|
+
},
|
|
75
|
+
Loading,
|
|
76
|
+
MobileInput,
|
|
77
|
+
NumberInput,
|
|
78
|
+
PagingTable,
|
|
79
|
+
QrCode,
|
|
80
|
+
RangeNumber: {
|
|
81
|
+
RangeNumber1,
|
|
82
|
+
RangeNumber2,
|
|
83
|
+
},
|
|
84
|
+
Required,
|
|
85
|
+
SearchLayout,
|
|
86
|
+
Table: {
|
|
87
|
+
Table1,
|
|
88
|
+
Table2,
|
|
89
|
+
Table3,
|
|
90
|
+
Table4,
|
|
91
|
+
},
|
|
92
|
+
TimerButton,
|
|
93
|
+
Title: {
|
|
94
|
+
Title1,
|
|
95
|
+
Title2,
|
|
96
|
+
},
|
|
97
|
+
usePreload,
|
|
98
|
+
WaterMark,
|
|
99
|
+
Wrapper,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export default () => {
|
|
103
|
+
const keys = Object.keys(tabs);
|
|
104
|
+
return (
|
|
105
|
+
<Tabs defaultActiveKey={keys[0]}>
|
|
106
|
+
{keys.map(key => {
|
|
107
|
+
const tab = tabs[key];
|
|
108
|
+
if (_.isFunction(tab)) {
|
|
109
|
+
return (
|
|
110
|
+
<TabPane key={key} tab={key}>
|
|
111
|
+
{React.createElement(tab)}
|
|
112
|
+
</TabPane>
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
if (_.isObject(tab)) {
|
|
116
|
+
const keys2 = Object.keys(tab);
|
|
117
|
+
return (
|
|
118
|
+
<TabPane key={key} tab={key}>
|
|
119
|
+
<Tabs defaultActiveKey={keys2[0]}>
|
|
120
|
+
{keys2.map(key2 => {
|
|
121
|
+
const tab2 = tab[key2];
|
|
122
|
+
return (
|
|
123
|
+
<TabPane key={key2} tab={key2}>
|
|
124
|
+
{React.createElement(tab2)}
|
|
125
|
+
</TabPane>
|
|
126
|
+
);
|
|
127
|
+
})}
|
|
128
|
+
</Tabs>
|
|
129
|
+
</TabPane>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
})}
|
|
133
|
+
</Tabs>
|
|
134
|
+
);
|
|
135
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare module '*.png';
|
|
2
|
+
declare module '*.gif';
|
|
3
|
+
declare module '*.jpg';
|
|
4
|
+
declare module '*.jpeg';
|
|
5
|
+
declare module '*.svg' {
|
|
6
|
+
export function ReactComponent(
|
|
7
|
+
props: React.SVGProps<SVGSVGElement>,
|
|
8
|
+
): React.ReactElement;
|
|
9
|
+
const url: string;
|
|
10
|
+
export default url;
|
|
11
|
+
}
|
|
12
|
+
declare module '*.css';
|
|
13
|
+
declare module '*.less';
|
|
14
|
+
declare module '*.scss';
|
|
15
|
+
declare module '*.sass';
|
|
16
|
+
declare module '*.styl';
|