您的位置:首页技术文章
文章详情页

html5 - mui dialog 如何配置type属性

【字号: 日期:2023-01-19 15:53:49浏览:71作者:猪猪

问题描述

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

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

问题解答

回答1:

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

标签: Html5
相关文章: