File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 2424 ``` html
2525 <!-- 字符串 -->
2626 <router-link to =" home" >Home</router-link >
27- <!-- renders to -->
27+ <!-- 渲染结果 -->
2828 <a href =" home" >Home</a >
2929
3030 <!-- 使用 v-bind 的 JS 表达式 -->
7979
8080 ``` html
8181 <router-link to =" /foo" tag =" li" >foo</router-link >
82- <!-- renders as -->
82+ <!-- 渲染结果 -->
8383 <li >foo</li >
8484 ```
8585
105105
106106
107107 ``` html
108- <!-- this link will only be active at / -->
108+ <!-- 这个链接只会在地址为 / 的时候被激活 -->
109109 <router-link to =" /" exact >
110110 ```
111111
112112 查看更多关于激活链接类名的例子 [ 可运行] ( http://jsfiddle.net/fnlCtrl/dokbyypq/ ) .
113113
114- ### Applying Active Class to Outer Element
114+ ### 将"激活时的CSS类名"应用在外层元素
115115
116- 有时候我们要让 "激活 class " 应用在外层元素,而不是 ` <a> ` 标签本身,那么可以用 ` <router-link> ` 渲染外层元素,包裹着内层的原生 ` <a> ` 标签:
116+ 有时候我们要让 "激活时的CSS类名 " 应用在外层元素,而不是 ` <a> ` 标签本身,那么可以用 ` <router-link> ` 渲染外层元素,包裹着内层的原生 ` <a> ` 标签:
117117
118118``` html
119119<router-link tag =" li" to =" /foo" >
120120 <a >/foo</a >
121121</router-link >
122122```
123123
124- 在这种情况下,` <a> ` 将作为真实的链接(它会获得正确的 ` href ` 的),而 "激活 class " 则设置到外层的 ` <li> ` 。
124+ 在这种情况下,` <a> ` 将作为真实的链接(它会获得正确的 ` href ` 的),而 "激活时的CSS类名 " 则设置到外层的 ` <li> ` 。
You can’t perform that action at this time.
0 commit comments