Skip to content

Commit 7b5c938

Browse files
author
tangtanglove
committed
新增 Time 组件
1 parent 68879c3 commit 7b5c938

File tree

2 files changed

+31
-13
lines changed

2 files changed

+31
-13
lines changed

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545
],
4646
"dependencies": {
4747
"@ant-design/icons": "^4.0.0",
48-
"@ant-design/pro-card": "^1.4.3",
49-
"@ant-design/pro-descriptions": "^1.0.29",
50-
"@ant-design/pro-form": "^1.1.6",
51-
"@ant-design/pro-layout": "^6.5.10",
52-
"@ant-design/pro-table": "^2.9.13",
48+
"@ant-design/pro-card": "^1.4.6",
49+
"@ant-design/pro-descriptions": "^1.0.33",
50+
"@ant-design/pro-form": "^1.4.1",
51+
"@ant-design/pro-layout": "^6.5.14",
52+
"@ant-design/pro-table": "^2.10.1",
5353
"@tinymce/tinymce-react": "^3.8.1",
54-
"antd": "^4.7.3",
54+
"antd": "^4.8.2",
5555
"classnames": "^2.2.6",
5656
"lodash": "^4.17.11",
5757
"moment": "^2.29.1",
@@ -63,39 +63,39 @@
6363
"react-amap-plugin-autocomplete": "0.0.4",
6464
"react-dom": "^16.8.6",
6565
"react-helmet-async": "^1.0.7",
66-
"umi": "^3.2.24",
66+
"umi": "^3.2.27",
6767
"umi-request": "^1.0.8",
6868
"use-merge-value": "^1.0.1"
6969
},
7070
"devDependencies": {
7171
"@ant-design/pro-cli": "^2.0.2",
7272
"@types/classnames": "^2.2.11",
73-
"@types/express": "^4.17.8",
73+
"@types/express": "^4.17.9",
7474
"@types/history": "^4.7.8",
7575
"@types/jest": "^26.0.15",
76-
"@types/lodash": "^4.14.163",
76+
"@types/lodash": "^4.14.165",
7777
"@types/qs": "^6.9.5",
78-
"@types/react": "^16.9.55",
78+
"@types/react": "^16.9.56",
7979
"@types/react-dom": "^16.9.9",
8080
"@types/react-helmet": "^5.0.13",
8181
"@umijs/fabric": "^2.3.1",
8282
"@umijs/plugin-blocks": "^2.0.5",
8383
"@umijs/plugin-esbuild": "^1.0.0-beta.2",
8484
"@umijs/preset-ant-design-pro": "^1.3.0",
85-
"@umijs/preset-react": "^1.6.16",
85+
"@umijs/preset-react": "^1.6.19",
8686
"@umijs/preset-ui": "^2.2.8",
8787
"@umijs/yorkie": "^2.0.3",
8888
"carlo": "^0.9.46",
8989
"cross-env": "^7.0.0",
9090
"cross-port-killer": "^1.1.1",
9191
"detect-installer": "^1.0.1",
9292
"enzyme": "^3.11.0",
93-
"eslint": "^7.12.1",
93+
"eslint": "^7.13.0",
9494
"express": "^4.17.1",
9595
"gh-pages": "^3.0.0",
9696
"husky": "^4.3.0",
9797
"jsdom-global": "^3.0.2",
98-
"lint-staged": "^10.5.0",
98+
"lint-staged": "^10.5.1",
9999
"mockjs": "^1.0.1-beta3",
100100
"prettier": "^2.1.2",
101101
"pro-download": "1.0.1",

src/pages/Quark/components/FormItem.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,24 @@ const FormItem: React.FC<FormItem> = (props:any) => {
443443
}}
444444
/>;
445445
break;
446+
case 'time':
447+
component =
448+
<Form.Item
449+
key={item.key}
450+
label={item.label}
451+
name={field ? [field.name, item.name] : item.name}
452+
fieldKey={field ? [field.fieldKey, item.name] : item.name}
453+
rules={item.frontendRules}
454+
help={item.help ? item.help : undefined}
455+
extra={item.extra}
456+
>
457+
<TimePicker
458+
size={item.size}
459+
locale={locale}
460+
format={item.format}
461+
/>
462+
</Form.Item>;
463+
break;
446464
case 'timeRange':
447465
component =
448466
<Form.Item

0 commit comments

Comments
 (0)