作者:mobiledu2502929547 | 来源:互联网 | 2023-08-13 09:13
Side.vue网站首页placeholder请输入iconsearchv-modelsearchCriteria:on-icon-clickhandleIconCl
Side.vue
网站首页
placeholder="请输入"
icon="search"
v-model="searchCriteria"
:on-icon-click="handleIconClick">
admin
个人信息
退出登录
export default {
data(){
return {
searchCriteria: '',
breadcrumbItems: ['导航一'],
}
},
components: {
commonfooter
},
methods:{
handleIconClick(ev) {
console.log(ev);
},
handleSelect(key, keyPath){
switch(key){
case '1':
this.$router.push('/Page1');
this.breadcrumbItems = ['导航一']
break;
case '2':
this.$router.push('/Page2')
this.breadcrumbItems = ['导航二']
break;
case '3':
this.$router.push('/Page3')
this.breadcrumbItems = ['导航三']
break;
}
},
},
}
.el-footer {
background-color: #B3C0D1;
color: #333;
text-align: center;
line-height: 60px;
}
.el-container {
margin-bottom: 40px;
}
src/router/index.js
{
path: '/success',//登录成功页面,根据需要自行修改
name: 'Success',
component: () => import('../components/side/Side'),//Side.vue路径
redirect:"Page1",//重定向,第一次进入就进入Page1,不添加的话第一次进入右侧是空白
children:[
{
path: '/Page1',
name: 'Page1',
component: () => import('../components/Page1')
},
{
path: '/Page2',
name: 'Page2',
component: () => import('../components/side/Page2')
},
{
path: '/Page3',
name: 'Page3',
component: () => import('../components/side/Page3')
}
]
}
Page2.vue(其他两个.vue文件自行设定)
export default {
data(){
return {}
}
}