From 3fbb5e3166522734fd5407bcdf76c384d40e9dfa Mon Sep 17 00:00:00 2001 From: 明梦爽 <2972214568@qq.com> Date: 星期一, 10 一月 2022 16:03:25 +0800 Subject: [PATCH] 1.0 --- src/components/Home.vue | 48 +++++++++++++++++++----------------------------- 1 files changed, 19 insertions(+), 29 deletions(-) diff --git a/src/components/Home.vue b/src/components/Home.vue index a1c4611..b2af2cb 100644 --- a/src/components/Home.vue +++ b/src/components/Home.vue @@ -11,20 +11,8 @@ </el-header> <!-- 涓婚〉瀵艰埅鏍� --> <el-row> - <el-menu - mode="horizontal" - background-color="rgb(64, 112, 186)" - text-color="white" - class="menu" - active-text-color="#000000" - :default-active="activeIndex" - @select="handleSelect" - > - <el-menu-item - :key="index" - v-for="(item, index) in menuList" - :index="(item.id).toString()" - > + <el-menu mode="horizontal" background-color="rgb(64, 112, 186)" text-color="white" class="menu" active-text-color="#000000" :default-active="activeIndex" @select="handleSelect"> + <el-menu-item :key="index" v-for="(item, index) in menuList" :index="(item.id).toString()"> {{ item.contypeName }} </el-menu-item> </el-menu> @@ -46,28 +34,30 @@ data() { return { activeIndex: '1', - menuList: [], + menuList: [{contypeName: '棣栭〉',id: 1},{contypeName: '绉戝崗姒傚喌',id: 2},{contypeName: '鏀跨瓥娉曡',id: 3},{contypeName: '绉戝崗椤圭洰',id: 4}, + {contypeName: '瀛︽湳浜ゆ祦',id: 5},{contypeName: '鍔炰簨鎸囧崡',id: 6},{contypeName: '绉戞櫘椋庨噰',id: 7},{contypeName: '瀛︽牎棣栭〉',id: 8}, + {contypeName: '鑱旂郴鎴戜滑',id: 9}], } }, created() { - this.getNavArr(); + // this.getNavArr(); }, mounted() {}, watch: {}, methods: { - //鑾峰彇瀵艰埅鏍� - getNavArr(){ - const data ={}; - //.then() 涓昏鐢ㄤ簬涓�涓嚱鏁扮敤鍒板彟涓�涓嚱鏁扮殑杩斿洖鍊� - getNavList(data).then(res => { - console.log('res', res) - if(res.code == 200){ - this.menuList = res.data - } - }).catch(err => { - console.log('err', err) - }) - }, + // //鑾峰彇瀵艰埅鏍� + // getNavArr(){ + // const data ={}; + // getNavList(data).then(res => { + // console.log('res', res) + // if(res.code == 200){ + // this.menuList = res.data + // } + // }).catch(err => { + // console.log('err', err) + // }) + // }, + formatterTitle(t){ switch(t){ case '1': -- Gitblit v1.8.0