From 80d6e51f00c3202f6dabbc462774f4801187a3f7 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sun, 15 Jan 2023 10:36:40 +0800 Subject: [PATCH 1/9] expand lts with upgrade decision guidelines --- src/lts/index.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lts/index.md b/src/lts/index.md index 0015ed2c3..2e41917b9 100644 --- a/src/lts/index.md +++ b/src/lts/index.md @@ -16,6 +16,20 @@ Vue 3 也存在一些和 Vue 2 不兼容的变更,所以该迁移工作依据 尽管存在不兼容的变更,Vue 两个主版本之间主要的 API 依然是共享的。所以团队仍然可以把 Vue 2 的相关知识带到 Vue 3 使用。长期来看,我们也会尽可能避免类似 Vue 2 和 Vue 3 之间的这种不兼容变更。兼容性和生态的稳定性将会是我们未来发布的最高优先考量。而新特性的引入也不会导致大的迁移。 +### 升级还是不升级 + +是否升级到 Vue 3 高度取决于具体的项目细节。以下是一些一般性的指导原则: + +1. 理解升级的收益。 + + 由于 2.7 使得两个主版本之间的开发体验差距已经不再那么明显了——升级的主要收益将是更好的 TypeScript 支持、更好的性能,以及访问 Vue 3 生态系统和未来的新特性。 + + 试问你自己的团队几个问题:这个应用是否稳定且运行良好?是否需要在未来持续开发新特性?是否存在只能通过升级来解决的痛点或瓶颈?如果应用稳定且没有因为 Vue 2 而遇到重大的痛点,那么升级可能并不值得。 + +2. 理解升级的成本。 + + 该应用是否基于一些难以兼容 Vue 3 的第三方依赖?该应用是否严重依赖于 Vue 2 和 Vue 3 之间的行为差异?团队是否能够分配专门的时间来进行升级?你可以试着花一些时间进行这些方面的初步研究并得出一个预估结论,然后将其与 (1) 中的预期收益进行比较。我们无法提供精确的公式,但希望这可以帮助你做出决策。 + ### 继续使用 Vue 2 有些团队可能鉴于有限的投入、预算、风险承受能力、或有不兼容 Vue 3 的依赖,而在此时间段内无法升级到 Vue 3。我们对此完全理解,并将确保继续使用 Vue 2 是完全可行的选项,即便在其终止支持之后。 From f6f9c3828acdd6c2e6184678ad2ddd7ee302e9e4 Mon Sep 17 00:00:00 2001 From: Jinjiang Date: Fri, 20 Jan 2023 11:01:44 +0800 Subject: [PATCH 2/9] adjust the height of sponsor images (#2980) --- themes/vue/layout/partials/sponsors.ejs | 8 ++++---- themes/vue/source/css/_sponsors-index.styl | 13 ++++++++----- themes/vue/source/css/_sponsors-sidebar.styl | 13 ++++++++----- themes/vue/source/css/index.styl | 5 +++++ 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/themes/vue/layout/partials/sponsors.ejs b/themes/vue/layout/partials/sponsors.ejs index de61b43a9..f41d55ebf 100644 --- a/themes/vue/layout/partials/sponsors.ejs +++ b/themes/vue/layout/partials/sponsors.ejs @@ -3,15 +3,15 @@

Patreon 赞助商

<%_ for (const sponsor of theme.platinum) {_%> - - <%-sponsor.name-%> + <%_ } _%>

<%_ for (const sponsor of theme.gold) {_%> - - <%-sponsor.name-%> + <%_ } _%>
diff --git a/themes/vue/source/css/_sponsors-index.styl b/themes/vue/source/css/_sponsors-index.styl index 3966643fa..dc75376c6 100644 --- a/themes/vue/source/css/_sponsors-index.styl +++ b/themes/vue/source/css/_sponsors-index.styl @@ -11,11 +11,15 @@ a margin: 20px 15px 0 position: relative - a, img - width: 100px display: inline-block - vertical-align: middle + &.sponsor + width: 100px + height: 60px + line-height: 60px img + max-width: 100% + max-height: 100% + vertical-align: middle transition: all .3s ease filter: grayscale(100%) opacity: 0.66 @@ -26,8 +30,7 @@ display: block margin: 30px auto 15px width: 200px - img - width: 200px + height: auto .become-sponsor margin-top: 40px font-size: .9em diff --git a/themes/vue/source/css/_sponsors-sidebar.styl b/themes/vue/source/css/_sponsors-sidebar.styl index 5489a77d3..ef823be91 100644 --- a/themes/vue/source/css/_sponsors-sidebar.styl +++ b/themes/vue/source/css/_sponsors-sidebar.styl @@ -3,16 +3,19 @@ font-size: .85em .logo color: $light - margin-top: 10px - text-align: center + width: 125px + height: 50px font-weight: bold - display block + display flex + align-items center + justify-content center &:first-child margin-top: 18px &:last-child margin-bottom: 20px - img, a - width: 125px + img + max-width: 125px + max-height: 50px .become-backer border: 1px solid $green diff --git a/themes/vue/source/css/index.styl b/themes/vue/source/css/index.styl index 5e081274c..e380ed6bc 100644 --- a/themes/vue/source/css/index.styl +++ b/themes/vue/source/css/index.styl @@ -119,11 +119,16 @@ body margin 0 a color $light + width: 160px + height: 80px + line-height: 80px a, span, img display: inline-block vertical-align: middle img margin: 15px 0 0 + max-width: 100% + max-height: 100% #highlights background-color: #fff From 2031cbcd6804213b86bd338e2ad8f7620749d3ae Mon Sep 17 00:00:00 2001 From: Robert Rosman Date: Tue, 7 Mar 2023 04:11:42 +0100 Subject: [PATCH 3/9] update broken link to VeeValidate (#2985) --- src/v2/cookbook/form-validation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v2/cookbook/form-validation.md b/src/v2/cookbook/form-validation.md index 5c02cae5d..75dbd0bdc 100644 --- a/src/v2/cookbook/form-validation.md +++ b/src/v2/cookbook/form-validation.md @@ -433,4 +433,4 @@ const app = new Vue({ 这份秘笈专注在“手动”校验表单,当然一些非常棒的 Vue 的库会为你搞定这些事情。使用一些预打包的库可能会影响你的应用最终的体积,但是好处是非常多的。这里有经过充分测试且保持日常更新的代码。其中包括以下 Vue 的表单校验库: * [vuelidate](https://github.com/monterail/vuelidate) -* [VeeValidate](https://logaretm.github.io/vee-validate/) +* [VeeValidate](https://vee-validate.logaretm.com/v3/) From 80faee709f4c496e7eec36c1f1067871b5c85958 Mon Sep 17 00:00:00 2001 From: Lyall Date: Tue, 7 Mar 2023 05:19:56 +0200 Subject: [PATCH 4/9] Update installation.md (#2983) * Update installation.md @2 prefix has to be specified, otherwise v3 gets installed * Apply suggestions from code review --------- Co-authored-by: Jinjiang --- src/v2/guide/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v2/guide/installation.md b/src/v2/guide/installation.md index b6070c79f..b77ca30a6 100644 --- a/src/v2/guide/installation.md +++ b/src/v2/guide/installation.md @@ -72,7 +72,7 @@ Vue 也可以在 [unpkg](https://unpkg.com/vue@{{vue_version}}/dist/vue.js) 和 ``` bash # 最新稳定版 -$ npm install vue +$ npm install vue@^2 ``` ## 命令行工具 (CLI) From bdb70e423c807d02f80f8265237c0c5357da409d Mon Sep 17 00:00:00 2001 From: Jinjiang Date: Mon, 28 Aug 2023 10:33:52 +0800 Subject: [PATCH 5/9] update installation --- src/v2/guide/installation.md | 14 +- themes/vue/_config.yml | 85 +- themes/vue/source/js/vue.js | 23319 +++++++++++++++--------------- themes/vue/source/js/vue.min.js | 6 +- 4 files changed, 11735 insertions(+), 11689 deletions(-) diff --git a/src/v2/guide/installation.md b/src/v2/guide/installation.md index b77ca30a6..f512354b0 100644 --- a/src/v2/guide/installation.md +++ b/src/v2/guide/installation.md @@ -2,8 +2,8 @@ title: 安装 type: guide order: 1 -vue_version: 2.7.10 -gz_size: "37.36" +vue_version: 2.7.14 +gz_size: "37.51" --- ### 兼容性 @@ -43,20 +43,20 @@ Vue 在其所有项目中公布的功能和行为都遵循[语义化版本控制 对于制作原型或学习,你可以这样使用最新版本: ``` html - + ``` 对于生产环境,我们推荐链接到一个明确的版本号和构建文件,以避免新版本造成的不可预期的破坏: ``` html - + ``` 如果你使用原生 ES Modules,这里也有一个兼容 ES Module 的构建文件: ``` html ``` @@ -85,7 +85,7 @@ Vue 提供了一个[官方的 CLI](https://github.com/vuejs/vue-cli),为单页 ## 对不同构建版本的解释 -在 [NPM 包的 `dist/` 目录](https://cdn.jsdelivr.net/npm/vue@2.7.10/dist/)你将会找到很多不同的 Vue.js 构建版本。这里列出了它们之间的差别: +在 [NPM 包的 `dist/` 目录](https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/)你将会找到很多不同的 Vue.js 构建版本。这里列出了它们之间的差别: | | UMD | CommonJS | ES Module (基于构建工具使用) | ES Module (直接用于浏览器) | | --- | --- | --- | --- | --- | @@ -102,7 +102,7 @@ Vue 提供了一个[官方的 CLI](https://github.com/vuejs/vue-cli),为单页 - **运行时**:用来创建 Vue 实例、渲染并处理虚拟 DOM 等的代码。基本上就是除去编译器的其它一切。 -- **[UMD](https://github.com/umdjs/umd)**:UMD 版本可以通过 `