-
Notifications
You must be signed in to change notification settings - Fork 50
/
mobile.vue
121 lines (120 loc) · 2.69 KB
/
mobile.vue
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<template>
<div>
<mu-appbar title="N2EX">
<mu-button
slot="left"
icon
@click="toggle()"
>
<mu-icon value="menu" />
</mu-button>
<mu-button
slot="right"
icon
href="https://github.com/OrangeXC/n2ex"
>
<i class="muidocs-icon-custom-github" />
</mu-button>
</mu-appbar>
<mu-drawer
:open.sync="open"
:docked="docked"
>
<mu-appbar title="Tabs" />
<mu-list @itemClick="docked ? '' : toggle()">
<mu-list-item
button
@click="toTab('tech')"
>
<mu-list-item-title>技术</mu-list-item-title>
</mu-list-item>
<mu-list-item
button
@click="toTab('play')"
>
<mu-list-item-title>好玩</mu-list-item-title>
</mu-list-item>
<mu-list-item
button
@click="toTab('apple')"
>
<mu-list-item-title>Apple</mu-list-item-title>
</mu-list-item>
<mu-list-item
button
@click="toTab('jobs')"
>
<mu-list-item-title>酷工作</mu-list-item-title>
</mu-list-item>
<mu-list-item
button
@click="toTab('deals')"
>
<mu-list-item-title>交易</mu-list-item-title>
</mu-list-item>
<mu-list-item
button
@click="toTab('city')"
>
<mu-list-item-title>城市</mu-list-item-title>
</mu-list-item>
<mu-list-item
button
@click="toTab('qna')"
>
<mu-list-item-title>问与答</mu-list-item-title>
</mu-list-item>
<mu-list-item
button
@click="toHome()"
>
<mu-list-item-title>最热</mu-list-item-title>
</mu-list-item>
<mu-list-item
button
@click="toNew()"
>
<mu-list-item-title>最新</mu-list-item-title>
</mu-list-item>
<mu-list-item
button
@click="toTab('nodes')"
>
<mu-list-item-title>节点</mu-list-item-title>
</mu-list-item>
</mu-list>
</mu-drawer>
<nuxt keep-alive />
</div>
</template>
<script>
export default {
data () {
return {
open: false,
docked: false
}
},
methods: {
toggle () {
this.open = !this.open
},
toHome () {
this.$router.push('/m')
this.toggle()
},
toNew () {
this.$router.push('/m/new')
this.toggle()
},
toNode (name) {
this.$router.push(`/m/node/${name}`)
this.toggle()
},
toTab (name) {
this.$router.push(`/m/tab/${name}`)
this.toggle()
}
}
}
</script>