Skip to content

When using ts packaging in vite, an error will be reported, and a type error of cascader causes the packaging to fail #3943

@Gitpingping

Description

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

Version

2.1.1

Environment

vue3.0.5 antd2.1.2 vite2.1.5

Reproduction link

https://2x.antdv.com/docs/vue/getting-started

Steps to reproduce

vite安装antd,引入之后,打包就会出现错误,js应该没有这个情况,用ts的时候会出错,是因为ts编译的时候做了类型检查,指令是"build": "vue-tsc --noEmit && vite build",去掉vue-tsc-noEmit就可以正常打包

What is expected?

使用正确的类型

What is actually happening?

报如下错误:
node_modules/ant-design-vue/lib/cascader/index.d.ts:307:13 - error TS2411: Property 'disabled' of type 'boolean' is not assignable to string index type 'void | Element'.

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