1.导入 ``` import {Nav} from 'vue-publish-important' ``` 2.注册 ``` components:{Nav} ``` 3.使用 ``` <template lang="jade"> div Nav(:info="navData") </template> ``` 4.数据实例 ``` export default{ name:'Haha', components:{ Hehe,InputOne ,Nav},
npm install vue-publish-important
import {Nav} from 'vue-publish-important'
`
2.注册
`
components:{Nav}
`
3.使用
`
div
Nav(:info="navData")
`
4.数据实例
`
export default{
name:'Haha',
components:{ Hehe,InputOne ,Nav},
data(){
return {
navData:{
title:"巴宝莉",
left:[{
content:"新闻",
href:"http://www.baidu.com"
},{
content:"军事",
href:"http://www.163.com",
child:[
{
content:"解放军",
href:""
},
{
content:"武警",
href:""
},
{
content:"预备役",
href:""
}
]},
{
content:"历史",
href:"http://www.qq.com"
}],
inputmsg:"请输入要搜索的内容",
buttxt:"搜索",
right:[{
content:"新闻",
href:"http://www.baidu.com"
},{
content:"军事",
href:"http://www.163.com",
child:[
{
content:"解放军",
href:""
},
{
content:"武警",
href:""
},
{
content:"预备役",
href:""
}
]},
{
content:"历史",
href:"http://www.qq.com"
}],
}
}
}
``