|
@@ -2,6 +2,8 @@ import React, { useState } from 'react';
|
2
|
2
|
import { Form, Input, Button, Icon, Select, Tabs, Radio } from 'antd';
|
3
|
3
|
import { FormattedMessage } from 'umi-plugin-react/locale';
|
4
|
4
|
import styles from '../style/GoodsList.less';
|
|
5
|
+import XForm, { FieldTypes } from '../../components/XForm';
|
|
6
|
+import Wangedit from '../../components/Wangedit/Wangedit'
|
5
|
7
|
|
6
|
8
|
/**
|
7
|
9
|
*
|
|
@@ -15,7 +17,64 @@ import styles from '../style/GoodsList.less';
|
15
|
17
|
console.log(dynamicId)
|
16
|
18
|
|
17
|
19
|
const Basic = (props) => {
|
18
|
|
- return <div>Basic</div>
|
|
20
|
+ const fields = [
|
|
21
|
+ {
|
|
22
|
+ label: '所属项目',
|
|
23
|
+ name: 'org_id',
|
|
24
|
+ type: FieldTypes.Text
|
|
25
|
+ },
|
|
26
|
+ {
|
|
27
|
+ label: '主图',
|
|
28
|
+ name: 'city_id',
|
|
29
|
+ type: FieldTypes.ImageUploader,
|
|
30
|
+ },
|
|
31
|
+ {
|
|
32
|
+ label: '活动标题',
|
|
33
|
+ name: 'share_num',
|
|
34
|
+ type: FieldTypes.Text,
|
|
35
|
+ placeholder: '不填, 默认使用手机号'
|
|
36
|
+ },
|
|
37
|
+ {
|
|
38
|
+ label: '活动时间',
|
|
39
|
+ name: 'save_num',
|
|
40
|
+ type: FieldTypes.Text,
|
|
41
|
+ rules: [
|
|
42
|
+ {required: true, message: '请填写手机号'}
|
|
43
|
+ ]
|
|
44
|
+ },
|
|
45
|
+ {
|
|
46
|
+ label: '活动地点',
|
|
47
|
+ name: 'pv_num',
|
|
48
|
+ type: FieldTypes.ImageUploader,
|
|
49
|
+ extra: '建议图片大小 128 * 128'
|
|
50
|
+ },
|
|
51
|
+ {
|
|
52
|
+ label: '活动人数',
|
|
53
|
+ name: 'favor_num',
|
|
54
|
+ type: FieldTypes.DatePicker,
|
|
55
|
+ },
|
|
56
|
+ {
|
|
57
|
+ label: '活动详情',
|
|
58
|
+ name: 'expDate',
|
|
59
|
+ render: <Wangedit />,
|
|
60
|
+ value: "222222",
|
|
61
|
+ },
|
|
62
|
+ {
|
|
63
|
+ label: '是否需要报名',
|
|
64
|
+ name: 'volume_rate',
|
|
65
|
+ type: FieldTypes.DatePicker,
|
|
66
|
+ },
|
|
67
|
+ {
|
|
68
|
+ label: '报名时间',
|
|
69
|
+ name: 'parking_rate',
|
|
70
|
+ type: FieldTypes.DatePicker,
|
|
71
|
+ },
|
|
72
|
+ ]
|
|
73
|
+
|
|
74
|
+ const handleSubmit = val => {
|
|
75
|
+ window.console.log('submit data --->', val)
|
|
76
|
+ }
|
|
77
|
+ return <XForm onSubmit={handleSubmit} fields={fields}></XForm>
|
19
|
78
|
}
|
20
|
79
|
|
21
|
80
|
const Poster = (props) => {
|