-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathuseDocShade.html
80 lines (80 loc) · 3.57 KB
/
useDocShade.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
<title>vue-sal-admin-h5 By LC</title>
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="js/element-ui/theme-chalk/index.css" />
<link rel="stylesheet" href="css/layui-icon.css">
<link rel="stylesheet" href="css/tab-style.css" />
<link rel="stylesheet" href="css/sal-doc.css" />
</head>
<body>
<div id="app" v-clock>
<br />
<el-card class="box-card desc">
<p>调用全屏遮罩:</p>
<p>打开遮罩时,可以传入一个毫秒数,控制其自动关闭的时间,当然,也可以手动关闭,调用parent.api.closeLoading()即可。</p>
<template>
<el-button plain @click="openLoading">
打开遮罩,两千毫秒后关闭
</el-button>
</template>
<textarea class="code_view" readonly rows="1">
parent.api.openLoading(2000);</textarea>
</el-card>
</div>
<script src="js/gobal.js"></script>
<script src="js/vue.min.js"></script>
<script src="js/element-ui/index.js"></script>
<script src="js/parent-api.js"></script><!-- parent API -->
<script>
new Vue({
el: '#app',
data: function() {
return {
btns: {
del: api.cr('apiceshixiugai'),
edit: api.cr('apiceshishanchu'),
read: api.cr('apiceshichakan')
}
}
},
methods: {
showMsgSuccess: function() {
parent.api.showMsg('success', '000231', '这是一条成功的提示消息');
},
showMsgWarning: function() {
parent.api.showMsg('warning', '000232', '这是一条警告的提示消息');
},
showMsgInfo: function() {
parent.api.showMsg('info', '000233', '这是一条消息的提示消息');
},
showMsgError: function() {
parent.api.showMsg('error', '000234', '这是一条错误的提示消息');
},
showMsgByHtml: function() {
parent.api.showMsgByHtml('HTML 片段', '<strong>这是 <i>HTML</i> 片段</strong>');
},
openLoading: function() {
parent.api.openLoading(2000);
},
jumpTab: function() {
parent.api.jumpTab('newTabId', 'newTabTitle', 'newTitleUrl', 'newTitleIcon');
},
jumpTabParams: function() {
parent.api.setTabParams('newTabParamsId', {
oneParam: 'AA'
});
parent.api.jumpTab('newTabParamsId', 'newTabParamsTitle', 'newTabParamsUrl.html',
'newTabIcon');
},
jumpAjaxTab: function() {
parent.api.jumpTab('Ajax_API', 'Ajax API', 'ajaxTest.html');
}
}
});
</script>
</body>
</html>