Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
349 views
in Technique[技术] by (71.8m points)

mui dialog 如何配置type属性

document.getElementById("update_nicheng").addEventListener('tap', function(e) {
                e.detail.gesture.preventDefault(); //修复iOS 8.x平台存在的bug,使用plus.nativeUI.prompt会造成输入法闪一下又没了
                var btnArray = ['取消', '确定'];
                mui.prompt(' ', ' ', '修改昵称', btnArray, 'div', function(e) {
                    if (e.index == 1) {
                        info.innerText = e.value;
                    } else {
                        info.innerText = info.innerText;
                    }
                })
            });

mui会根据ua判断,弹出原生对话框还是h5绘制的对话框,在基座中默认会弹出原生对话框,可以配置type属性,使得弹出h5模式对话框


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

最后一个参数设置为'div'即可,具体看文档。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...