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

支持 Volar + vue@2? #2

Closed
ModyQyW opened this issue Jul 1, 2022 · 7 comments
Closed

支持 Volar + vue@2? #2

ModyQyW opened this issue Jul 1, 2022 · 7 comments

Comments

@ModyQyW
Copy link

ModyQyW commented Jul 1, 2022

能否支持 vue 2 呢?

@satrong
Copy link
Owner

satrong commented Jul 2, 2022

这个与 vue 的版本没关系吧?

@ModyQyW
Copy link
Author

ModyQyW commented Jul 2, 2022

安装依赖之后项目内文件列表如下。

image

index.d.tsvue 导入了类型。

import type {
DefineComponent, ComputedOptions,
MethodOptions, ComponentOptionsMixin,
VNodeProps, AllowedComponentProps, ComponentCustomProps,
ExtractPropTypes, EmitsOptions
} from 'vue'

但是一些类型是 vue@3 独有的,比如 DefineComponent。在 vue@2uni-app 组合使用的情况下,我在内部项目内试验过,无法得到正确的类型。

image

@satrong
Copy link
Owner

satrong commented Jul 2, 2022

view 组件可能与原生的组件冲突,其它的组件时正常的吗?另外你用的是 Volar 吗?

@satrong
Copy link
Owner

satrong commented Jul 2, 2022

vue 2 直接用 vetur + @dcloudio/uni-helper-json 不可以吗?

@ModyQyW
Copy link
Author

ModyQyW commented Jul 2, 2022

view 组件可能与原生的组件冲突,其它的组件时正常的吗?另外你用的是 Volar 吗?

不正常,用的是 Volar

image

image

vue 2 直接用 vetur + @dcloudio/uni-helper-json 不可以吗?

我这边所有 Vue 项目都上 Volar 了,所以我也不确定

@ModyQyW ModyQyW changed the title 支持 vue 2? 支持 Volar + vue@2? Jul 2, 2022
@satrong
Copy link
Owner

satrong commented Jul 2, 2022

我发布了一个beta版本,你安装测试看下行否

npm i uni-base-components-types@2.0.0-beta.0

satrong added a commit that referenced this issue Jul 2, 2022
@ModyQyW
Copy link
Author

ModyQyW commented Jul 2, 2022

初步试了一下看着可以,非常感谢。

@ModyQyW ModyQyW closed this as completed Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants