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

升级到 Vue 2.7 | 提供组合式 API,且无需修改现有代码 #4337

Merged
merged 4 commits into from Jul 30, 2023

Conversation

timongh
Copy link
Contributor

@timongh timongh commented Jul 22, 2023

不涉及 core 与任何 feature 代码的更改。仅升级 vue 及相关工具。

可在正式升级 vue 3 之前,提供组合式 API 支持,而不破坏已有代码(限制:与 Vue 3 的行为差异)。

推荐插件改为 Volar。

@timongh timongh changed the title Update to vue 2.7 升级到 Vue 2.7 | 提供对组合式 API 的支持,同时不需要修改现有代码 Jul 22, 2023
@timongh timongh changed the title 升级到 Vue 2.7 | 提供对组合式 API 的支持,同时不需要修改现有代码 升级到 Vue 2.7 | 提供组合式 API,且无需修改现有代码 Jul 22, 2023
@timongh timongh closed this Jul 23, 2023
@timongh timongh reopened this Jul 23, 2023
@the1812
Copy link
Owner

the1812 commented Jul 28, 2023

试了下, 开着 Volar & TS Takeover, 有不少组件还是会报错的 (有些是写法 / 类型确实不对, 有些是用了 mixin 识别不了)

@timongh
Copy link
Contributor Author

timongh commented Jul 28, 2023

试了下, 开着 Volar & TS Takeover, 有不少组件还是会报错的 (有些是写法 / 类型确实不对, 有些是用了 mixin 识别不了)

这个确实没法子,不改现有代码的话,就只能假装看不见报错了。反正 Volar 报错不影响编译,没有实质影响。而且,有报错也算是好事,比没报错好。

或者不知道继续用 Vetur 怎么样,我没试过。需要我把关于 Volar 的更改都去掉吗?

@the1812
Copy link
Owner

the1812 commented Jul 28, 2023

那还是先无视吧,Volar 总归靠谱很多

@the1812 the1812 merged commit 85cf33c into the1812:preview-features Jul 30, 2023
1 check passed
@timongh timongh deleted the update-to-vue2_7 branch July 30, 2023 14:57
@the1812
Copy link
Owner

the1812 commented Aug 10, 2023

Takeover 也有点问题, 在组件里引用来自 @/core, @/components 之类的 API 时, 经常提示不出来, 需要反复重启 Vue Server.

@timongh
Copy link
Contributor Author

timongh commented Aug 10, 2023

Takeover 也有点问题, 在组件里引用来自 @/core, @/components 之类的 API 时, 经常提示不出来, 需要反复重启 Vue Server.

没太明白你的意思,我暂时没发现什么问题。是已经写过 import,但在使用的时候鼠标移上去没有类型提示吗?

什么时候,什么情况下出现问题

如果需要的话,有图吗

@the1812
Copy link
Owner

the1812 commented Aug 25, 2023

是写出想要 import 的东西时, 提示列表里并没有对应的选项. 不是稳定触发, 但是遇到时重启 Vue Server 能解决, 等我找到规律再来补充下
Snipaste_2023-08-25_23-52-25

后续又遇到一次, 图三是前两张图出问题时重启了一下, 结果代码着色啥的都乱掉了

Vue 的两个 Server 也没有任何输出

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

Successfully merging this pull request may close these issues.

None yet

2 participants