• mui消息框alert,confirm,prompt,toast


     

     
    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
    <script type="text/javascript" charset="utf-8">
                //mui初始化
                mui.init({
                    swipeBack: true //启用右滑关闭功能
                });
                var info = document.getElementById("info");
                document.getElementById("alertBtn").addEventListener('tap'function() {
                    mui.alert('欢迎使用Hello MUI''Hello MUI'function() {
                        info.innerText = '你刚关闭了警告框';
                    });
                });
                document.getElementById("confirmBtn").addEventListener('tap'function() {
                    var btnArray = ['否''是'];
                    mui.confirm('MUI是个好框架,确认?''Hello MUI', btnArray, function(e) {
                        if (e.index == 1) {
                            info.innerText = '你刚确认MUI是个好框架';
                        else {
                            info.innerText = 'MUI没有得到你的认可,继续加油'
                        }
                    })
                });
                document.getElementById("promptBtn").addEventListener('tap'function(e) {
                    e.detail.gesture.preventDefault(); //修复iOS 8.x平台存在的bug,使用plus.nativeUI.prompt会造成输入法闪一下又没了
                    var btnArray = ['取消''确定'];
                    mui.prompt('请输入你对MUI的评语:''性能好''Hello MUI', btnArray, function(e) {
                        if (e.index == 1) {
                            info.innerText = '谢谢你的评语:' + e.value;
                        else {
                            info.innerText = '你点了取消按钮';
                        }
                    })
                });
                document.getElementById("toastBtn").addEventListener('tap'function() {
                    mui.toast('欢迎体验Hello MUI');
                });
            </script>
  • 相关阅读:
    springboot将接口内容快速生成接口文档导出,swagger将api文档以表格文档导出
    IDEA2019.2或2019.3激活码失效后重新激活教程
    Java代码自动生成,生成前端vue+后端controller、service、dao代码,根据表名自动生成增删改查功能
    百度网盘下载慢解决办法,最新.浏览器下载速度突破方法
    smartGit 版本19.1没有settings文件如何破解
    arp欺骗软件(来自互联网)
    关闭学生端v1.0(附链接)
    [TODO]multiaet/set/multimap/map
    树状数组【洛谷3374】
    luoguP1439
  • 原文地址:https://www.cnblogs.com/xzzzys/p/7762360.html
Copyright © 2020-2023  润新知