-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Version
4.0.0-beta.3
Environment
chrome:版本 113.0.5672.93(正式版本) (64 位)node: 16.14.2 npm:8.5.0
Reproduction link
https://github.com/vueComponent/ant-design-vue
Steps to reproduce
- 下载4.0.0-beta.3 包
- 执行 npm install (安装过程正常,无任何报错)
- 执行 npm run dev
从输出的日志上看:是在执行'npm run token-meta' 这个脚本出错的
报错内容是一大堆组件中的ts 语法问题
截取一部分:
The expected type comes from property 'slots' which is declared here on type 'ComponentOptionsWithObjectProps<{ id: StringConstructor; prefixCls: StringConstructor; items: PropType<ItemType[]>; disabled: BooleanConstructor; ... 27 more ...; 'onUpdate:activeKey': PropType<...>; }, ... 12 more ..., { ...; }>'
node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1245:25
1245 export declare function defineComponent<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}, I extends ComponentInjectOptions = {}, II extends string = string>(options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S>): DefineComponent<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, PublicProps, ResolveProps<PropsOptions, E>, ExtractDefaultPropTypes<PropsOptions>, S>;
~~~~~~~~~~~~~~~
The last overload is declared here.
components/menu/src/MenuItem.tsx:49:3 - error TS2769: No overload matches this call.
The last overload gave the following error.
Type 'string[]' has no properties in common with type 'SlotsType<Record<string, any>>'.
49 slots: ['icon', 'title'],
What is expected?
执行 npm run dev能够正常执行
What is actually happening?
对应的站点能够正常切换反问(页面能出来,点击其他页面无法跳转,可能编译导致组件导入路径问题)