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
| Vue.component('webnav', {
| props: ["active"],
| data: function () {
| return {
| son2: this.active,
| }
| },
| methods: {
| onChange(index) {
| var that = this;
| var url = "";
| switch (index) {
| case 0:
| url = "/h5/Default.aspx";
| break;
| case 1:
| url = "/h5/Message.aspx";
| break;
| case 2:
| url = "/h5/My.aspx";
| break;
| }
| window.location.href = url;
| },
| },
| template: (
| ' <van-tabbar v-model="son2" @change="onChange">'
| + '<van-tabbar-item icon="wap-home-o">首页</van-tabbar-item>'
| + ' <van-tabbar-item icon="warning-o">消息</van-tabbar-item>'
| + ' <van-tabbar-item icon="user-o">我的</van-tabbar-item>'
| + '</van-tabbar>'
| )
| })
|
|