Commit dbca0b41 authored by 陈帅's avatar 陈帅

use new from tpye

parent 293ea3d5
{
"extends": ["stylelint-config-standard", "stylelint-config-prettier"],
"extends": [
"stylelint-config-standard",
"stylelint-config-prettier"
],
"rules": {
"declaration-empty-line-before": null,
"no-descending-specificity": null,
"selector-pseudo-class-no-unknown": null,
"selector-pseudo-element-colon-notation": null
}
}
}
\ No newline at end of file
......@@ -206,4 +206,4 @@ class BaseView extends Component<BaseViewProps> {
}
}
export default Form.create()(BaseView);
export default Form.create<BaseViewProps>()(BaseView);
......@@ -330,4 +330,4 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component<PAGE_NAME_UPPER_CAMEL_CASEPro
}
}
export default Form.create()(PAGE_NAME_UPPER_CAMEL_CASE);
export default Form.create<PAGE_NAME_UPPER_CAMEL_CASEProps>()(PAGE_NAME_UPPER_CAMEL_CASE);
......@@ -253,4 +253,4 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component<PAGE_NAME_UPPER_CAMEL_CASEPro
}
}
export default Form.create()(PAGE_NAME_UPPER_CAMEL_CASE);
export default Form.create<PAGE_NAME_UPPER_CAMEL_CASEProps>()(PAGE_NAME_UPPER_CAMEL_CASE);
......@@ -377,4 +377,4 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component<
}
}
export default Form.create()(PAGE_NAME_UPPER_CAMEL_CASE);
export default Form.create<PAGE_NAME_UPPER_CAMEL_CASEProps>()(PAGE_NAME_UPPER_CAMEL_CASE);
......@@ -173,7 +173,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component<PAGE_NAME_UPPER_CAMEL_CASEPro
}
}
const WarpForm = Form.create({
const WarpForm = Form.create<PAGE_NAME_UPPER_CAMEL_CASEProps>({
onValuesChange({ dispatch }: PAGE_NAME_UPPER_CAMEL_CASEProps, changedValues, allValues) {
// 表单项变化时请求数据
// 模拟查询表单生效
......
......@@ -234,7 +234,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component<PAGE_NAME_UPPER_CAMEL_CASEPro
}
}
const WarpForm = Form.create({
const WarpForm = Form.create<PAGE_NAME_UPPER_CAMEL_CASEProps>({
onValuesChange({ dispatch }: PAGE_NAME_UPPER_CAMEL_CASEProps, changedValues, allValues) {
// 表单项变化时请求数据
// 模拟查询表单生效
......
......@@ -142,7 +142,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component<PAGE_NAME_UPPER_CAMEL_CASEPro
}
}
const WarpForm = Form.create({
const WarpForm = Form.create<PAGE_NAME_UPPER_CAMEL_CASEProps>({
onValuesChange({ dispatch }: PAGE_NAME_UPPER_CAMEL_CASEProps, changedValues, allValues) {
// 表单项变化时请求数据
// 模拟查询表单生效
......
......@@ -478,4 +478,4 @@ class TableList extends Component<TableListProps, TableListState> {
}
}
export default Form.create()(TableList);
export default Form.create<TableListProps>()(TableList);
......@@ -146,8 +146,9 @@ class Login extends Component<LoginProps, LoginState> {
);
}
}
(Object.keys(LoginItem) as Array<keyof LoginItemType>).forEach(item => {
Login[item] = LoginItem[item];
});
export default (Form.create()(Login as any) as unknown) as typeof Login;
export default Form.create<Partial<LoginProps>>()(Login);
......@@ -9,6 +9,7 @@ import { Dispatch } from 'redux';
import { IStateType } from './model';
import { FormComponentProps } from 'antd/lib/form';
import { CheckboxChangeEvent } from 'antd/lib/checkbox';
const { Tab, UserName, Password, Mobile, Captcha, Submit } = Login;
interface BLOCK_NAME_CAMEL_CASEProps {
......
......@@ -366,4 +366,4 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component<
}
}
export default Form.create()(PAGE_NAME_UPPER_CAMEL_CASE);
export default Form.create<BLOCK_NAME_CAMEL_CASEProps>()(PAGE_NAME_UPPER_CAMEL_CASE);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment