Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 typescript 的类型声明 #28

Open
1 task done
TianYa-Q opened this issue Aug 22, 2024 · 0 comments
Open
1 task done

关于 typescript 的类型声明 #28

TianYa-Q opened this issue Aug 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@TianYa-Q
Copy link

可复现的链接(包含复现链接与示例代码):

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

是否使用当前最新版本?

  • 我已确认是使用当前的最新版本并已按要求提供复现链接与示例代码。
@TianYa-Q TianYa-Q added the bug Something isn't working label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant