-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.tsx
43 lines (40 loc) · 1.11 KB
/
demo.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import React, { useEffect, useState } from 'react'
import { List, InputItem, Button } from 'antd-mobile';
import { DatePicker } from 'antd';
import '@css/login.less'
export default (): JSX.Element => {
const [formValues, setFormValues] = useState({
name: '',
});
const updateFormValues = (values: any) => {
setFormValues((state) => {
return {
...state,
...values,
};
});
};
return (
<div className="login_container animated fadeIn">
<div className="login_main">
<div className="login_form">
<h3>登录</h3>
{/* TODO:触发的时候报错:ReferenceError: module is not defined */}
<DatePicker placeholder="请选择日期" />
{/* TODO:报错如图:vendor.dc84d456.js:27 ReferenceError: require is not defined(已解决,请看issue) */}
<List>
<InputItem
clear
value={formValues.name}
placeholder="请输入名字"
onChange={(value) => updateFormValues({ name: value })}
className="input"
>
<span className="info">名字</span>
</InputItem>
</List>
</div>
</div>
</div>
)
}