-
Notifications
You must be signed in to change notification settings - Fork 14
/
demo.html
390 lines (368 loc) · 13.9 KB
/
demo.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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>组件示例</title>
<!--easyui-->
<script src="easyui/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="easyui/locale/easyui-lang-zh_CN.js" type="text/javascript" charset="utf-8"></script>
<script src="easyui-extensions/jeasyui.extensions.ty.js" type="text/javascript" charset="utf-8"></script>
<!--字体图标-->
<link rel="stylesheet" type="text/css" href="easyui/themes/icons/css/font-awesome.min.css"/>
<link rel="stylesheet" href="easyui/themes/gray/easyui.css">
<link rel="stylesheet" href="css/superBlue.css">
<script src="js/super.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
#index {
padding: 15px;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
opacity: 0;
font-size: 12px;
}
#index .demoIndex {
margin-right: 15px;
}
#index .demoIndex:last-child {
margin-right: 0;
}
#index fieldset {
padding: 15px;
border: 1px solid #ccc;
}
#index legend {
padding: 0 10px;
}
#index fieldset h3 {
margin: 10px 0;
}
.index-l {
padding: 10px;
width: 48%;
overflow: auto;
}
.form-item {
margin-bottom: 10px;
width: 50%;
float: left;
}
.form-item > label {
min-width: 72px;
display: inline-block;
}
.form-item input,
select {
width: 170px;
}
.contentWrapper {
padding: 10px;
}
</style>
</head>
<body>
<div id="index">
<!--表格-->
<div class="index-l">
<table id="dg"></table>
</div>
<!--表单-->
<div class="index-l">
<div id="p" class="easyui-panel" title="panel"
data-options="iconCls:'fa fa-tags',closable:true,collapsible:true,minimizable:true,maximizable:true">
<div class="contentWrapper">
<form id="ff" method="post">
<div class="form-item">
<label for="" class="label-top">用户名:</label>
<input id="username" class="easyui-validatebox easyui-textbox" prompt="请输入用户名"
data-options="required:true,validType:'length[3,10]'">
</div>
<div class="form-item">
<label for="" class="label-top">文本输入框:</label>
<input class="easyui-textbox" data-options="iconCls:'fa fa-user',iconAlign:'left'"
prompt="请输入文本">
</div>
<div class="form-item">
<label for="" class="label-top">密码输入框:</label>
<input class="easyui-passwordbox" prompt="Password" iconWidth="28">
</div>
<div class="form-item">
<label for="" class="label-top">下拉框:</label>
<select id="ec" class="easyui-combobox" data-options="editable:false,panelHeight:null"
name="dept">
<option value="aa">选项1</option>
<option>选项2</option>
<option>伤害</option>
<option>电风扇</option>
<option>共担风险</option>
</select>
</div>
<div class="form-item">
<label for="" class="label-top">数值输入框:</label>
<input type="text" class="easyui-numberbox" value="100" data-options="min:0,precision:2"/>
</div>
<div class="form-item">
<label for="" class="label-top">日历:</label>
<input id="dd" type="text" class="easyui-datebox" required="required"/>
</div>
<div class="form-item">
<label for="" class="label-top">数字微调:</label>
<input id="ss" class="easyui-numberspinner" required="required"
data-options="min:10,max:100,editable:false">
</div>
<div class="form-item">
<label for="" class="label-top">文件选择:</label>
<input class="easyui-filebox" data-options="buttonText:'上传头像',buttonIcon:'fa fa-upload'">
</div>
<div class="form-item">
<input class="easyui-slider" value="12" style="width:300px" data-options="showTip:true"/>
</div>
</form>
</div>
</div>
</div>
<!--按钮-->
<div class="index-l">
<a href="#" title="This is the tooltip message." class="easyui-tooltip"
data-options="position:'right'">Hoverme</a>
<a href="javascript:void(0)" id="mb" class="easyui-menubutton"
data-options="menu:'#mm',noline:true,iconCls:'fa fa-tags'">Edit</a>
<div id="mm">
<div>Undo</div>
<div>
<span>Open</span>
<div style="width:150px;">
<div><b>Word</b></div>
<div>
<span>Open</span>
<div style="width:150px;">
<div><b>Word</b></div>
<div>Excel</div>
<div>PowerPoint</div>
</div>
</div>
<div>PowerPoint</div>
</div>
</div>
<div>Cut</div>
<div>Copy</div>
<div>Paste</div>
<div class="menu-sep"></div>
<div>Delete</div>
<div>Select All</div>
</div>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'fa fa-tags'">我是按钮</a>
<a href="javascript:void(0)" class="easyui-linkbutton default">我也是按钮</a>
<a href="javascript:void(0)" class="easyui-linkbutton primary" data-options="iconCls:'fa fa-area-chart'"></a>
<a href="javascript:void(0)" class="easyui-linkbutton error" data-options="iconCls:'fa fa-gears'"></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="disabled:true">禁用按钮</a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="plain:true">简洁按钮</a>
<h3>开关</h3>
<input class="easyui-switchbutton" checked>
<input class="easyui-switchbutton" data-options="onText:'开',offText:'关'">
<input class="easyui-switchbutton" data-options="disabled:true">
<a id="myWin-btn" href="javascript:void(0)" class="easyui-linkbutton primary">对话窗口</a>
<div id="myWin" style="display: none;">对话框窗口内容。</div>
<a id="myWin-btn2" href="javascript:void(0)" class="easyui-linkbutton info">选择窗口</a>
<a id="myWin-btn3" href="javascript:void(0)" class="easyui-linkbutton success">警告窗口</a>
<a id="myWin-btn5" href="javascript:void(0)" class="easyui-linkbutton warning">提示窗口</a>
<a id="myWin-btn4" href="javascript:void(0)" class="easyui-linkbutton error">显示消息</a>
</div>
<!--tab-->
<div class="index-l">
<div id="tt" class="easyui-tabs" data-options="tabHeight:31" style="width:100%;height:100px;">
<div title="Tab1" style="padding:20px;display:none;">
tab1
</div>
<div title="Tab2" style="overflow:auto;padding:20px;display:none;">
tab2
</div>
<div title="Tab3" data-options="iconCls:'fa fa-user',closable:true" style="padding:20px;display:none;">
tab3
</div>
</div>
</div>
<!--accordion和树形-->
<div class="index-l">
<div id="aa" class="easyui-accordion" style="width:300px;height:200px;">
<div title="Title1" data-options="iconCls:'fa fa-save',selected:true">
<ul id="tree"></ul>
</div>
<div title="Title2" data-options="iconCls:'fa fa-tasks'">
看我
</div>
<div title="Title3" data-options="iconCls:'fa fa-star-half-full'">
你在害怕什么
</div>
</div>
</div>
<!--布局-->
<div class="index-l">
<div id="cc" class="easyui-layout" style="width:100%;height:400px;">
<div data-options="region:'north',title:'North Title',split:true" style="height:100px;"></div>
<div data-options="region:'south',title:'South Title',split:true" style="height:100px;"></div>
<div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true"
style="width:100px;"></div>
<div data-options="region:'west',title:'West',split:true" style="width:100px;"></div>
<div data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;"></div>
</div>
</div>
<!--树形表格-->
<div class="index-l">
<table id="ttg" style="width:600px;height:400px"></table>
</div>
<div class="index-l">
<table id="pg" style="width:300px"></table>
</div>
</div>
<script type="text/javascript">
$("#myWin-btn").on('click', function () {
$('#myWin').window({
width: 500,
height: 300,
modal: true,
constrain: true,
toolbar: [{
text: '编辑',
iconCls: 'fa fa-cubes',
handler: function () {
alert('edit')
}
}, {
text: '帮助',
iconCls: 'fa fa-envelope',
handler: function () {
alert('help')
}
}],
buttons: [{
text: '保存',
handler: function () {
}
}, {
text: '关闭',
handler: function () {
}
}]
});
});
$("#myWin-btn2").on('click', function () {
$.messager.confirm('确认', '您确认想要删除记录吗?', function (r) {
if (r) {
alert('确认删除');
}
});
});
$("#myWin-btn3").on('click', function () {
//error,question,info,warning
$.messager.alert('警告', '警告消息', 'warning', function () {
$.messager.alert('警告', '警告消息2', 'error');
});
});
$("#myWin-btn5").on('click', function () {
$.messager.prompt('提示信息', '请输入姓名:', function (r) {
if (r) {
alert('你的姓名是:' + r);
}
});
});
$("#myWin-btn4").on('click', function () {
$.messager.show({
title: '我的消息',
msg: '消息将在3秒后关闭。',
timeout: 3000,
showType: 'slide'
});
});
$('#dg').datagrid({
url: 'js/data/datagrid_data.json',
fit: true,
pagination: true,
fitColumns: true,
height: 400,
columns: [
[{
field: 'productid',
title: 'productid',
width: 100,
sortable: true
}, {
field: 'productname',
title: 'productname',
width: 100,
sortable: true
}, {
field: 'unitcost',
title: 'unitcost',
width: 100,
align: 'right',
sortable: true
}, {
field: 'status',
title: 'status',
width: 100,
align: 'right'
}, {
field: 'listprice',
title: 'listprice',
width: 100,
align: 'right'
}, {
field: 'attr1',
title: 'attr1',
width: 100,
align: 'right'
}, {
field: 'itemid',
title: 'itemid',
width: 100,
align: 'right'
}]
]
});
$(function () {
/*平滑数据*/
var tree_data2 = [
{"id": "1", "text": "A"},
{"id": "11", "text": "A1", "parentId": "1"},
{"id": "12", "text": "A2", "parentId": "1"},
{"id": "13", "text": "A3", "parentId": "1"},
{"id": "2", "text": "B"},
{"id": "3", "text": "C"}
];
$('#tree').tree({
//data: tree_data2,
url: 'js/data/tree_data.json',
parentField: 'parentId',
checkbox: true,
animate: true
});
/*树形表格*/
$('#ttg').treegrid({
url: 'js/data/tree_grid_data.json',
idField: 'id',
treeField: 'name',
columns: [[{
field: 'name',
title: 'name'
}, {
field: 'size',
title: 'size',
width: 100
}, {
field: 'date',
title: 'date',
width: 100
}]]
});
/*属性表格*/
$('#pg').propertygrid({
url: 'js/data/pg_data.json',
showGroup: true,
scrollbarSize: 0
});
})
</script>
</body>
</html>