VHome.vue
671 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<template>
<ul>
<li v-for="(enterprise,index) in enterprises"
:key="index" @click="toEnterprise(enterprise.id)">
{{enterprise.name}}
</li>
</ul>
</template>
<script>
export default {
name: 'VHome',
data(){
return {
enterprises:[
{name:'企业1',id:1},
{name:'企业2',id:2},
{name:'企业3',id:3},
]
}
},
methods: {
toEnterprise(id){
console.log(id)
this.$router.push({name:'enterprise',params:{id:id}})
}
}
}
</script>
<style scoped lang="scss">
ul li{
@include border-radius(100%);
background-color: #00ffff;
color: $baseColor;
}
</style>