1
|
<template>
|
1
|
<template>
|
2
|
- <Menu active-name="1-2" theme="light" width="auto" :open-names="['1']">
|
|
|
3
|
- <Submenu name="1">
|
|
|
4
|
- <template slot="title">
|
|
|
5
|
- <Icon type="ios-navigate"></Icon>
|
|
|
6
|
- Item 1
|
|
|
7
|
- </template>
|
|
|
8
|
- <MenuItem name="1-1">Option 1</MenuItem>
|
|
|
9
|
- <MenuItem name="1-2">Option 2</MenuItem>
|
|
|
10
|
- <MenuItem name="1-3">Option 3</MenuItem>
|
|
|
11
|
- </Submenu>
|
|
|
12
|
- <Submenu name="2">
|
|
|
13
|
- <template slot="title">
|
|
|
14
|
- <Icon type="ios-keypad"></Icon>
|
|
|
15
|
- Item 2
|
|
|
16
|
- </template>
|
|
|
17
|
- <MenuItem name="2-1">Option 1</MenuItem>
|
|
|
18
|
- <MenuItem name="2-2">Option 2</MenuItem>
|
|
|
19
|
- </Submenu>
|
|
|
20
|
- <Submenu name="3">
|
|
|
21
|
- <template slot="title">
|
|
|
22
|
- <Icon type="ios-analytics"></Icon>
|
|
|
23
|
- Item 3
|
|
|
24
|
- </template>
|
|
|
25
|
- <MenuItem name="3-1">Option 1</MenuItem>
|
|
|
26
|
- <MenuItem name="3-2">Option 2</MenuItem>
|
|
|
27
|
- </Submenu>
|
|
|
28
|
- </Menu>
|
2
|
+ <div class="sidebar">
|
|
|
3
|
+ <div class="sidebar-user">
|
|
|
4
|
+ <Avatar icon="person" size="large" src="../../../images/photos/user1.png" />
|
|
|
5
|
+ <span class="username">Username</span>
|
|
|
6
|
+ </div>
|
|
|
7
|
+ <Menu class="sidebar-menu" active-name="1-2" theme="light" width="auto" :open-names="['1']">
|
|
|
8
|
+ <Submenu name="1">
|
|
|
9
|
+ <template slot="title">
|
|
|
10
|
+ <Icon type="ios-navigate"></Icon>
|
|
|
11
|
+ Item 1
|
|
|
12
|
+ </template>
|
|
|
13
|
+ <MenuItem name="1-1">Option 1</MenuItem>
|
|
|
14
|
+ <MenuItem name="1-2">Option 2</MenuItem>
|
|
|
15
|
+ <MenuItem name="1-3">Option 3</MenuItem>
|
|
|
16
|
+ </Submenu>
|
|
|
17
|
+ <Submenu name="2">
|
|
|
18
|
+ <template slot="title">
|
|
|
19
|
+ <Icon type="ios-keypad"></Icon>
|
|
|
20
|
+ Item 2
|
|
|
21
|
+ </template>
|
|
|
22
|
+ <MenuItem name="2-1">Option 1</MenuItem>
|
|
|
23
|
+ <MenuItem name="2-2">Option 2</MenuItem>
|
|
|
24
|
+ </Submenu>
|
|
|
25
|
+ <Submenu name="2">
|
|
|
26
|
+ <template slot="title">
|
|
|
27
|
+ <Icon type="ios-keypad"></Icon>
|
|
|
28
|
+ Item 2
|
|
|
29
|
+ </template>
|
|
|
30
|
+ <MenuItem name="2-1">Option 1</MenuItem>
|
|
|
31
|
+ <MenuItem name="2-2">Option 2</MenuItem>
|
|
|
32
|
+ </Submenu>
|
|
|
33
|
+ <Submenu name="2">
|
|
|
34
|
+ <template slot="title">
|
|
|
35
|
+ <Icon type="ios-keypad"></Icon>
|
|
|
36
|
+ Item 2
|
|
|
37
|
+ </template>
|
|
|
38
|
+ <MenuItem name="2-1">Option 1</MenuItem>
|
|
|
39
|
+ <MenuItem name="2-2">Option 2</MenuItem>
|
|
|
40
|
+ </Submenu>
|
|
|
41
|
+ <Submenu name="2">
|
|
|
42
|
+ <template slot="title">
|
|
|
43
|
+ <Icon type="ios-keypad"></Icon>
|
|
|
44
|
+ Item 2
|
|
|
45
|
+ </template>
|
|
|
46
|
+ <MenuItem name="2-1">Option 1</MenuItem>
|
|
|
47
|
+ <MenuItem name="2-2">Option 2</MenuItem>
|
|
|
48
|
+ </Submenu>
|
|
|
49
|
+ <Submenu name="2">
|
|
|
50
|
+ <template slot="title">
|
|
|
51
|
+ <Icon type="ios-keypad"></Icon>
|
|
|
52
|
+ Item 2
|
|
|
53
|
+ </template>
|
|
|
54
|
+ <MenuItem name="2-1">Option 1</MenuItem>
|
|
|
55
|
+ <MenuItem name="2-2">Option 2</MenuItem>
|
|
|
56
|
+ </Submenu>
|
|
|
57
|
+ <Submenu name="2">
|
|
|
58
|
+ <template slot="title">
|
|
|
59
|
+ <Icon type="ios-keypad"></Icon>
|
|
|
60
|
+ Item 2
|
|
|
61
|
+ </template>
|
|
|
62
|
+ <MenuItem name="2-1">Option 1</MenuItem>
|
|
|
63
|
+ <MenuItem name="2-2">Option 2</MenuItem>
|
|
|
64
|
+ </Submenu>
|
|
|
65
|
+ <Submenu name="2">
|
|
|
66
|
+ <template slot="title">
|
|
|
67
|
+ <Icon type="ios-keypad"></Icon>
|
|
|
68
|
+ Item 2
|
|
|
69
|
+ </template>
|
|
|
70
|
+ <MenuItem name="2-1">Option 1</MenuItem>
|
|
|
71
|
+ <MenuItem name="2-2">Option 2</MenuItem>
|
|
|
72
|
+ </Submenu>
|
|
|
73
|
+ <Submenu name="2">
|
|
|
74
|
+ <template slot="title">
|
|
|
75
|
+ <Icon type="ios-keypad"></Icon>
|
|
|
76
|
+ Item 2
|
|
|
77
|
+ </template>
|
|
|
78
|
+ <MenuItem name="2-1">Option 1</MenuItem>
|
|
|
79
|
+ <MenuItem name="2-2">Option 2</MenuItem>
|
|
|
80
|
+ </Submenu>
|
|
|
81
|
+ <Submenu name="2">
|
|
|
82
|
+ <template slot="title">
|
|
|
83
|
+ <Icon type="ios-keypad"></Icon>
|
|
|
84
|
+ Item 2
|
|
|
85
|
+ </template>
|
|
|
86
|
+ <MenuItem name="2-1">Option 1</MenuItem>
|
|
|
87
|
+ <MenuItem name="2-2">Option 2</MenuItem>
|
|
|
88
|
+ </Submenu>
|
|
|
89
|
+ <Submenu name="3">
|
|
|
90
|
+ <template slot="title">
|
|
|
91
|
+ <Icon type="ios-analytics"></Icon>
|
|
|
92
|
+ Item 3
|
|
|
93
|
+ </template>
|
|
|
94
|
+ <MenuItem name="3-1">Option 1</MenuItem>
|
|
|
95
|
+ <MenuItem name="3-2">Option 2</MenuItem>
|
|
|
96
|
+ </Submenu>
|
|
|
97
|
+ </Menu>
|
|
|
98
|
+ </div>
|
29
|
</template>
|
99
|
</template>
|
|
|
100
|
+
|
|
|
101
|
+<style scoped lang="scss">
|
|
|
102
|
+.sidebar {
|
|
|
103
|
+ display: flex;
|
|
|
104
|
+ flex-direction: column;
|
|
|
105
|
+ height: 100%;
|
|
|
106
|
+}
|
|
|
107
|
+
|
|
|
108
|
+.sidebar-user {
|
|
|
109
|
+ padding: 10px 20px;
|
|
|
110
|
+ border: 1px solid #dddee1;
|
|
|
111
|
+ height: 65px;
|
|
|
112
|
+
|
|
|
113
|
+ .username {
|
|
|
114
|
+ display: inline-block;
|
|
|
115
|
+ padding: 0 10px;
|
|
|
116
|
+ height: 40px;
|
|
|
117
|
+ font-size: 18px;
|
|
|
118
|
+ line-height: 40px;
|
|
|
119
|
+ max-width: 120px;
|
|
|
120
|
+ overflow: hidden;
|
|
|
121
|
+ text-overflow: ellipsis;
|
|
|
122
|
+ vertical-align: middle;
|
|
|
123
|
+ }
|
|
|
124
|
+}
|
|
|
125
|
+
|
|
|
126
|
+.sidebar-menu {
|
|
|
127
|
+ flex: 1;
|
|
|
128
|
+ overflow: auto;
|
|
|
129
|
+}
|
|
|
130
|
+</style> |