|
@@ -1,45 +1,103 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div>
|
3
|
|
- <el-menu
|
4
|
|
- default-active="2"
|
|
3
|
+ <el-container class='home-container'>
|
|
4
|
+ <el-aside :width="isCollapse ? '65px' : '200px'">
|
|
5
|
+ <div class='index-logo' :class='{"tosmall":isCollapse}'><h1>Ant Design Pro</h1></div>
|
|
6
|
+ <el-menu
|
|
7
|
+ default-active="1"
|
5
|
8
|
class="el-menu-vertical-demo"
|
6
|
9
|
@open="handleOpen"
|
7
|
|
- @close="handleClose">
|
|
10
|
+ @close="handleClose"
|
|
11
|
+ :collapse="isCollapse">
|
8
|
12
|
<el-submenu index="1">
|
9
|
13
|
<template slot="title">
|
10
|
|
- <i class="el-icon-location"></i>
|
11
|
|
- <span>导航一</span>
|
|
14
|
+ <i class="el-icon-mobile-phone"></i>
|
|
15
|
+ <span>Dashboard</span>
|
12
|
16
|
</template>
|
13
|
17
|
<el-menu-item-group>
|
14
|
18
|
<!-- <template slot="title">分组一</template> -->
|
15
|
|
- <el-menu-item index="1-1">选项1</el-menu-item>
|
16
|
|
- <el-menu-item index="1-2">选项2</el-menu-item>
|
|
19
|
+ <el-menu-item index="/panel">分析页</el-menu-item>
|
|
20
|
+ <el-menu-item index="1-2">监控页</el-menu-item>
|
|
21
|
+ <el-menu-item index="1-2">工作台</el-menu-item>
|
17
|
22
|
</el-menu-item-group>
|
18
|
23
|
</el-submenu>
|
19
|
24
|
<el-submenu index="2">
|
20
|
25
|
<template slot="title">
|
21
|
|
- <i class="el-icon-location"></i>
|
22
|
|
- <span>导航一</span>
|
|
26
|
+ <i class="el-icon-tickets"></i>
|
|
27
|
+ <span>表单页</span>
|
23
|
28
|
</template>
|
24
|
29
|
<el-menu-item-group>
|
25
|
30
|
<!-- <template slot="title">分组一</template> -->
|
26
|
|
- <el-menu-item index="2-1">选项1</el-menu-item>
|
27
|
|
- <el-menu-item index="2-2">选项2</el-menu-item>
|
|
31
|
+ <el-menu-item index="2-1">基础表单</el-menu-item>
|
|
32
|
+ <el-menu-item index="2-2">分步表单</el-menu-item>
|
|
33
|
+ <el-menu-item index="2-3">高级表单</el-menu-item>
|
28
|
34
|
</el-menu-item-group>
|
29
|
35
|
</el-submenu>
|
30
|
36
|
<el-submenu index="3">
|
31
|
37
|
<template slot="title">
|
32
|
|
- <i class="el-icon-location"></i>
|
33
|
|
- <span>导航一</span>
|
|
38
|
+ <i class="el-icon-document"></i>
|
|
39
|
+ <span>列表页</span>
|
34
|
40
|
</template>
|
35
|
41
|
<el-menu-item-group>
|
36
|
42
|
<!-- <template slot="title">分组一</template> -->
|
37
|
|
- <el-menu-item index="3-1">选项1</el-menu-item>
|
38
|
|
- <el-menu-item index="3-2">选项2</el-menu-item>
|
|
43
|
+ <el-menu-item index="3-1">查询表格</el-menu-item>
|
|
44
|
+ <el-menu-item index="3-2">标准表格</el-menu-item>
|
|
45
|
+ <el-menu-item index="3-3">查询表格</el-menu-item>
|
|
46
|
+ <el-menu-item index="3-4">标准表格</el-menu-item>
|
|
47
|
+ </el-menu-item-group>
|
|
48
|
+ </el-submenu>
|
|
49
|
+ <el-submenu index="4">
|
|
50
|
+ <template slot="title">
|
|
51
|
+ <i class="el-icon-printer"></i>
|
|
52
|
+ <span>详情页</span>
|
|
53
|
+ </template>
|
|
54
|
+ <el-menu-item-group>
|
|
55
|
+ <!-- <template slot="title">分组一</template> -->
|
|
56
|
+ <el-menu-item index="4-1">基础详情页</el-menu-item>
|
|
57
|
+ <el-menu-item index="4-2">高级详情页</el-menu-item>
|
|
58
|
+ </el-menu-item-group>
|
|
59
|
+ </el-submenu>
|
|
60
|
+ <el-submenu index="5">
|
|
61
|
+ <template slot="title">
|
|
62
|
+ <i class="el-icon-success"></i>
|
|
63
|
+ <span>结果页</span>
|
|
64
|
+ </template>
|
|
65
|
+ <el-menu-item-group>
|
|
66
|
+ <!-- <template slot="title">分组一</template> -->
|
|
67
|
+ <el-menu-item index="5-1">成功页</el-menu-item>
|
|
68
|
+ <el-menu-item index="5-2">失败页</el-menu-item>
|
|
69
|
+ </el-menu-item-group>
|
|
70
|
+ </el-submenu>
|
|
71
|
+ <el-submenu index="6">
|
|
72
|
+ <template slot="title">
|
|
73
|
+ <i class="el-icon-warning"></i>
|
|
74
|
+ <span>异常页</span>
|
|
75
|
+ </template>
|
|
76
|
+ <el-menu-item-group>
|
|
77
|
+ <!-- <template slot="title">分组一</template> -->
|
|
78
|
+ <el-menu-item index="6-1">403</el-menu-item>
|
|
79
|
+ <el-menu-item index="6-2">404</el-menu-item>
|
|
80
|
+ <el-menu-item index="6-3">500</el-menu-item>
|
|
81
|
+ </el-menu-item-group>
|
|
82
|
+ </el-submenu>
|
|
83
|
+ <el-submenu index="7">
|
|
84
|
+ <template slot="title">
|
|
85
|
+ <i class="el-icon-service"></i>
|
|
86
|
+ <span>个人页</span>
|
|
87
|
+ </template>
|
|
88
|
+ <el-menu-item-group>
|
|
89
|
+ <!-- <template slot="title">分组一</template> -->
|
|
90
|
+ <el-menu-item index="7-1">个人中心</el-menu-item>
|
|
91
|
+ <el-menu-item index="7-2">个人设置</el-menu-item>
|
39
|
92
|
</el-menu-item-group>
|
40
|
93
|
</el-submenu>
|
41
|
94
|
</el-menu>
|
42
|
|
- <input type="text" maxlength='20' style='width:500px;'>
|
|
95
|
+ </el-aside>
|
|
96
|
+ <el-container>
|
|
97
|
+ <el-header><div class='menu-icon' @click='changeMenu'><i class='el-icon-arrow-right' v-if='isCollapse'></i><i class='el-icon-arrow-left' v-else></i></div></el-header>
|
|
98
|
+ <el-main class='right-container'>Main</el-main>
|
|
99
|
+ </el-container>
|
|
100
|
+ </el-container>
|
43
|
101
|
</div>
|
44
|
102
|
</template>
|
45
|
103
|
<script>
|
|
@@ -47,6 +105,7 @@ export default {
|
47
|
105
|
name: 'homepage',
|
48
|
106
|
data () {
|
49
|
107
|
return {
|
|
108
|
+ isCollapse: false
|
50
|
109
|
}
|
51
|
110
|
},
|
52
|
111
|
methods: {
|
|
@@ -55,10 +114,65 @@ export default {
|
55
|
114
|
},
|
56
|
115
|
handleOpen () {
|
57
|
116
|
console.log('handleOpen')
|
|
117
|
+ },
|
|
118
|
+ changeMenu () {
|
|
119
|
+ this.isCollapse = !this.isCollapse
|
58
|
120
|
}
|
59
|
121
|
}
|
60
|
122
|
}
|
61
|
123
|
</script>
|
62
|
|
-<style>
|
63
|
|
-
|
|
124
|
+<style lang='scss'>
|
|
125
|
+ .el-aside {
|
|
126
|
+ // background-color: #D3DCE6;
|
|
127
|
+ color: #333;
|
|
128
|
+ text-align: center;
|
|
129
|
+ /* line-height: 200px; */
|
|
130
|
+ }
|
|
131
|
+ .el-menu-item-group__title {
|
|
132
|
+ padding-top: 0px;
|
|
133
|
+ }
|
|
134
|
+ .el-main {
|
|
135
|
+ background-color: #E9EEF3;
|
|
136
|
+ color: #333;
|
|
137
|
+ text-align: center;
|
|
138
|
+ /* line-height: 160px; */
|
|
139
|
+ }
|
|
140
|
+ .home-container {
|
|
141
|
+ height: 100%;
|
|
142
|
+ min-width: 1366px;
|
|
143
|
+ }
|
|
144
|
+ .index-logo {
|
|
145
|
+ transition: 0.3s;
|
|
146
|
+ cursor: pointer;
|
|
147
|
+ h1{
|
|
148
|
+ color:#1890ff;
|
|
149
|
+ font-size: 20px;
|
|
150
|
+ font-weight: 600;
|
|
151
|
+ margin: 0px;
|
|
152
|
+ overflow: hidden;
|
|
153
|
+ }
|
|
154
|
+ height: 64px;
|
|
155
|
+ position: relative;
|
|
156
|
+ line-height: 64px;
|
|
157
|
+ background-color: white;
|
|
158
|
+ box-shadow:1px 1px 0 0 #e8e8e8;
|
|
159
|
+ }
|
|
160
|
+ .el-header {
|
|
161
|
+ display: flex;
|
|
162
|
+ align-content: center;
|
|
163
|
+ justify-content: space-between;
|
|
164
|
+ height: 64px !important;
|
|
165
|
+ padding: 0px;
|
|
166
|
+ padding-right: 20px;
|
|
167
|
+ .menu-icon {
|
|
168
|
+ height: 64px;
|
|
169
|
+ line-height: 64px;
|
|
170
|
+ text-align: center;
|
|
171
|
+ width:64px;
|
|
172
|
+ cursor: pointer;
|
|
173
|
+ }
|
|
174
|
+ }
|
|
175
|
+ .tosmall {
|
|
176
|
+ width: 64px;
|
|
177
|
+ }
|
64
|
178
|
</style>
|