Skip to content

Commit d11a9e3

Browse files
authored
Merge pull request #1236 from vuejs/sync
2 parents 2990fc4 + abb218d commit d11a9e3

File tree

11 files changed

+11784
-11707
lines changed

11 files changed

+11784
-11707
lines changed

src/lts/index.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Vue 2 的长期技术支持 (LTS)、终止支持 (EOL) 及其延长版服务
22

3+
<p class="info"><b>希望继续使用 Vue 2?</b>
4+
如果你希望在 Vue 2 的终止支持时间 (2023 年 12 月 31 日) 之后仍然使用它,并且需要一个能够满足安全和浏览器兼容性要求的维护版本,请务必查看:[HeroDevs 对 Vue 2 的无限期支持](https://www.herodevs.com/support/nes-vue?utm_source=vuejs-org&utm_medium=link&utm_campaign=lts-faq)
5+
</p>
6+
37
## Vue 2 的技术支持会持续多久?
48

59
Vue 2.7 是当前、同时也是最后一个 Vue 2.x 的次级版本更新。Vue 2.7 会以其发布日期,即 2022 年 7 月 1 日开始计算,提供 18 个月的长期技术支持 (LTS:long-term support)。在此期间,Vue 2 将会提供必要的 bug 修复和安全修复,但不再提供新特性。
@@ -16,6 +20,20 @@ Vue 3 也存在一些和 Vue 2 不兼容的变更,所以该迁移工作依据
1620

1721
尽管存在不兼容的变更,Vue 两个主版本之间主要的 API 依然是共享的。所以团队仍然可以把 Vue 2 的相关知识带到 Vue 3 使用。长期来看,我们也会尽可能避免类似 Vue 2 和 Vue 3 之间的这种不兼容变更。兼容性和生态的稳定性将会是我们未来发布的最高优先考量。而新特性的引入也不会导致大的迁移。
1822

23+
### 升级还是不升级
24+
25+
是否升级到 Vue 3 高度取决于具体的项目细节。以下是一些一般性的指导原则:
26+
27+
1. 理解升级的收益。
28+
29+
由于 2.7 使得两个主版本之间的开发体验差距已经不再那么明显了——升级的主要收益将是更好的 TypeScript 支持、更好的性能,以及访问 Vue 3 生态系统和未来的新特性。
30+
31+
试问你自己的团队几个问题:这个应用是否稳定且运行良好?是否需要在未来持续开发新特性?是否存在只能通过升级来解决的痛点或瓶颈?如果应用稳定且没有因为 Vue 2 而遇到重大的痛点,那么升级可能并不值得。
32+
33+
2. 理解升级的成本。
34+
35+
该应用是否基于一些难以兼容 Vue 3 的第三方依赖?该应用是否严重依赖于 Vue 2 和 Vue 3 之间的行为差异?团队是否能够分配专门的时间来进行升级?你可以试着花一些时间进行这些方面的初步研究并得出一个预估结论,然后将其与 (1) 中的预期收益进行比较。我们无法提供精确的公式,但希望这可以帮助你做出决策。
36+
1937
### 继续使用 Vue 2
2038

2139
有些团队可能鉴于有限的投入、预算、风险承受能力、或有不兼容 Vue 3 的依赖,而在此时间段内无法升级到 Vue 3。我们对此完全理解,并将确保继续使用 Vue 2 是完全可行的选项,即便在其终止支持之后。
@@ -38,4 +56,4 @@ Vue 2.7 也是在终止支持之前保持维护的版本,所以如果你打算
3856

3957
- 浏览器有时会发布一些会破坏老旧库的变更。这样的情况极少发生,但理论上难以完全避免。
4058

41-
为了解决以上顾虑,我们和业内的专家们合作推出了 **Vue 2 的延长版 LTS 服务**。该服务会提供 Vue 2 安全和浏览器兼容性相关问题的修复版本,且带有 SLA 协议。如果你希望在 Vue 2 的终止支持时间,即 2023 年 12 月 31 日之后,仍然使用它,一定要移步至:[学习更多关于 HeroDevs 对 Vue 2 的无限期支持](https://www.herodevs.com/support/vue)
59+
为了解决以上顾虑,我们和业内的专家们合作推出了 **Vue 2 的延长版 LTS 服务**。该服务会提供 Vue 2 安全和浏览器兼容性相关问题的修复版本,且带有 SLA 协议。如果你希望在 Vue 2 的终止支持时间,即 2023 年 12 月 31 日之后,仍然使用它,一定要移步至:[学习更多关于 HeroDevs 对 Vue 2 的无限期支持](https://www.herodevs.com/support/nes-vue?utm_source=vuejs-org&utm_medium=link&utm_campaign=lts-faq)

src/v2/cookbook/form-validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,4 +433,4 @@ const app = new Vue({
433433
这份秘笈专注在“手动”校验表单,当然一些非常棒的 Vue 的库会为你搞定这些事情。使用一些预打包的库可能会影响你的应用最终的体积,但是好处是非常多的。这里有经过充分测试且保持日常更新的代码。其中包括以下 Vue 的表单校验库:
434434

435435
* [vuelidate](https://github.com/monterail/vuelidate)
436-
* [VeeValidate](https://logaretm.github.io/vee-validate/)
436+
* [VeeValidate](https://vee-validate.logaretm.com/v3/)

src/v2/guide/installation.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: 安装
33
type: guide
44
order: 1
5-
vue_version: 2.7.10
6-
gz_size: "37.36"
5+
vue_version: 2.7.14
6+
gz_size: "37.51"
77
---
88

99
### 兼容性
@@ -43,20 +43,20 @@ Vue 在其所有项目中公布的功能和行为都遵循[语义化版本控制
4343
对于制作原型或学习,你可以这样使用最新版本:
4444

4545
``` html
46-
<script src="https://cdn.jsdelivr.net/npm/[email protected].10/dist/vue.js"></script>
46+
<script src="https://cdn.jsdelivr.net/npm/[email protected].14/dist/vue.js"></script>
4747
```
4848

4949
对于生产环境,我们推荐链接到一个明确的版本号和构建文件,以避免新版本造成的不可预期的破坏:
5050

5151
``` html
52-
<script src="https://cdn.jsdelivr.net/npm/[email protected].10"></script>
52+
<script src="https://cdn.jsdelivr.net/npm/[email protected].14"></script>
5353
```
5454

5555
如果你使用原生 ES Modules,这里也有一个兼容 ES Module 的构建文件:
5656

5757
``` html
5858
<script type="module">
59-
import Vue from 'https://cdn.jsdelivr.net/npm/[email protected].10/dist/vue.esm.browser.js'
59+
import Vue from 'https://cdn.jsdelivr.net/npm/[email protected].14/dist/vue.esm.browser.js'
6060
</script>
6161
```
6262

@@ -72,7 +72,7 @@ Vue 也可以在 [unpkg](https://unpkg.com/vue@{{vue_version}}/dist/vue.js) 和
7272

7373
``` bash
7474
# 最新稳定版
75-
$ npm install vue
75+
$ npm install vue@^2
7676
```
7777

7878
## 命令行工具 (CLI)
@@ -85,7 +85,7 @@ Vue 提供了一个[官方的 CLI](https://github.com/vuejs/vue-cli),为单页
8585

8686
## 对不同构建版本的解释
8787

88-
[NPM 包的 `dist/` 目录](https://cdn.jsdelivr.net/npm/[email protected].10/dist/)你将会找到很多不同的 Vue.js 构建版本。这里列出了它们之间的差别:
88+
[NPM 包的 `dist/` 目录](https://cdn.jsdelivr.net/npm/[email protected].14/dist/)你将会找到很多不同的 Vue.js 构建版本。这里列出了它们之间的差别:
8989

9090
| | UMD | CommonJS | ES Module (基于构建工具使用) | ES Module (直接用于浏览器) |
9191
| --- | --- | --- | --- | --- |
@@ -102,7 +102,7 @@ Vue 提供了一个[官方的 CLI](https://github.com/vuejs/vue-cli),为单页
102102

103103
- **运行时**:用来创建 Vue 实例、渲染并处理虚拟 DOM 等的代码。基本上就是除去编译器的其它一切。
104104

105-
- **[UMD](https://github.com/umdjs/umd)**:UMD 版本可以通过 `<script>` 标签直接用在浏览器中。jsDelivr CDN 的 [https://cdn.jsdelivr.net/npm/[email protected].10](https://cdn.jsdelivr.net/npm/[email protected].10) 默认文件就是运行时 + 编译器的 UMD 版本 (`vue.js`)。
105+
- **[UMD](https://github.com/umdjs/umd)**:UMD 版本可以通过 `<script>` 标签直接用在浏览器中。jsDelivr CDN 的 [https://cdn.jsdelivr.net/npm/[email protected].14](https://cdn.jsdelivr.net/npm/[email protected].14) 默认文件就是运行时 + 编译器的 UMD 版本 (`vue.js`)。
106106

107107
- **[CommonJS](http://wiki.commonjs.org/wiki/Modules/1.1)**:CommonJS 版本用来配合老的打包工具比如 [Browserify](http://browserify.org/)[webpack 1](https://webpack.github.io)。这些打包工具的默认文件 (`pkg.main`) 是只包含运行时的 CommonJS 版本 (`vue.runtime.common.js`)。
108108

themes/vue/_config.yml

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
site_description: Vue.js - The Progressive JavaScript Framework
22
google_analytics: UA-46852172-3
33
root_domain: v2.cn.vuejs.org
4-
vue_version: 2.7.10
4+
vue_version: 2.7.14
55
# START SPONSORS
66
special:
77
- name: appwrite
88
url: https://appwrite.io
99
img: appwrite.svg
10-
description: Open Source Firebase Alternative
10+
description: Build Fast. Scale Big. All in One Place.
1111
platinum:
1212
- name: VueMastery
1313
url: https://www.vuemastery.com/
@@ -29,13 +29,6 @@ platinum:
2929
url: >-
3030
https://ionicframework.com/vue?utm_source=partner&utm_medium=referral&utm_campaign=vuesponsorship&utm_content=vuedocs
3131
img: ionic.png?v2
32-
- name: ButterCMS
33-
url: >-
34-
https://buttercms.com/vuejs-cms/?utm_source=vuejs.org&utm_medium=banner&utm_campaign=sponsorship
35-
img: buttercms.svg
36-
- name: Sanofi
37-
url: https://www.sanofi.com/
38-
img: sanofi.png
3932
- name: CodeDict
4033
url: https://code-dict.com
4134
img: codedict.svg
@@ -45,21 +38,13 @@ platinum:
4538
- name: HeroDevs
4639
url: https://www.herodevs.com/support/vue
4740
img: herodevs.png
48-
platinum_china:
49-
- name: Aircode
50-
url: https://docs-cn.aircode.io/chatgpt/
51-
img: aircode.png
52-
description: 5 分钟用 JS 接入 ChatGPT
5341
gold:
5442
- name: Volta
5543
url: https://volta.net/?utm_source=vuejs.org&utm_campaign=sponsoring/
5644
img: volta.svg
5745
- name: Laravel
5846
url: https://laravel.com
5947
img: laravel.png
60-
- name: HTML Burger
61-
url: https://htmlburger.com
62-
img: html_burger.png
6348
- name: Tidelift
6449
url: https://tidelift.com/subscription/npm/vue
6550
img: tidelift.png
@@ -106,9 +91,6 @@ gold:
10691
- name: Casinoburst.com
10792
url: https://casinoburst.com/casino-utan-licens/
10893
img: casinoburst_com.png
109-
- name: spinsify.com/uk
110-
url: https://www.spinsify.com/uk/new-casinos
111-
img: spinsify_com_uk.png
11294
- name: 'Enkrypt: Ethereum and Polkadot Web3 Wallet'
11395
url: https://www.enkrypt.com
11496
img: enkrypt__ethereum_and_polkadot_web3_wallet.svg
@@ -121,27 +103,40 @@ gold:
121103
- name: Goread.io
122104
url: https://goread.io/buy-instagram-followers
123105
img: goread_io.png
124-
- name: Twicsy
125-
url: https://twicsy.com/buy-instagram-likes
126-
img: twicsy.png
127106
- name: Sentry
128-
url: sentry.io/for/vue?utm_source=vuejs.org&utm_medium=paid-community
107+
url: https://sentry.io/for/vue?utm_source=vuejs.org&utm_medium=paid-community
129108
img: sentry.png
130-
- name: Famous Fonts
131-
url: https://www.fontbolt.com/
132-
img: famous_fonts.png
133-
- name: Justanotherpanel
134-
url: https://justanotherpanel.com/
135-
img: justanotherpanel.png
136-
- name: Likes.io
137-
url: https://likes.io/buy-instagram-followers
138-
img: likes_io.png
139-
- name: Howsociable
140-
url: https://howsociable.com/buy-instagram-followers/
141-
img: howsociable.png
142109
- name: Poprey.com
143110
url: https://poprey.com/
144111
img: poprey_com.png
112+
- name: Ilmaiset Pitkävetovihjeet
113+
url: https://www.vedonlyontibonukset.com/pitkavetovihjeet
114+
img: ilmaiset_pitk_vetovihjeet.png
115+
- name: Metoree
116+
url: https://us.metoree.com/
117+
img: metoree.png
118+
- name: Famoid
119+
url: https://famoid.com/
120+
img: famoid.png
121+
- name: Certible
122+
url: https://www.certible.com
123+
img: certible.svg
124+
- name: FORTUNE GAMES
125+
url: https://www.fortunegames.com
126+
img: fortune_games.png
127+
- name: TBDC - Agro Software
128+
url: http://tbdc.com.br/
129+
img: tbdc___agro_software.svg
130+
- name: Nokori
131+
url: >-
132+
https://nokori.com?utm_source=github&utm_medium=banner&utm_campaign=awareness&utm_id=github_vue
133+
img: nokori.png
134+
- name: Justanotherpanel
135+
url: https://justanotherpanel.com/
136+
img: justanotherpanel.png
137+
- name: FineProxy
138+
url: https://fineproxy.org/
139+
img: fineproxy.svg
145140
silver:
146141
- name: Draxlr
147142
url: https://www.draxlr.com
@@ -161,15 +156,18 @@ silver:
161156
- name: Codesmith
162157
url: https://codesmith.io
163158
img: codesmith.png
164-
- name: Gcore
165-
url: https://gcore.com
166-
img: gcore.png
167-
- name: awisee.agency
168-
url: https://awisee.agency
169-
img: awisee_agency.png
170159
- name: Optimizers
171160
url: https://www.optimizers.nl
172161
img: optimizers.png
162+
- name: Nettcasino
163+
url: https://www.nettcasino.com/
164+
img: nettcasino.png
165+
- name: FORTUNE GAMES
166+
url: https://www.fortunegames.com
167+
img: fortune_games.png
168+
- name: Indy
169+
url: https://www.indy.fr/
170+
img: indy.png
173171
bronze:
174172
- name: Derek Pollard
175173
url: https://polyglotengineer.com/derek.pollard
@@ -192,6 +190,9 @@ bronze:
192190
- name: Bürkert Werke GmbH & Co KG
193191
url: https://www.burkert.com
194192
img: b_rkert_werke_gmbh___co_kg.png
193+
- name: CRECOHE
194+
url: http://www.crecohe.com
195+
img: crecohe.png
195196
# END SPONSORS
196197
video_china:
197198
- url: http://cloud.youku.com/index.php?source=vuejs

themes/vue/layout/partials/sponsors.ejs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<h3>Patreon 赞助商</h3>
44

55
<%_ for (const sponsor of theme.platinum) {_%>
6-
<a href="<%- sponsor.url %>" target="_blank" rel="sponsored noopener" style="width: 160px;">
7-
<img src="<%- logo(sponsor.img) %>" style="width: 160px;" alt="<%-sponsor.name-%>">
6+
<a href="<%- sponsor.url %>" target="_blank" rel="sponsored noopener" class="sponsor" style="width: 160px; height: 80px; line-height: 80px;">
7+
<img src="<%- logo(sponsor.img) %>" alt="<%-sponsor.name-%>">
88
</a>
99
<%_ } _%>
1010
<br>
1111
<br>
1212
<%_ for (const sponsor of theme.gold) {_%>
13-
<a href="<%- sponsor.url %>" target="_blank" rel="sponsored noopener" style="width: 120px;">
14-
<img src="<%- logo(sponsor.img) %>" style="width:auto;max-width:120px;max-height:60px;" alt="<%-sponsor.name-%>">
13+
<a href="<%- sponsor.url %>" target="_blank" rel="sponsored noopener" class="sponsor" style="width: 120px; height: 60px; line-height: 60px;">
14+
<img src="<%- logo(sponsor.img) %>" alt="<%-sponsor.name-%>">
1515
</a>
1616
<%_ } _%>
1717
<br>

themes/vue/source/css/_sponsors-index.styl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@
1111
a
1212
margin: 20px 15px 0
1313
position: relative
14-
a, img
15-
width: 100px
1614
display: inline-block
17-
vertical-align: middle
15+
&.sponsor
16+
width: 100px
17+
height: 60px
18+
line-height: 60px
1819
img
20+
max-width: 100%
21+
max-height: 100%
22+
vertical-align: middle
1923
transition: all .3s ease
2024
filter: grayscale(100%)
2125
opacity: 0.66
@@ -26,8 +30,7 @@
2630
display: block
2731
margin: 30px auto 15px
2832
width: 200px
29-
img
30-
width: 200px
33+
height: auto
3134
.become-sponsor
3235
margin-top: 40px
3336
font-size: .9em

themes/vue/source/css/_sponsors-sidebar.styl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33
font-size: .85em
44
.logo
55
color: $light
6-
margin-top: 10px
7-
text-align: center
6+
width: 125px
7+
height: 50px
88
font-weight: bold
9-
display block
9+
display flex
10+
align-items center
11+
justify-content center
1012
&:first-child
1113
margin-top: 18px
1214
&:last-child
1315
margin-bottom: 20px
14-
img, a
15-
width: 125px
16+
img
17+
max-width: 125px
18+
max-height: 50px
1619

1720
.become-backer
1821
border: 1px solid $green

themes/vue/source/css/index.styl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,16 @@ body
119119
margin 0
120120
a
121121
color $light
122+
width: 160px
123+
height: 80px
124+
line-height: 80px
122125
a, span, img
123126
display: inline-block
124127
vertical-align: middle
125128
img
126129
margin: 15px 0 0
130+
max-width: 100%
131+
max-height: 100%
127132

128133
#highlights
129134
background-color: #fff

themes/vue/source/css/page.styl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
code
145145
background-color: #efefef
146146
p
147-
&.tip, &.success
147+
&.tip, &.success, &.info
148148
padding: 12px 24px 12px 30px
149149
margin: 2em 0
150150
border-left-width: 4px
@@ -175,6 +175,8 @@
175175
&:before
176176
content: "!"
177177
background-color: $red
178+
&.info
179+
border-left-color: $green
178180
&.success
179181
border-left-color: $green
180182
&:before

0 commit comments

Comments
 (0)