@@ -228,7 +228,7 @@ mounted: function () {
228
228
229
229
### ` v-for ` 排序值
230
230
231
- 显然 ` v-for="number in 10" ` 将使得 ` number ` 从0到9迭代,现在变成了从1到10.
231
+ 显然 ` v-for="number in 10" ` 将使得 ` number ` 从0到9迭代,现在变成了从1到10。
232
232
233
233
{% raw %}
234
234
<div class =" upgrade-path " >
@@ -331,7 +331,7 @@ Props 现在只能单向传递。为了对父组件产生反向影响,子组
331
331
332
332
### 根实例的 Props <sup >弃用</sup >
333
333
334
- 对于一个根实例来说 (比如:用 ` new Vue({ ... }) ` 创建的实例),只能用 ` propsData ` 而不是 ` props ` .
334
+ 对于一个根实例来说 (比如:用 ` new Vue({ ... }) ` 创建的实例),只能用 ` propsData ` 而不是 ` props ` 。
335
335
336
336
{% raw %}
337
337
<div class =" upgrade-path " >
@@ -616,7 +616,7 @@ strings.map(function (str) {
616
616
{% raw %}
617
617
<div class =" upgrade-path " >
618
618
<h4 >升级方式</h4 >
619
- <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 找出实例中的 <code >v-el</code > 和 <code >v-ref</code >. </p >
619
+ <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 找出实例中的 <code >v-el</code > 和 <code >v-ref</code > 。 </p >
620
620
</div >
621
621
{% endraw %}
622
622
@@ -672,7 +672,7 @@ strings.map(function (str) {
672
672
< p v- my- directive .literal = " foo bar baz" >< / p>
673
673
```
674
674
675
- to just:
675
+ 只是:
676
676
677
677
``` html
678
678
<p v-my-directive =" 'foo bar baz'" ></p >
@@ -700,7 +700,7 @@ Vue 的过渡系统有了彻底的改变,现在通过使用 `<transition>` 和
700
700
701
701
### 可复用的过渡 ` Vue.transition ` <sup >弃用</sup >
702
702
703
- 在新的过渡系统中,可以[ 通过模板复用过渡效果] ( http://rc.vuejs.org/guide/transitions.html#Reusable-Transitions ) .
703
+ 在新的过渡系统中,可以[ 通过模板复用过渡效果] ( http://rc.vuejs.org/guide/transitions.html#Reusable-Transitions ) 。
704
704
705
705
{% raw %}
706
706
<div class =" upgrade-path " >
@@ -818,7 +818,7 @@ methods: {
818
818
}
819
819
```
820
820
821
- 在简单的情况下这样做可以代替 ` $dispatch ` 和 ` $broadcast ` ,但是对于大多数复杂情况,更推荐使用一个专用的状态管理层如:[ Vuex] ( https://github.com/vuejs/vuex ) .
821
+ 在简单的情况下这样做可以代替 ` $dispatch ` 和 ` $broadcast ` ,但是对于大多数复杂情况,更推荐使用一个专用的状态管理层如:[ Vuex] ( https://github.com/vuejs/vuex ) 。
822
822
823
823
{% raw %}
824
824
<div class =" upgrade-path " >
@@ -935,7 +935,7 @@ self.users.filter(function (user) {
935
935
<p v-for =" user in users | orderBy 'name'" >{{ user.name }}</p >
936
936
```
937
937
938
- 而是在 computed 属性中使用 [ lodash's ` orderBy ` ] ( https://lodash.com/docs/4.15.0#orderBy ) (or possibly [ ` sortBy ` ] ( https://lodash.com/docs/4.15.0#sortBy ) ):
938
+ 而是在 computed 属性中使用 [ lodash's ` orderBy ` ] ( https://lodash.com/docs/4.15.0#orderBy ) (或者可能是 [ ` sortBy ` ] ( https://lodash.com/docs/4.15.0#sortBy ) ):
939
939
940
940
``` html
941
941
<p v-for =" user in orderedUsers" >{{ user.name }}</p >
@@ -958,7 +958,7 @@ _.orderBy(this.users, ['name', 'last_login'], ['asc', 'desc'])
958
958
{% raw %}
959
959
<div class =" upgrade-path " >
960
960
<h4 >升级方式</h4 >
961
- <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 工具找到指令中使用的过滤器。如果有些没找到,看看<strong >控制台错误信息</strong >. </p >
961
+ <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 工具找到指令中使用的过滤器。如果有些没找到,看看<strong >控制台错误信息</strong >。 </p >
962
962
</div >
963
963
{% endraw %}
964
964
@@ -979,13 +979,13 @@ _.orderBy(this.users, ['name', 'last_login'], ['asc', 'desc'])
979
979
{% raw %}
980
980
<div class =" upgrade-path " >
981
981
<h4 >升级方式</h4 >
982
- <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 工具找到老式的调用符号,如果有遗漏,请看<strong >控制台错误信息</strong >. </p >
982
+ <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 工具找到老式的调用符号,如果有遗漏,请看<strong >控制台错误信息</strong >。 </p >
983
983
</div >
984
984
{% endraw %}
985
985
986
986
### 内置文本过滤器 <sup >弃用</sup >
987
987
988
- 尽管插入文本内部的过滤器依然有效,但是所有内置过滤器已经移除了。取代的是,推荐在每个区域使用更专业的库来解决。(比如用 [ ` date-fns ` ] ( https://date-fns.org/ ) 来格式化日期,用 [ ` accounting ` ] ( http://openexchangerates.github.io/accounting.js/ ) 来格式化货币).
988
+ 尽管插入文本内部的过滤器依然有效,但是所有内置过滤器已经移除了。取代的是,推荐在每个区域使用更专业的库来解决。(比如用 [ ` date-fns ` ] ( https://date-fns.org/ ) 来格式化日期,用 [ ` accounting ` ] ( http://openexchangerates.github.io/accounting.js/ ) 来格式化货币)。
989
989
990
990
对于每个内置过滤器,我们大概总结了下该怎么替换。代码示例可能写在自定义 helper 函数,方法或计算属性中。
991
991
@@ -1101,12 +1101,12 @@ You may notice that:
1101
1101
1102
1102
### ` slot ` 样式参数 <sup >弃用</sup >
1103
1103
1104
- 通过具名 ` <slot> ` 插入的片段不再保持 ` slot ` 的参数。请用一个包裹元素来控制样式。或者用更高级方法:通过编程方式修改内容 :[ render functions] ( render-function.html ) .
1104
+ 通过具名 ` <slot> ` 插入的片段不再保持 ` slot ` 的参数。请用一个包裹元素来控制样式。或者用更高级方法:通过编程方式修改内容 :[ render functions] ( render-function.html ) 。
1105
1105
1106
1106
{% raw %}
1107
1107
<div class =" upgrade-path " >
1108
1108
<h4 >升级方式</h4 >
1109
- <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 找到选择slots标签CSS选择器(例如: <code >[slot="my-slot-name"]</code >). </p >
1109
+ <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 找到选择slots标签CSS选择器(例如: <code >[ slot="my-slot-name"] </code >) 。 </p >
1110
1110
</div >
1111
1111
{% endraw %}
1112
1112
@@ -1131,7 +1131,7 @@ You may notice that:
1131
1131
</keep-alive >
1132
1132
```
1133
1133
1134
- <p class =" tip " >当 `<keep-alive >`含有不同子组件时,应该分别影响到每一个子组件。不仅是第一个而是所有的子组件都将被忽略。</p >
1134
+ <p class =" tip " >当 `<keep-alive >` 含有不同子组件时,应该分别影响到每一个子组件。不仅是第一个而是所有的子组件都将被忽略。</p >
1135
1135
1136
1136
和 ` <transition> ` 一起使用时,确保把内容包裹在内:
1137
1137
@@ -1150,7 +1150,7 @@ You may notice that:
1150
1150
</div >
1151
1151
{% endraw %}
1152
1152
1153
- ## 计算插值//todaymark
1153
+ ## 计算插值todaymark
1154
1154
1155
1155
### 属性内部的计算插值 <sup >弃用</sup >
1156
1156
@@ -1200,7 +1200,7 @@ HTML 的计算插值 (`{% raw %}{{{ foo }}}{% endraw %}`) 已经弃用,取代
1200
1200
1201
1201
### 单次绑定<sup >弃用</sup >
1202
1202
1203
- 单次绑定 (` {% raw %}{{* foo }}{% endraw %} ` ) 已经弃用取代的是 [ ` v-once ` directive] ( /api/#v-once ) .
1203
+ 单次绑定 (` {% raw %}{{* foo }}{% endraw %} ` ) 已经弃用取代的是 [ ` v-once ` directive] ( /api/#v-once ) 。
1204
1204
1205
1205
{% raw %}
1206
1206
<div class =" upgrade-path " >
@@ -1226,7 +1226,7 @@ HTML 的计算插值 (`{% raw %}{{{ foo }}}{% endraw %}`) 已经弃用,取代
1226
1226
1227
1227
### ` vm.$set `
1228
1228
1229
- 曾经的 ` vm.$set ` 方法已经弃用,现在这样写: [ ` Vue.set ` ] ( /api/#Vue-set ) .
1229
+ 曾经的 ` vm.$set ` 方法已经弃用,现在这样写: [ ` Vue.set ` ] ( /api/#Vue-set ) 。
1230
1230
1231
1231
{% raw %}
1232
1232
<div class =" upgrade-path " >
@@ -1291,12 +1291,12 @@ methods: {
1291
1291
1292
1292
### Vue实例上的` Vue.set ` 和 ` Vue.delete ` <sup >弃用</sup >
1293
1293
1294
- Vue.set 和 Vue.delete在实例上将不再起作用 。现在都强制在实例的data选项中声明所有顶级响应值。如果删除实例属性或实例` $data ` 上的某个值,直接将它设置为null即可。
1294
+ Vue.set 和 Vue.delete 在实例上将不再起作用 。现在都强制在实例的data选项中声明所有顶级响应值。如果删除实例属性或实例` $data ` 上的某个值,直接将它设置为null即可。
1295
1295
1296
1296
{% raw %}
1297
1297
<div class =" upgrade-path " >
1298
1298
<h4 >升级方式</h4 >
1299
- <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 找到实例中的 <code >Vue.set</code > 或 <code >Vue.delete</code > 。如有遗漏请参考<strong >控制台错误信息</strong >. </p >
1299
+ <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 找到实例中的 <code >Vue.set</code > 或 <code >Vue.delete</code > 。如有遗漏请参考<strong >控制台错误信息</strong >。 </p >
1300
1300
</div >
1301
1301
{% endraw %}
1302
1302
@@ -1307,7 +1307,7 @@ Vue.set 和 Vue.delete在实例上将不再起作用。现在都强制在实例
1307
1307
{% raw %}
1308
1308
<div class =" upgrade-path " >
1309
1309
<h4 >升级方式</h4 >
1310
- <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 工具找到覆盖 <code >vm.$data</code >的位置。如有遗漏请参考<strong >控制台警告信息</strong >。</p >
1310
+ <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 工具找到覆盖 <code >vm.$data</code >的位置。如有遗漏请参考<strong >控制台警告信息</strong >。</p >
1311
1311
</div >
1312
1312
{% endraw %}
1313
1313
@@ -1318,7 +1318,7 @@ Vue.set 和 Vue.delete在实例上将不再起作用。现在都强制在实例
1318
1318
{% raw %}
1319
1319
<div class =" upgrade-path " >
1320
1320
<h4 >升级方式</h4 >
1321
- <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a >工具找到<code >vm.$get</code >。如有遗漏请参考 <strong >控制台错误信息</strong >。</p >
1321
+ <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a >工具找到 <code >vm.$get</code > 的位置 。如有遗漏请参考 <strong >控制台错误信息</strong >。</p >
1322
1322
</div >
1323
1323
{% endraw %}
1324
1324
@@ -1335,7 +1335,7 @@ myElement.appendChild(vm.$el)
1335
1335
{% raw %}
1336
1336
<div class =" upgrade-path " >
1337
1337
<h4 >升级方式</h4 >
1338
- <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 工具找到 <code >vm.$appendTo</code >。如果有遗漏可以参考<strong >控制台错误信息</strong >。</p >
1338
+ <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 工具找到 <code >vm.$appendTo</code > 的位置 。如果有遗漏可以参考<strong >控制台错误信息</strong >。</p >
1339
1339
</div >
1340
1340
{% endraw %}
1341
1341
@@ -1371,7 +1371,7 @@ myElement.parentNode.appendChild(vm.$el)
1371
1371
{% raw %}
1372
1372
<div class =" upgrade-path " >
1373
1373
<h4 >升级方式</h4 >
1374
- <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 找到<code >vm.$after</code >。如有遗漏,请参考<strong >控制台错误信息</strong >. </p >
1374
+ <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 找到 <code >vm.$after</code > 的位置 。如有遗漏,请参考<strong >控制台错误信息</strong >。 </p >
1375
1375
</div >
1376
1376
{% endraw %}
1377
1377
@@ -1398,8 +1398,8 @@ vm.$el.remove()
1398
1398
1399
1399
{% raw %}
1400
1400
<div class =" upgrade-path " >
1401
- <h4 >Upgrade Path </h4 >
1402
- <p >Run the <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > on your codebase to find examples of <code >vm.$eval</code >. If you miss any, you'll see <strong >console errors </strong >. </p >
1401
+ <h4 >升级方式 </h4 >
1402
+ <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 工具找到使用 <code >vm.$eval</code > 的位置。如有遗漏请参考 <strong >控制台错误信息 </strong >。 </p >
1403
1403
</div >
1404
1404
{% endraw %}
1405
1405
@@ -1486,7 +1486,7 @@ Async is now required for rendering performance.
1486
1486
1487
1487
### ` Vue.config.delimiters ` <sup >弃用</sup >
1488
1488
1489
- 以 [ 模板选项] ( /api/#delimiters ) 的方式使用。这样可以 可以在使用自定义分隔符时避免影响第三方模板 。
1489
+ 以 [ 模板选项] ( /api/#delimiters ) 的方式使用。这样可以在使用自定义分隔符时避免影响第三方模板 。
1490
1490
1491
1491
{% raw %}
1492
1492
<div class =" upgrade-path " >
@@ -1497,12 +1497,12 @@ Async is now required for rendering performance.
1497
1497
1498
1498
### ` Vue.config.unsafeDelimiters ` <sup >弃用</sup >
1499
1499
1500
- HTML interpolation [ 替换为 ` v-html ` ] ( #HTML-Interpolation-deprecated ) .
1500
+ HTML 插入 [ 替换为 ` v-html ` ] ( #HTML-Interpolation-deprecated ) .
1501
1501
1502
1502
{% raw %}
1503
1503
<div class =" upgrade-path " >
1504
1504
<h4 >升级方式</h4 >
1505
- <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 工具找到 <code >Vue.config.unsafeDelimiters</code >。然后 helper 工具也会找到HTML插入的实例,可以用`v-HTML `来替换。</p >
1505
+ <p >运行 <a href =" https://github.com/vuejs/vue-migration-helper " >migration helper</a > 工具找到 <code >Vue.config.unsafeDelimiters</code >。然后 helper 工具也会找到HTML插入的实例,可以用`v-html `来替换。</p >
1506
1506
</div >
1507
1507
{% endraw %}
1508
1508
0 commit comments