@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,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Grid } from '@baic/yolk-web';
|
|
3
|
+
|
|
4
|
+
export default () => (
|
|
5
|
+
<Grid
|
|
6
|
+
data={[
|
|
7
|
+
{
|
|
8
|
+
label: '标题',
|
|
9
|
+
value: '内容',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
label: '标题',
|
|
13
|
+
value: '内容',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: '标题',
|
|
17
|
+
value: '内容',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
label: '标题',
|
|
21
|
+
value: '内容',
|
|
22
|
+
},
|
|
23
|
+
]}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Grid } from '@baic/yolk-web';
|
|
3
|
+
|
|
4
|
+
export default () => (
|
|
5
|
+
<Grid
|
|
6
|
+
span={2}
|
|
7
|
+
data={[
|
|
8
|
+
{
|
|
9
|
+
label: '标题',
|
|
10
|
+
value: '内容',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: '标题',
|
|
14
|
+
value: '内容',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: '标题',
|
|
18
|
+
value: '内容',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: '标题',
|
|
22
|
+
value: '内容',
|
|
23
|
+
},
|
|
24
|
+
]}
|
|
25
|
+
/>
|
|
26
|
+
);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button, Divider } from 'antd';
|
|
3
|
+
import { Grid } from '@baic/yolk-web';
|
|
4
|
+
|
|
5
|
+
export default () => {
|
|
6
|
+
const [bordered, setBordered] = React.useState(true);
|
|
7
|
+
const onClickHandler = React.useCallback(() => setBordered(!bordered), [
|
|
8
|
+
bordered,
|
|
9
|
+
]);
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<Button onClick={onClickHandler}>{bordered ? '关闭' : '开启'}边框</Button>
|
|
13
|
+
<Divider />
|
|
14
|
+
<Grid
|
|
15
|
+
bordered={bordered}
|
|
16
|
+
data={[
|
|
17
|
+
{
|
|
18
|
+
label: '标题',
|
|
19
|
+
value: '内容',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: '标题',
|
|
23
|
+
value: '内容',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: '标题',
|
|
27
|
+
value: '内容',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: '标题',
|
|
31
|
+
value: '内容',
|
|
32
|
+
},
|
|
33
|
+
]}
|
|
34
|
+
/>
|
|
35
|
+
</>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Radio, Divider } from 'antd';
|
|
3
|
+
import { RadioChangeEvent } from 'antd/es/radio/interface';
|
|
4
|
+
import { Grid, GridProps } from '@baic/yolk-web';
|
|
5
|
+
|
|
6
|
+
export default () => {
|
|
7
|
+
const [size, setSize] = React.useState<GridProps['size']>('middle');
|
|
8
|
+
const onChangeHandler = React.useCallback(
|
|
9
|
+
(e: RadioChangeEvent) => setSize(e.target.value),
|
|
10
|
+
[],
|
|
11
|
+
);
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<Radio.Group value={size} onChange={onChangeHandler}>
|
|
15
|
+
<Radio.Button value="small">small</Radio.Button>
|
|
16
|
+
<Radio.Button value="middle">middle</Radio.Button>
|
|
17
|
+
<Radio.Button value="large">large</Radio.Button>
|
|
18
|
+
</Radio.Group>
|
|
19
|
+
<Divider />
|
|
20
|
+
<Grid
|
|
21
|
+
size={size}
|
|
22
|
+
data={[
|
|
23
|
+
{
|
|
24
|
+
label: '标题',
|
|
25
|
+
value: '内容',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: '标题',
|
|
29
|
+
value: '内容',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: '标题',
|
|
33
|
+
value: '内容',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: '标题',
|
|
37
|
+
value: '内容',
|
|
38
|
+
},
|
|
39
|
+
]}
|
|
40
|
+
/>
|
|
41
|
+
</>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Form } from 'antd';
|
|
3
|
+
import { Grid, Input, useForm } from '@baic/yolk-web';
|
|
4
|
+
|
|
5
|
+
export default () => {
|
|
6
|
+
const [form] = useForm();
|
|
7
|
+
const { createFormItem } = form;
|
|
8
|
+
return (
|
|
9
|
+
<Form form={form}>
|
|
10
|
+
<Grid
|
|
11
|
+
data={[
|
|
12
|
+
{
|
|
13
|
+
label: '标题',
|
|
14
|
+
value: createFormItem({
|
|
15
|
+
name: 'content',
|
|
16
|
+
rules: 'required',
|
|
17
|
+
})(<Input />),
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: '标题',
|
|
22
|
+
value: '内容',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
label: '标题',
|
|
26
|
+
value: '内容',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: '标题',
|
|
30
|
+
value: '内容',
|
|
31
|
+
},
|
|
32
|
+
]}
|
|
33
|
+
/>
|
|
34
|
+
</Form>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Grid } from '@baic/yolk-web';
|
|
3
|
+
|
|
4
|
+
export default () => (
|
|
5
|
+
<Grid
|
|
6
|
+
bordered={false}
|
|
7
|
+
itemDirection="vertical"
|
|
8
|
+
data={[
|
|
9
|
+
{
|
|
10
|
+
label: '标题',
|
|
11
|
+
value: '内容',
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
label: '标题',
|
|
16
|
+
value: '内容',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: '标题',
|
|
20
|
+
value: '内容',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: '标题',
|
|
24
|
+
value: '内容',
|
|
25
|
+
},
|
|
26
|
+
]}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Provider, Iconfont } from '@baic/yolk-web';
|
|
3
|
+
|
|
4
|
+
export default () => {
|
|
5
|
+
return (
|
|
6
|
+
<Provider
|
|
7
|
+
iconfontScriptUrl={[
|
|
8
|
+
'//at.alicdn.com/t/font_1788044_0dwu4guekcwr.js',
|
|
9
|
+
'//at.alicdn.com/t/font_1788592_a5xf2bdic3u.js',
|
|
10
|
+
]}
|
|
11
|
+
>
|
|
12
|
+
<Iconfont type="icon-javascript" />
|
|
13
|
+
<Iconfont type="icon-java" />
|
|
14
|
+
<Iconfont type="icon-shoppingcart" />
|
|
15
|
+
<Iconfont type="icon-python" />
|
|
16
|
+
</Provider>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button } from 'antd';
|
|
3
|
+
import { ImagePreview } from '@baic/yolk-web';
|
|
4
|
+
|
|
5
|
+
export default () => {
|
|
6
|
+
const [visible, setVisible] = React.useState(false);
|
|
7
|
+
const onClickHandler = React.useCallback(() => setVisible(true), []);
|
|
8
|
+
const onCloseHandler = React.useCallback(() => setVisible(false), []);
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<Button onClick={onClickHandler}>预览图片</Button>
|
|
12
|
+
<ImagePreview
|
|
13
|
+
visible={visible}
|
|
14
|
+
onClose={onCloseHandler}
|
|
15
|
+
urls={['https://avatars.githubusercontent.com/u/1750965']}
|
|
16
|
+
current="https://avatars.githubusercontent.com/u/1750965"
|
|
17
|
+
/>
|
|
18
|
+
</>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Form, Button, Divider } from 'antd';
|
|
3
|
+
import { useForm } from '@baic/yolk-web';
|
|
4
|
+
import {
|
|
5
|
+
Config,
|
|
6
|
+
Input,
|
|
7
|
+
NumberInput,
|
|
8
|
+
MobileInput,
|
|
9
|
+
BankInput,
|
|
10
|
+
Grid,
|
|
11
|
+
} from '@baic/yolk-web';
|
|
12
|
+
|
|
13
|
+
export default () => {
|
|
14
|
+
const [form] = useForm();
|
|
15
|
+
const { createFormItem, setFieldsValue, resetFields } = form;
|
|
16
|
+
const [edit, setEdit] = React.useState(true);
|
|
17
|
+
const onClickHandler = React.useCallback(() => {
|
|
18
|
+
if (edit) {
|
|
19
|
+
setEdit(false);
|
|
20
|
+
setFieldsValue({
|
|
21
|
+
grid_name: '某某',
|
|
22
|
+
grid_age: 18,
|
|
23
|
+
grid_mobile: '13000000000',
|
|
24
|
+
grid_bankNumber: '0000000000000000',
|
|
25
|
+
});
|
|
26
|
+
} else {
|
|
27
|
+
setEdit(true);
|
|
28
|
+
resetFields();
|
|
29
|
+
}
|
|
30
|
+
}, [edit, setFieldsValue, resetFields]);
|
|
31
|
+
return (
|
|
32
|
+
<>
|
|
33
|
+
<Button onClick={onClickHandler}>{edit ? '详情' : '编辑'}</Button>
|
|
34
|
+
<Divider />
|
|
35
|
+
<Config edit={edit}>
|
|
36
|
+
<Form form={form}>
|
|
37
|
+
<Grid
|
|
38
|
+
data={[
|
|
39
|
+
{
|
|
40
|
+
label: '姓名',
|
|
41
|
+
value: createFormItem({
|
|
42
|
+
name: 'grid_name',
|
|
43
|
+
rules: 'required',
|
|
44
|
+
})(<Input />),
|
|
45
|
+
required: edit,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: '年龄',
|
|
49
|
+
value: createFormItem({
|
|
50
|
+
name: 'grid_age',
|
|
51
|
+
rules: 'required',
|
|
52
|
+
})(<NumberInput maxLength={3} />),
|
|
53
|
+
required: edit,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
label: '电话号码',
|
|
57
|
+
value: createFormItem({
|
|
58
|
+
name: 'grid_mobile',
|
|
59
|
+
rules: {
|
|
60
|
+
required: true,
|
|
61
|
+
mobile: true,
|
|
62
|
+
},
|
|
63
|
+
})(<MobileInput />),
|
|
64
|
+
required: edit,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: '银行卡号',
|
|
68
|
+
value: createFormItem({
|
|
69
|
+
name: 'grid_bankNumber',
|
|
70
|
+
rules: 'required',
|
|
71
|
+
})(<BankInput />),
|
|
72
|
+
required: edit,
|
|
73
|
+
},
|
|
74
|
+
]}
|
|
75
|
+
/>
|
|
76
|
+
</Form>
|
|
77
|
+
</Config>
|
|
78
|
+
</>
|
|
79
|
+
);
|
|
80
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LinkButton } from '@baic/yolk-web';
|
|
3
|
+
|
|
4
|
+
export default () => (
|
|
5
|
+
<LinkButton.Group>
|
|
6
|
+
<LinkButton onClick={() => {}}>编辑</LinkButton>
|
|
7
|
+
<LinkButton.Merge>
|
|
8
|
+
<LinkButton onClick={() => {}}>修改</LinkButton>
|
|
9
|
+
<LinkButton>删除</LinkButton>
|
|
10
|
+
</LinkButton.Merge>
|
|
11
|
+
</LinkButton.Group>
|
|
12
|
+
);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PagingTable, Input } from '@baic/yolk-web';
|
|
3
|
+
|
|
4
|
+
export default () => {
|
|
5
|
+
return (
|
|
6
|
+
<PagingTable
|
|
7
|
+
url=""
|
|
8
|
+
columns={[
|
|
9
|
+
{
|
|
10
|
+
dataIndex: 'name',
|
|
11
|
+
title: 'name',
|
|
12
|
+
},
|
|
13
|
+
]}
|
|
14
|
+
search={({ createFormItem }) => [
|
|
15
|
+
createFormItem({
|
|
16
|
+
name: 'Input',
|
|
17
|
+
})(<Input />),
|
|
18
|
+
]}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Form } from 'antd';
|
|
3
|
+
import { RangeNumber, useForm } from '@baic/yolk-web';
|
|
4
|
+
|
|
5
|
+
export default () => {
|
|
6
|
+
const [form] = useForm();
|
|
7
|
+
const { createFormItem } = form;
|
|
8
|
+
return (
|
|
9
|
+
<Form form={form}>
|
|
10
|
+
{createFormItem({
|
|
11
|
+
name: 'RangeNumber',
|
|
12
|
+
})(<RangeNumber />)}
|
|
13
|
+
</Form>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Form } from 'antd';
|
|
3
|
+
import { useForm } from '@baic/yolk-web';
|
|
4
|
+
import {
|
|
5
|
+
SearchLayout,
|
|
6
|
+
Input,
|
|
7
|
+
NumberInput,
|
|
8
|
+
MobileInput,
|
|
9
|
+
BankInput,
|
|
10
|
+
} from '@baic/yolk-web';
|
|
11
|
+
|
|
12
|
+
export default () => {
|
|
13
|
+
const [form] = useForm();
|
|
14
|
+
const { createFormItem } = form;
|
|
15
|
+
return (
|
|
16
|
+
<Form form={form}>
|
|
17
|
+
<SearchLayout
|
|
18
|
+
data={[
|
|
19
|
+
createFormItem({
|
|
20
|
+
name: 'name',
|
|
21
|
+
label: '姓名',
|
|
22
|
+
rules: 'required',
|
|
23
|
+
})(<Input />),
|
|
24
|
+
createFormItem({
|
|
25
|
+
name: 'age',
|
|
26
|
+
label: '年龄',
|
|
27
|
+
rules: 'required',
|
|
28
|
+
})(<NumberInput maxLength={3} />),
|
|
29
|
+
createFormItem({
|
|
30
|
+
name: 'mobile',
|
|
31
|
+
label: '电话号码',
|
|
32
|
+
rules: {
|
|
33
|
+
required: true,
|
|
34
|
+
mobile: true,
|
|
35
|
+
},
|
|
36
|
+
})(<MobileInput />),
|
|
37
|
+
createFormItem({
|
|
38
|
+
name: 'bankNumber',
|
|
39
|
+
label: '银行卡号',
|
|
40
|
+
rules: 'required',
|
|
41
|
+
})(<BankInput />),
|
|
42
|
+
]}
|
|
43
|
+
/>
|
|
44
|
+
</Form>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Table } from '@baic/yolk-web';
|
|
3
|
+
|
|
4
|
+
export default () => (
|
|
5
|
+
<Table
|
|
6
|
+
columns={[
|
|
7
|
+
{
|
|
8
|
+
dataIndex: 'a',
|
|
9
|
+
title: 'a',
|
|
10
|
+
formatter: v => v,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
dataIndex: 'b',
|
|
14
|
+
title: 'b',
|
|
15
|
+
ellipsis: true,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
dataIndex: 'b',
|
|
19
|
+
title: 'b',
|
|
20
|
+
ellipsis: 5,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
dataIndex: 'b',
|
|
24
|
+
title: 'b',
|
|
25
|
+
ellipsis: () => '123',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
dataIndex: 'a',
|
|
29
|
+
title: 'a',
|
|
30
|
+
fontWeight: 'bold',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
dataIndex: 'a',
|
|
34
|
+
title: 'a',
|
|
35
|
+
unit: '元',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
dataIndex: 'a',
|
|
39
|
+
title: 'a',
|
|
40
|
+
tag: true,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
dataIndex: 'a',
|
|
44
|
+
title: 'a',
|
|
45
|
+
tag: {
|
|
46
|
+
color: 'red',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
dataIndex: 'a',
|
|
51
|
+
title: 'a',
|
|
52
|
+
tag: 'red',
|
|
53
|
+
},
|
|
54
|
+
]}
|
|
55
|
+
dataSource={[
|
|
56
|
+
{
|
|
57
|
+
a: '1',
|
|
58
|
+
b: '124125125151251251515125',
|
|
59
|
+
c: true,
|
|
60
|
+
d: null,
|
|
61
|
+
},
|
|
62
|
+
]}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Table } from '@baic/yolk-web';
|
|
3
|
+
|
|
4
|
+
export default () => (
|
|
5
|
+
<Table
|
|
6
|
+
bordered
|
|
7
|
+
dragSort
|
|
8
|
+
columns={[
|
|
9
|
+
{
|
|
10
|
+
dataIndex: 'a',
|
|
11
|
+
title: 'a',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
dataIndex: 'b',
|
|
15
|
+
title: 'b',
|
|
16
|
+
},
|
|
17
|
+
]}
|
|
18
|
+
dataSource={[
|
|
19
|
+
{
|
|
20
|
+
a: '1',
|
|
21
|
+
b: '1',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
a: '2',
|
|
25
|
+
b: '2',
|
|
26
|
+
},
|
|
27
|
+
]}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { message } from 'antd';
|
|
3
|
+
import { Table } from '@baic/yolk-web';
|
|
4
|
+
|
|
5
|
+
export default () => (
|
|
6
|
+
<Table
|
|
7
|
+
bordered
|
|
8
|
+
dragSort={{
|
|
9
|
+
header: {
|
|
10
|
+
onSortEnd: ({ oldIndex, newIndex }) =>
|
|
11
|
+
message.success(`排序结束, 从${oldIndex}到${newIndex}`),
|
|
12
|
+
},
|
|
13
|
+
body: {
|
|
14
|
+
onSortEnd: ({ oldIndex, newIndex }) =>
|
|
15
|
+
message.success(`排序结束, 从${oldIndex}到${newIndex}`),
|
|
16
|
+
},
|
|
17
|
+
}}
|
|
18
|
+
columns={[
|
|
19
|
+
{
|
|
20
|
+
dataIndex: 'a',
|
|
21
|
+
title: 'a',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
dataIndex: 'b',
|
|
25
|
+
title: 'b',
|
|
26
|
+
},
|
|
27
|
+
]}
|
|
28
|
+
dataSource={[
|
|
29
|
+
{
|
|
30
|
+
a: '1',
|
|
31
|
+
b: '1',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
a: '2',
|
|
35
|
+
b: '2',
|
|
36
|
+
},
|
|
37
|
+
]}
|
|
38
|
+
/>
|
|
39
|
+
);
|