chore: migrate Vue 2 to Vue 3, Electron to v41, and update deps#599
chore: migrate Vue 2 to Vue 3, Electron to v41, and update deps#599chengcheng84 wants to merge 25 commits intodocmirror:masterfrom
Conversation
|
@wangliang181230 @cute-omega 有计划更新吗 |
1891f72 to
de2decf
Compare
|
详细描述一下你更新了什么 |
|
@cute-omega UI依赖的版本(ds的有点outdate),还是只是计划保持版本 |
|
请修好测试错误(考虑到只有macos出错,源代码应该没有问题) @chengcheng84 |
|
目前在WIP,还有一些问题,只是确认一下有没有必要 |
There was a problem hiding this comment.
Pull request overview
This PR migrates the GUI package from Vue 2 to Vue 3, upgrades Ant Design Vue to 4.x, moves vue-router to v4, and updates Electron + other dependencies to match the new ecosystem.
Changes:
- Updated Vue entrypoint and app bootstrap, switching from
Vue.prototypetoapp.config.globalProperties. - Converted multiple SFCs/components to Vue 3 patterns (
defineComponent,v-modelAPI changes,.syncreplacements in some places). - Bumped core dependencies (Vue 3, vue-router 4, ant-design-vue 4, Electron).
Reviewed changes
Copilot reviewed 21 out of 23 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/gui/upgrade_output.txt | Adds migration tool output log (currently appears corrupted/binary). |
| packages/gui/src/view/status.js | Migrates status injection to app.config.globalProperties. |
| packages/gui/src/view/pages/setting.vue | Reworks confirm modal content rendering away from JSX. |
| packages/gui/src/view/pages/server.vue | Wraps component with defineComponent; adjusts select option bindings. |
| packages/gui/src/view/pages/proxy.vue | Wraps component with defineComponent; updates Drawer binding; adjusts select option bindings. |
| packages/gui/src/view/pages/plugin/pip.vue | Wraps component with defineComponent; adjusts radio button bindings. |
| packages/gui/src/view/pages/plugin/overwall.vue | Wraps component with defineComponent; adjusts select option bindings. |
| packages/gui/src/view/pages/plugin/node.vue | Wraps component with defineComponent; adjusts radio button bindings (one broken). |
| packages/gui/src/view/pages/plugin/git.vue | Wraps component with defineComponent. |
| packages/gui/src/view/pages/index.vue | Changes mode switching and CA prompt behavior; updates success modal content rendering. |
| packages/gui/src/view/pages/help.vue | Wraps component with defineComponent. |
| packages/gui/src/view/mixins/plugin.js | Removes Vue 2 $set usage in setConfig. |
| packages/gui/src/view/index.js | Migrates init hook to accept app and use globalProperties. |
| packages/gui/src/view/components/tree-node.vue | Wraps component with defineComponent. |
| packages/gui/src/view/components/setup-ca.vue | Adds emits and migrates to defineComponent. |
| packages/gui/src/view/components/mock-input.vue | Migrates value/input to Vue 3 modelValue/update:modelValue. |
| packages/gui/src/view/components/container.vue | Wraps component with defineComponent. |
| packages/gui/src/view/App.vue | Migrates to defineComponent, removes SearchBar UI, updates AntD locale import. |
| packages/gui/src/main.js | Attempts Vue 3 + vue-router v4 bootstrap and AntD reset CSS. |
| packages/gui/src/bridge/on-close/front.js | Tweaks JSX style bindings to object syntax. |
| packages/gui/package.json | Upgrades Vue/AntD/vue-router/Electron versions. |
| package.json | Updates eslint version. |
Comments suppressed due to low confidence (1)
packages/gui/src/view/pages/index.vue:119
- doCheckRootCa no longer respects the existing “already setuped / noTip” guard (previously it returned early). This will show the CA install confirm every startup even if the user has already installed or opted out; please reintroduce the conditional early return based on setting.rootCa.setuped/noTip.
async doCheckRootCa () {
const setting = await this.$api.setting.load()
console.log('setting', setting)
this.setting = setting || {}
this.$confirm({
title: '第一次使用,请先安装CA根证书',
content: '本应用正常使用,必须安装和信任CA根证书',
cancelText: '下次安装',
okText: '去安装',
onOk: () => {
this.openSetupCa()
},
onCancel: () => {
this.setting.rootCa = this.setting.rootCa || {}
// const rootCa = this.setting.rootCa
// rootCa.noTip = true
// this.$api.setting.save(this.setting)
},
})
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
弄好了再叫我。这份升级对ds十分必要(每次编译看到vue2的弃用警告都很烦) |
|
@cute-omega 有空可以帮忙review一下, Thanks |
|
之后考虑迁移组合式 API吗 |
这个慎重考虑。全面改写工作量大,风险大而且必要性不足 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 28 changed files in this pull request and generated 13 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@cute-omega all fixed,等待review |
并非all fixed |
6ca2039 to
1578de1
Compare
|
我把自己从assignee里摘出去了,tmd神人github,每个commit都得通知我可太烦人了 有事再叫我 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 44 out of 46 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@cute-omega 大概可能fix完成 |
|
看上去不赖,审完diff之后把test编译的安装包分发测试看看实际功能有没有破坏(顺序不能乱 |
@cute-omega 发现一个问题 |
#613