Skip to content

Commit 34a6e60

Browse files
author
tangtanglove
committed
优化代码
1 parent 5b6d209 commit 34a6e60

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

package.json

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@
4545
],
4646
"dependencies": {
4747
"@ant-design/icons": "^4.0.0",
48-
"@ant-design/pro-card": "^1.4.1",
49-
"@ant-design/pro-descriptions": "^1.0.26",
50-
"@ant-design/pro-layout": "^6.5.8",
51-
"@ant-design/pro-table": "^2.9.9",
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",
5253
"@tinymce/tinymce-react": "^3.8.1",
53-
"antd": "^4.7.2",
54+
"antd": "^4.7.3",
5455
"classnames": "^2.2.6",
5556
"lodash": "^4.17.11",
5657
"moment": "^2.29.1",
@@ -68,37 +69,37 @@
6869
},
6970
"devDependencies": {
7071
"@ant-design/pro-cli": "^2.0.2",
71-
"@types/classnames": "^2.2.7",
72+
"@types/classnames": "^2.2.11",
7273
"@types/express": "^4.17.8",
7374
"@types/history": "^4.7.8",
7475
"@types/jest": "^26.0.15",
75-
"@types/lodash": "^4.14.162",
76+
"@types/lodash": "^4.14.163",
7677
"@types/qs": "^6.9.5",
77-
"@types/react": "^16.9.53",
78-
"@types/react-dom": "^16.8.4",
78+
"@types/react": "^16.9.55",
79+
"@types/react-dom": "^16.9.9",
7980
"@types/react-helmet": "^5.0.13",
8081
"@umijs/fabric": "^2.3.1",
8182
"@umijs/plugin-blocks": "^2.0.5",
8283
"@umijs/plugin-esbuild": "^1.0.0-beta.2",
8384
"@umijs/preset-ant-design-pro": "^1.3.0",
84-
"@umijs/preset-react": "^1.6.14",
85+
"@umijs/preset-react": "^1.6.16",
8586
"@umijs/preset-ui": "^2.2.8",
8687
"@umijs/yorkie": "^2.0.3",
8788
"carlo": "^0.9.46",
8889
"cross-env": "^7.0.0",
8990
"cross-port-killer": "^1.1.1",
9091
"detect-installer": "^1.0.1",
9192
"enzyme": "^3.11.0",
92-
"eslint": "^7.11.0",
93+
"eslint": "^7.12.1",
9394
"express": "^4.17.1",
9495
"gh-pages": "^3.0.0",
9596
"husky": "^4.3.0",
9697
"jsdom-global": "^3.0.2",
97-
"lint-staged": "^10.4.2",
98+
"lint-staged": "^10.5.0",
9899
"mockjs": "^1.0.1-beta3",
99100
"prettier": "^2.1.2",
100101
"pro-download": "1.0.1",
101-
"puppeteer-core": "^5.3.1",
102+
"puppeteer-core": "^5.4.1",
102103
"stylelint": "^13.7.2"
103104
},
104105
"engines": {

src/pages/Quark/components/Form.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const Form: React.FC<Form> = (props:any) => {
6262
layout={props.form.layout}
6363
labelCol={props.form.labelCol}
6464
wrapperCol={props.form.wrapperCol}
65+
dateFormatter={props.form.dateFormatter}
6566
>
6667
<FormItem form={form} items={props.form.items} />
6768
</ProForm>
@@ -84,6 +85,7 @@ const Form: React.FC<Form> = (props:any) => {
8485
layout={props.form.layout}
8586
labelCol={props.form.labelCol}
8687
wrapperCol={props.form.wrapperCol}
88+
dateFormatter={props.form.dateFormatter}
8789
>
8890
<FormItem form={form} items={props.form.items} />
8991
</ProForm>

src/pages/Quark/components/FormItem.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ const FormItem: React.FC<FormItem> = (props:any) => {
179179
help={item.help ? item.help : undefined}
180180
extra={item.extra}
181181
>
182-
<Select style={item.style ? item.style : []} disabled={item.disabled}>
182+
<Select style={item.style ? item.style : []} disabled={item.disabled} placeholder={item.placeholder}>
183183
<Select.Option key={0} value={0}>
184184
无图标
185185
</Select.Option>
@@ -325,6 +325,7 @@ const FormItem: React.FC<FormItem> = (props:any) => {
325325
help={item.help ? item.help : undefined}
326326
>
327327
<Select
328+
placeholder={item.placeholder}
328329
style={item.style ? item.style : []}
329330
options={item.options}
330331
disabled={item.disabled}
@@ -547,6 +548,7 @@ const FormItem: React.FC<FormItem> = (props:any) => {
547548
style={item.style}
548549
options={item.options}
549550
api={item.api}
551+
allowClear={item.allowClear}
550552
/>
551553
</Form.Item>;
552554
break;

src/pages/Quark/components/Search.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ export interface Search {
1010
placeholder?:any;
1111
style?:any;
1212
options?:any;
13+
allowClear?:any;
1314
onChange?:(value: any) => void;
1415
}
1516

16-
const Search: React.FC<Search> = ({ api=null, mode=undefined, size=undefined, value=null, placeholder=null, style=[], options=[], onChange }) => {
17+
const Search: React.FC<Search> = ({ api=null, mode=undefined, size=undefined, value=null, placeholder=null, style=[], options=[],allowClear=false, onChange }) => {
1718
const [selectOptions, setSelectOptions] = useState(undefined);
1819

1920
const triggerChange = (changedValue:any) => {
@@ -57,6 +58,7 @@ const Search: React.FC<Search> = ({ api=null, mode=undefined, size=undefined, va
5758
onSearch={(value: any) => onInputSearch(value)}
5859
placeholder={placeholder}
5960
style={style}
61+
allowClear={allowClear}
6062
onChange={onSelectChange}
6163
>
6264
{!!getSelectOptions &&

0 commit comments

Comments
 (0)