UNPKG

minxing-devtools-core

Version:
64 lines (62 loc) 2.52 kB
<!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>title</title> <link rel="stylesheet" type="text/css" href="../css/api.css" /> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <style> header{ background-color: #FCFCFC; line-height: 42px; height: 42px; position: relative; } header b{ width: 42px; height: 100%; display: inline-block; position: relative; z-index: 1; background: url() no-repeat center; background-size: 70% auto; } header b.ic-back{ background-image: url(../image/ic-back.png); } header b.ic-check{ background-image: url(../image/ic-check.png); float: right; } header .title{ position: absolute; left: 0; bottom: 0; right: 0; text-align: center; font-size: 18px; } </style> </head> <body> <div id="wrap" class="flex-wrap flex-vertical" > <header class="border-b" > <b tapmode="hover" onclick="api.closeWin();" class="ic-back"></b> <div class="title"></div> <b tapmode="hover" onclick="funActionSheet();" class="ic-check"></b> </header> <div id="main" class="flex-con" > </div> </div> </body> </html> <script type="text/javascript" src="../script/api.js"></script> <script type="text/javascript"> apiready = function(){ $api.fixStatusBar( $api.dom('header') ); $api.dom('.title').innerHTML = api.pageParam.name; api.openFrame({ name: 'frm_mine', url: './frm_mine.html', rect: { x: 0, y: $api.dom('header').offsetHeight, w: api.winWidth, h: $api.dom('#main').offsetHeight }, bounces : true, pageParam: { name: api.pageParam.name } }); }; function funActionSheet(){ api.actionSheet({ title: '底部弹出框', cancelTitle: '取消', destructiveTitle: '红色警告按钮', buttons: ['按钮1','按钮2','按钮3'] },function(ret,err){ // api.alert({ // msg: '你刚点击了'+ret.buttonIndex // }); }); } </script>