forked from liulangnan/aui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactionsheet_frm.html
More file actions
41 lines (41 loc) · 1.67 KB
/
actionsheet_frm.html
File metadata and controls
41 lines (41 loc) · 1.67 KB
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
<!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" tapmode onclick="openActionsheet()">打开底部选择器</div>
</section>
<section class="aui-content-padded">
<p>点击了第<strong class="aui-text-danger" id="button-index"></strong>个按钮(buttonIndex)</p>
<p>当前点击按钮的标题为:<strong class="aui-text-info" id="button-title"></strong>(buttonTitle)</p>
</section>
</body>
<script type="text/javascript" src="../script/api.js" ></script>
<script type="text/javascript" src="../script/aui-actionsheet.js" ></script>
<script type="text/javascript">
apiready = function(){
api.parseTapmode();
}
var actionsheet = new auiActionsheet();
function openActionsheet(){
actionsheet.init({
frameBounces:true,//当前页面是否弹动,(主要针对安卓端)
title:"这里是标题",
cancelTitle:'这里取消按钮',
destructiveTitle:'红色警告按钮',
buttons:['拍照','图库选择']
},function(ret){
if(ret){
document.getElementById("button-index").textContent = ret.buttonIndex;
document.getElementById("button-title").textContent = ret.buttonTitle;
}
})
}
</script>
</html>