关于 typescript 的类型声明
Opened this issue · 0 comments
TianYa-Q commented
可复现的链接(包含复现链接与示例代码):
None
问题描述与截图:
因为全局注册,想在 vue 的 GlobalComponents 中声明一下类型
发现 VxeTable 的类型的声明文件在vxe-pc-ui中
未来是会迁移回VxeTable库,还是说整个VxeTable的代码会合并到vxe-pc-ui中呢?
declare module "vue" {
export interface GlobalComponents {
VxeTable: (typeof import("vxe-pc-ui"))["VxeTable"];
}
}
目前是按照上面这样写的,不知道是否有更好的写法
期望的结果:
No response
操作系统:
Mac
浏览器版本:
Electron 22
vue 版本:
^3.4.0
vxe-pc-ui 版本:
^4.0.94
vxe-table 版本:
^4.7.0
是否使用当前最新版本?
- 我已确认是使用当前的最新版本并已按要求提供复现链接与示例代码。