MCPcopy
hub / github.com/dcloudio/mui / createPrompt

Function createPrompt

examples/hello-mui/js/mui.js:7529–7554  ·  view source on GitHub ↗
(message, placeholder, title, btnArray, callback, type)

Source from the content-addressed store, hash-verified

7527 return plus.nativeUI.confirm(message, callback, title, btnArray || ['取消', '确认']);
7528 };
7529 var createPrompt = function(message, placeholder, title, btnArray, callback, type) {
7530 if (typeof message === 'undefined') {
7531 return;
7532 } else {
7533 if (typeof placeholder === 'function') {
7534 callback = placeholder;
7535 type = title;
7536 placeholder = null;
7537 title = null;
7538 btnArray = null;
7539 } else if (typeof title === 'function') {
7540 callback = title;
7541 type = btnArray;
7542 title = null;
7543 btnArray = null;
7544 } else if (typeof btnArray === 'function') {
7545 type = callback;
7546 callback = btnArray;
7547 btnArray = null;
7548 }
7549 }
7550 if (!$.os.plus || type === 'div') {
7551 return createPopup(createInner(message, title || '提示', createInput(placeholder)) + createButtons(btnArray || ['取消', '确认']), callback);
7552 }
7553 return plus.nativeUI.prompt(message, callback, title || '提示', placeholder, btnArray || ['取消', '确认']);
7554 };
7555 var closePopup = function() {
7556 if (popupStack.length) {
7557 popupStack[popupStack.length - 1]['close']();

Callers

nothing calls this directly

Calls 4

createPopupFunction · 0.70
createInnerFunction · 0.70
createInputFunction · 0.70
createButtonsFunction · 0.70

Tested by

no test coverage detected