Closed Frank2-Liu closed 1 year ago
<el-amap-polyline />
不能将类型“{ editable: true; visible: boolean; draggable: boolean; path: number[][]; }”分配给类型“ComponentProps<SFCWithInstall<DefineComponent<Readonly<ComponentPropsOptions<{ [x: string]: unknown; }>>, unknown, { converters: {}; }, {}, { __initComponent(options: any): void; bindModelEvents(): void; ... 17 more ...; __editable(flag: any): void; }, ... 6 more ..., {} | { ...; }>> & Record<...>>”。
不能将类型“{ editable: true; visible: boolean; draggable: boolean; path: number[][]; }”分配给类型“Record<string, unknown> & Partial<{ visible: boolean; reEventWhenUpdate: boolean; } & { editable: boolean; } & { [x: number]: string; }> & Omit<(Readonly<ExtractPropTypes<{ visible: { type: BooleanConstructor; default: boolean; }; zIndex: { ...; }; reEventWhenUpdate: { ...; }; extraOptions: { ...; }; }>> & { ...; } ...”。ts(2322)
使用的版本多少的
只引用了@vuemap/vue-amap核心库,版本号: "^2.0.2"
@vuemap/vue-amap
项目使用vite3.2.5构建
vite3.2.5
已经修复,可以使用2.0.3版本
收到,已验证。感谢大佬👍
描述: 使用折线组件
<el-amap-polyline />
时,按照文档示例输入属性,类型报错报错内容:
不能将类型“{ editable: true; visible: boolean; draggable: boolean; path: number[][]; }”分配给类型“ComponentProps<SFCWithInstall<DefineComponent<Readonly<ComponentPropsOptions<{ [x: string]: unknown; }>>, unknown, { converters: {}; }, {}, { __initComponent(options: any): void; bindModelEvents(): void; ... 17 more ...; __editable(flag: any): void; }, ... 6 more ..., {} | { ...; }>> & Record<...>>”。
不能将类型“{ editable: true; visible: boolean; draggable: boolean; path: number[][]; }”分配给类型“Record<string, unknown> & Partial<{ visible: boolean; reEventWhenUpdate: boolean; } & { editable: boolean; } & { [x: number]: string; }> & Omit<(Readonly<ExtractPropTypes<{ visible: { type: BooleanConstructor; default: boolean; }; zIndex: { ...; }; reEventWhenUpdate: { ...; }; extraOptions: { ...; }; }>> & { ...; } ...”。ts(2322)