Compare commits

..

No commits in common. "098ddd3c1397b7f2ce2166c4f782f0833c2c9d4f" and "349f125404af22ab3927d39abf62aa8739441a3d" have entirely different histories.

1 changed files with 3 additions and 53 deletions

View File

@ -1,60 +1,10 @@
import { View } from '@tarojs/components';
import { Component, ReactNode } from 'react';
import { AtForm, AtInput, AtButton } from 'taro-ui';
import Taro from '@tarojs/taro';
import './inform.scss';
export default class InformPage extends Component {
state = {
phone: '',
name: '',
};
handleChangePhone(phone: string) {
this.setState({
phone: phone,
});
return phone;
}
handleChangeName(name: string) {
this.setState({
name: name,
});
return name;
}
onSubmit() {
console.log(this.state.name, this.state.phone);
}
onReset() {
this.setState({
phone: '',
name: '',
});
}
render(): ReactNode {
return (
<AtForm
onSubmit={this.onSubmit.bind(this)}
onReset={this.onReset.bind(this)}
>
<AtInput
name='phone'
title='手机号码'
type='text'
placeholder='便于查询工单'
value={this.state.phone}
onChange={this.handleChangePhone.bind(this)}
/>
<AtInput
required
name='name'
title='真实姓名'
type='text'
placeholder='必填,与工单绑定'
value={this.state.name}
onChange={this.handleChangeName.bind(this)}
/>
<AtButton formType='submit'></AtButton>
<AtButton formType='reset'></AtButton>
</AtForm>
);
return <View></View>;
}
}