import * as React from 'react'; import { DispatchProp } from 'react-redux'; import { store, State } from './App.store'; import './App.style.css'; import { makeContainer, Input, RadioGroup, Checkbox, Select, Bind, makeBindable } from '../../pastate'; import { Rate, Checkbox as AntdCheckbox } from 'antd'; // 类型传递? let MyRate = makeBindable(Rate) let MyAntdCheckbox = makeBindable(AntdCheckbox, 'checked') const options1 = ["o1", "o2", "o3"] const options2 = [ { value: "o1", tag: 'o1 tag', disabled: false }, { value: "o2", tag: 'o2 tag' }, { value: "o3", tag: 'o3 tag' } ] const options3 = [ { value: "DEFAULT", tag: '请选择', disabled: true }, { value: "o1", tag: 'o1 tag'}, { value: "o2", tag: 'o2 tag'}, { value: "o3", tag: 'o3 tag'} ] const option_number = [2, 4, 6] const option_number_object = [{ value: 2, tag: '2岁' }, { value: 4, tag: '4岁' }, { value: 6, tag: '6岁' }] const option_boolean = [true, false] const option_boolean_object = [{ value: true, tag: '男' }, { value: false, tag: '女' }] class App extends React.PureComponent<{ state: State } & DispatchProp> { handleTextBeforeChange(newValue: string, oldValue: string): string { return newValue; } handleTextAfterChange(newValue: string) { console.log('handleTextAfterChange', newValue) } handleCheckboxAfterChange(newValue: boolean) { console.log('handleCheckboxAfterChange', newValue); } handleRadioboxAfterChange(newValue: string) { console.log('handleRadioboxAfterChange', newValue); } handleSelectboxAfterChange(newValue: string) { console.log('handleSelectboxAfterChange', newValue); } render() { let state = this.props.state; let actions = store.actions; return (
名字:{state.basicInfo.name}
年龄:{state.basicInfo.age}
性别:{state.basicInfo.isMale == true ? '男' : '女'}
宠物:
{state.pets.map((pet, index) => ( ))}
性别男: