Skip to content

Commit 7f72557

Browse files
authored
Update README.md
1 parent f3577e2 commit 7f72557

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import 'tab-slider/dist/index.css'
1515
Vue.use(TabSlider)
1616
```
1717
2. in `.Vue` file
18+
> note that you still need import the css file in main.js
1819
``` js
1920
import TabSlider from 'tab-slider'
2021
export default {
@@ -28,11 +29,12 @@ Attribute | Description | Type | example
2829
----|---|---|---
2930
comp(required)|A array contains all router components|Array|[{name: 'comp1', component: foo}, {name: 'comp2', component: bar}]
3031
defalut-index(optional)|index of default component to dispaly, default to 0|Number| 1
31-
32+
> note the `name` attribute in comp must same as the name in route,that is,you must identify a route with a name,see [Named Routes](https://router.vuejs.org/en/essentials/named-routes.html#)
33+
---
3234
中文版本:
3335

3436
属性 | 描述 | 类型 | 例子
3537
----|---|---|---
3638
comp(必需)|包含所有路由组件的数组|Array|[{name: 'comp1', component: foo}, {name: 'comp2', component: bar}]
3739
defalut-index(可选)|默认要跳转的路由索引,从0开始|Number| 1
38-
40+
> comp属性中的name属性的值必须和路由name属性的值相同,也就是说,你必须给你的路由组件命名。相关信息[命名路由](https://router.vuejs.org/zh-cn/essentials/named-routes.html#)

0 commit comments

Comments
 (0)