1、页面代码:
:default-active="activeIndex" router
class="el-menu-demo"
mode="horizontal"
@select="handleSelect"
background-color="#545c64"
text-color="#fff"
active-text-color="#ffd04b">
首页
達豐中国
達豐概况
達豐文化
達豐年鉴
宣传片
export default {
data() {
return {
activeIndex: ‘1‘,
activeIndex2: ‘1‘
};
},
computed:{
},
methods: {
handleSelect(key, keyPath) {
console.log(key, keyPath);
}
}
}
2、在index.js文件里设置跳转地址
import home from ‘@/page/home/home.vue‘
import about from ‘@/page/about/about.vue‘
import culture from ‘@/page/about