添加了部分路由
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<div v-for="(i,j) in list" :key="j" style="overflow: hidden;" @click="routeto(j)">
|
||||
<div class="item" :class="{'selitem': j == selnum, 'seltop': j == selnum - 1, 'selbottom': j == selnum + 1}">
|
||||
<div class="route">
|
||||
<img src="" alt="" class="icon">
|
||||
<img :src="i.icon" alt="" class="icon">
|
||||
<div class="title">{{i.name}}</div>
|
||||
</div>
|
||||
<img src="" alt="" class="right">
|
||||
@@ -79,7 +79,6 @@
|
||||
.icon{
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-color: #0f0;
|
||||
}
|
||||
.title{
|
||||
font-size: 13px;
|
||||
@@ -118,47 +117,54 @@
|
||||
}
|
||||
</style>
|
||||
<script lang="ts">
|
||||
import router from '@/router';
|
||||
import { defineComponent, ref } from 'vue';
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
setup(){
|
||||
interface MenuItem {
|
||||
icon: string;
|
||||
sleicon: string;
|
||||
name: string;
|
||||
route: string;
|
||||
}
|
||||
// 左侧的列表数组
|
||||
const list: Array<MenuItem> = [
|
||||
{
|
||||
icon: "",
|
||||
icon: "../static/images/wode1.ping",
|
||||
sleicon:"",
|
||||
name: "我的档案",
|
||||
route: ""
|
||||
route: "/mine/archives"
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
icon: "../static/images/xiayig.ping",
|
||||
sleicon:"",
|
||||
name: "发布直播",
|
||||
route: ""
|
||||
route: "/mine/webcast"
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
icon: "../static/images/shipin.png",
|
||||
sleicon:"shipin.png",
|
||||
name: "上传视频",
|
||||
route: ""
|
||||
route: "/mine/video"
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
icon: "/static/images/yinhangka.png",
|
||||
sleicon:"",
|
||||
name: "我的钱包",
|
||||
route: ""
|
||||
route: "/mine/wallet"
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
icon: "../static/images/tongji.png",
|
||||
sleicon:"",
|
||||
name: "列表统计",
|
||||
route: ""
|
||||
route: "/mine/liststatistic"
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
icon: "../static/images/bangzhu@2x.png",
|
||||
sleicon:"",
|
||||
name: "关于Beelink",
|
||||
route: ""
|
||||
route: "/mine/aboutus"
|
||||
}
|
||||
]
|
||||
// 当前选中的index
|
||||
@@ -170,6 +176,9 @@ export default defineComponent({
|
||||
function routeto(index: number): void {
|
||||
console.log(index)
|
||||
selnum.value = index;
|
||||
router.push({
|
||||
path: list[index].route
|
||||
})
|
||||
|
||||
}
|
||||
return{
|
||||
|
||||
Reference in New Issue
Block a user