You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
( function ( $ , window ) {
/**
* 输入对话框
*/
$ . prompt = function ( text , defaultText , title , btnArray , callback ) {
if ( $ . os . plus ) {
if ( typeof message === 'undefined' ) {
return ;
} else {
if ( typeof defaultText === 'function' ) {
callback = defaultText ;
defaultText = null ;
title = null ;
btnArray = null ;
} else if ( typeof title === 'function' ) {
callback = title ;
title = null ;
btnArray = null ;
} else if ( typeof btnArray === 'function' ) {
callback = btnArray ;
btnArray = null ;
}
$ . plusReady ( function ( ) {
plus . nativeUI . prompt ( text , callback , title , defaultText , btnArray ) ;
} ) ;
}
} else {
//H5版本(确认index为0, 取消index为1)
var result = window . prompt ( text ) ;
if ( result ) {
callback ( {
index : 0 ,
value : result
} ) ;
} else {
callback ( {
index : 1 ,
value : ''
} ) ;
}
}
} ;
} ) ( mui , window ) ;