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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
import Drawer from '../src/index';
import Menu from '../../menu/index';
import Icon from '../../icon/index';
import '../assets/index.less';
import '../../menu/style/index';
import '../../icon/style/index';
var SubMenu = Menu.SubMenu;
var MenuItemGroup = Menu.ItemGroup;
export default {
data: function data() {
return {
show: true
};
},
mounted: function mounted() {
this.$nextTick(function () {
setTimeout(function () {
// this.show = false
}, 2000);
});
},
render: function render() {
var h = arguments[0];
var drawerProps = {
props: {
wrapperClassName: 'drawer-wrapper',
width: '20vw'
},
slots: {
handler: function handler() {
return h(
'div',
{ 'class': 'drawer-handle', on: {
'click': function click() {
return alert('click');
}
}
},
[h('i', { 'class': 'drawer-handle-icon' })]
);
}
}
};
return h('div', [this.show && h(
Drawer,
drawerProps,
[h(
Menu,
{
attrs: { defaultSelectedKeys: ['1'], defaultOpenKeys: ['sub1'], mode: 'inline' }
},
[h(
SubMenu,
{
key: 'sub1',
attrs: { title: h('span', [h(Icon, {
attrs: { type: 'mail' }
}), h('span', ['Navigation One'])])
}
},
[h(
MenuItemGroup,
{ key: 'g1', attrs: { title: 'Item 1' }
},
[h(
Menu.Item,
{ key: '1' },
['Option 1']
), h(
Menu.Item,
{ key: '2' },
['Option 2']
)]
), h(
MenuItemGroup,
{ key: 'g2', attrs: { title: 'Item 2' }
},
[h(
Menu.Item,
{ key: '3' },
['Option 3']
), h(
Menu.Item,
{ key: '4' },
['Option 4']
)]
)]
), h(
SubMenu,
{
key: 'sub2',
attrs: { title: h('span', [h(Icon, {
attrs: { type: 'appstore' }
}), h('span', ['Navigation Two'])])
}
},
[h(
Menu.Item,
{ key: '5' },
['Option 5']
), h(
Menu.Item,
{ key: '6' },
['Option 6']
), h(
SubMenu,
{ key: 'sub3', attrs: { title: 'Submenu' }
},
[h(
Menu.Item,
{ key: '7' },
['Option 7']
), h(
Menu.Item,
{ key: '8' },
['Option 8']
)]
)]
), h(
SubMenu,
{
key: 'sub4',
attrs: { title: h('span', [h(Icon, {
attrs: { type: 'setting' }
}), h('span', ['Navigation Three'])])
}
},
[h(
Menu.Item,
{ key: '9' },
['Option 9']
), h(
Menu.Item,
{ key: '10' },
['Option 10']
), h(
Menu.Item,
{ key: '11' },
['Option 11']
), h(
Menu.Item,
{ key: '12' },
['Option 12']
)]
)]
)]
), h(
'div',
{
style: {
width: '100%',
height: 667,
background: '#fff000',
color: '#fff',
textAlign: 'center',
lineHeight: '667px'
}
},
['\u5185\u5BB9\u533A\u5757']
)]);
}
};