This repository was archived by the owner on Aug 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ badges:
12
12
13
13
## 介绍
14
14
15
- 在元素上动态绑定 attribute 时,常见的场景是在一个元素中同时使用 ` v-bind="object" ` 语法和单独的 property 。然而,这就引出了关于合并的优先级的问题。
15
+ 在元素上动态绑定 attribute 时,常见的场景是在一个元素中同时使用 ` v-bind="object" ` 语法和单独的 attribute 。然而,这就引出了关于合并的优先级的问题。
16
16
17
17
## 2.x 语法
18
18
19
- 在 2.x,如果一个元素同时定义了 ` v-bind="object" ` 和一个相同的单独的 property ,那么这个单独的 property 总是会覆盖 ` object ` 中的绑定。
19
+ 在 2.x,如果一个元素同时定义了 ` v-bind="object" ` 和一个相同的单独的 attribute ,那么这个单独的 attribute 总是会覆盖 ` object ` 中的绑定。
20
20
21
21
``` html
22
22
<!-- template -->
@@ -27,7 +27,7 @@ badges:
27
27
28
28
## 3.x 语法
29
29
30
- 在 3.x,如果一个元素同时定义了 ` v-bind="object" ` 和一个相同的单独的 property ,那么声明绑定的顺序决定了它们如何合并。换句话说,相对于假设开发者总是希望单独的 property 覆盖 ` object ` 中定义的内容,现在开发者对自己所希望的合并行为有了更好的控制。
30
+ 在 3.x,如果一个元素同时定义了 ` v-bind="object" ` 和一个相同的单独的 attribute ,那么声明绑定的顺序决定了它们如何合并。换句话说,相对于假设开发者总是希望单独的 attribute 覆盖 ` object ` 中定义的内容,现在开发者对自己所希望的合并行为有了更好的控制。
31
31
32
32
``` html
33
33
<!-- template -->
@@ -43,6 +43,6 @@ badges:
43
43
44
44
## 迁移策略
45
45
46
- 如果你依赖 ` v-bind ` 的覆盖功能,目前的建议是确保在单独的 property 之前定义 ` v-bind ` attribute。
46
+ 如果你依赖 ` v-bind ` 的覆盖功能,目前的建议是确保在单独的 attribute 之前定义 ` v-bind ` attribute。
47
47
48
48
[ 迁移构建开关:` COMPILER_V_BIND_OBJECT_ORDER ` ] ( migration-build.html#兼容性配置 )
You can’t perform that action at this time.
0 commit comments