-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathindex.html
311 lines (290 loc) · 10.9 KB
/
index.html
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<html>
<head>
<title>基于vue+elementui</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- 引入样式 -->
<link rel="stylesheet" href="lib/elementui/theme-chalk/index.css" type="text/css">
<style>
body {
margin: 0px;
}
/* 所有 */
#app {
width: 100%;
height: 100%;
}
/* 头 */
.header {
color: rgba(255, 255, 255, 0.75);
line-height: 60px;
background-color: #24292e;
text-align: center;
}
.header div {
display: inline;
}
.title {
}
.author {
float: right;
}
.author-img {
width: 20px;
height: 20px;
}
.author-github {
cursor: pointer;
}
/* 内容区 */
.container {
min-height: 600px;
width: 100%;
height: 100%
}
/* 左边内容区 */
.left {
color: #4b595f;
width: 200px;
}
.left .totalUl {
height: 93%;
}
/* 右边内容区 */
.right {
min-width: 200px;
}
tbody {
font-size: 15px;
color: #4b595f;
}
</style>
</head>
<body>
<div id="app">
<el-container class="container">
<el-header class="header">
<div class="title">
<span>余小乐的个人demo网站</span>
</div>
<div @click="openGitHub" class="author">
<i class="el-icon-location-outline author-github">yuleGH</i>
<img title="gitHub 主页" alt="@yuleGH" class="author-img author-github"
src="https://avatars2.githubusercontent.com/u/31040588?s=40&v=4">
</div>
</el-header>
<el-container>
<el-aside class="left">
<el-menu :default-active="activeIndex" class="totalUl">
<el-menu-item index="1" @click="open(aboutMeUrl)"><i class="el-icon-service"></i>关于我</el-menu-item>
<el-submenu :index="firstMenu.id" v-for="firstMenu in menus" :key="firstMenu.id">
<template slot="title"><i :class="firstMenu.iconClass"></i>{{ firstMenu.name }}</template>
<el-menu-item-group v-for="secondMenu in firstMenu.children" :key="secondMenu.id">
<template slot="title">{{ secondMenu.name }}</template>
<el-menu-item v-for="thirdMenu in secondMenu.children" :index="thirdMenu.id"
:key="thirdMenu.id" @click="open(thirdMenu.url)">{{ thirdMenu.name }}
</el-menu-item>
</el-menu-item-group>
</el-submenu>
</el-aside>
<el-main class="right">
<iframe style="width:100%; height:100%; border: 0;" :src="iframeUrl"></iframe>
</el-main>
</el-container>
</el-container>
</div>
<!-- 引入组件库 -->
<script type="text/javascript" src="lib/vue.js"></script>
<script type="text/javascript" src="lib/elementui/index.js"></script>
<script type="text/javascript">
new Vue({
el: "#app",
data: {
activeIndex: "1",
aboutMeUrl: "aboutme.html",
iframeUrl: "aboutme.html",
menus: [
{
name: "时间控件",
id: "date",
iconClass: "el-icon-time",
children: [
{
name: "DatePicker 日期选择器",
id: "DatePicker",
children: [
{name: "年月日时分", id: "DatePicker-demo1", url: "date/demoElDatePicker.html"},
{name: "多日期选择", id: "DatePicker-mutidemo", url: "date/demoMultipleDate.html"}
]
}
]
},
{
name: "Form",
id: "form",
iconClass: "el-icon-edit-outline",
children: [
{
name: "Input",
id: "input",
children: [
{name: "小写转大写", id: "input-demo1", url: "form/demoUpper.html"}
]
},
{
name: "validateRules",
id: "validateRules",
children: [
{name: "动态修改校验规则", id: "validateRules-demo", url: "form/validateRules.html"}
]
}
]
},
{
name: "Table",
id: "Table",
iconClass: "el-icon-tickets",
children: [
{
name: "自定义列模板",
id: "ZDYLMB",
children: [
{name: "全部都是自定义列", id: "zdylmb-demo1", url: "table/defineTemplateSelf.html"},
{name: "自定义表头", id: "custom-table-header", url: "table/customTableHeader.html"},
{name: "将列封装为组件", id: "component-demo1", url: "table/componentTable.html"},
{name: "动态渲染整个表格", id: "dynamic-table", url: "table/dynamicTable.html"}
]
},
{
name: "多选表格",
id: "DXBG",
children: [
{name: "反正官网上没有这个demo", id: "DXBG-demo1", url: "table/checkbox1.html"}
]
}
]
},
{
name: "Dialog",
id: "Dialog",
iconClass: "el-icon-message",
children: [
{
name: "Notification 通知",
id: "notification",
children: [
{name: "使用vNode", id: "noti-demo1", url: "dialog/notification/notification.html"}
]
}
]
},
{
name: "Tabs 标签页",
id: "Tab",
iconClass: "el-icon-more",
children: [
{
name: "Tab",
id: "Tab1",
children: [
{name: "动态增减,切换时提示用户是否切换", id: "tab-demo1", url: "tab/tabDemo.html"}
]
}
]
},
{
name: "组件",
id: "component",
iconClass: "el-icon-news",
children: [
{
name: "数据绑定",
id: "databind",
children: [
{name: "双向绑定", id: "databind-demo1", url: "component/demoDataBindTwoWay.html"}
]
}
]
},
{
name: "上传文件",
id: "upload",
iconClass: "el-icon-news",
children: [
{
name: "上传文件",
id: "uploadFile",
children: [
{name: "上传文件-组件", id: "uploadForComponent", url: "upload/uploadForComponent.html"}
]
}
]
},
{
name: "播放器提示",
id: "audio",
iconClass: "el-icon-bell",
children: [
{
name: "声音提示",
id: "tip_mp3",
children: [
{name: "声音提示", id: "tip-mp3-demo1", url: "audio/audioMsgTip.html"}
]
}
]
},
{
name: "其他",
id: "other",
children: [
{
name: "跳转页面",
id: "other-skip-page",
children: [
{name: "在当页来回跳转", id: "other-skip-cur", url: "other/skipPage.html"}
]
},
{
name: "滚动条",
id: "other-scroll",
children: [
{name: "固定在可视区域", id: "other-scroll-demo1", url: "other/demoScroll.html"}
]
},
{
name: "复制",
id: "other-copy",
children: [
{name: "复制内容到粘贴板", id: "other-copy-demo1", url: "other/copyValue.html"}
]
},
{
name: "工具",
id: "other-tool",
children: [
{name: "js Date 工具", id: "other-date-tool", url: "other/dateTool.html"}
]
},
{
name: "js 数组",
id: "array-demo",
children: [
{name: "js 数组删除", id: "array-delete", url: "other/arrayDeleteTest.html"}
]
}
]
}
]
},
methods: {
open(url){
this.iframeUrl = url;
},
openGitHub(){
window.open("https://github.com/yuleGH", "_blank");
}
}
});
</script>
</body>
</html>