Skip to content

Typescript中怎样调用FormModel的resetFields方法? #2712

@wgf4242

Description

@wgf4242
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.6.4

Environment

win10x64, "vue": "^2.6.11",

Steps to reproduce

1.不会初始化赋值
2.希望能提示自定义的接口,比如下面的record

<a-form-model layout="inline" :model="formInline">


import {record} from "@/_models/models";
import {FormModel} from 'ant-design-vue'

formInline: FormModel & recrod = {}}; // 报错

怎么做呢?

What is expected?

。。。

What is actually happening?

不会初始化赋值
TS2322: Type '{}' is not assignable to type 'FormModel & record'.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions