forked from liulangnan/aui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup_frm.html
62 lines (62 loc) · 2.72 KB
/
popup_frm.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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>AUI快速完成布局</title>
<link rel="stylesheet" type="text/css" href="../css/aui.css" />
</head>
<body>
<section class="aui-content-padded">
<div class="aui-btn aui-btn-primary" tapmode onclick="showPopup('top-left')">左上角</div>
<div class="aui-btn aui-btn-primary" tapmode onclick="showPopup('top')">顶部中间</div>
<div class="aui-btn aui-btn-primary" tapmode onclick="showPopup('top-right')">右上角</div>
</section>
<section class="aui-content-padded">
<div class="aui-btn aui-btn-info" tapmode onclick="showPopup('bottom-left')">左下角</div>
<div class="aui-btn aui-btn-info" tapmode onclick="showPopup('bottom')">底部中间</div>
<div class="aui-btn aui-btn-info" tapmode onclick="showPopup('bottom-right')">右下角</div>
</section>
<section class="aui-content-padded">
<p>点击了第<strong class="aui-text-danger" id="button-index"></strong>个按钮(buttonIndex)</p>
<p>点击按钮的值为<strong class="aui-text-danger" id="button-value"></strong>(buttonValue)</p>
</section>
</body>
<script type="text/javascript" src="../script/api.js" ></script>
<script type="text/javascript" src="../script/aui-popup-new.js" ></script>
<script type="text/javascript">
var popup = new auiPopup();
function showPopup(location){
popup.init({
frameBounces:true,//当前页面是否弹动,(主要针对安卓端)
location:location,//位置,top(默认:顶部中间),top-left top-right,bottom,bottom-left,bottom-right
buttons:[{
image:'../image/share/wx.png',
text:'微信',
value:'wx'//可选
},{
image:'../image/share/wx-circle.png',
text:'朋友圈',
value:'wx-circle'
},{
image:'../image/share/qq.png',
text:'QQ好友',
value:'qq'
},{
image:'../image/share/qzone.png',
text:'QQ空间',
value:'qq-qzone'
},{
image:'../image/share/sina-weibo.png',
text:'新浪微博'
}],
},function(ret){
if(ret){
document.getElementById("button-index").textContent = ret.buttonIndex;
document.getElementById("button-value").textContent = ret.buttonValue;
}
})
}
</script>
</html>