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

Function createAlert

examples/hello-mui/js/mui.js:7489–7508  ·  view source on GitHub ↗
(message, title, btnValue, callback, type)

Source from the content-addressed store, hash-verified

7487 return popup;
7488 };
7489 var createAlert = function(message, title, btnValue, callback, type) {
7490 if (typeof message === 'undefined') {
7491 return;
7492 } else {
7493 if (typeof title === 'function') {
7494 callback = title;
7495 type = btnValue;
7496 title = null;
7497 btnValue = null;
7498 } else if (typeof btnValue === 'function') {
7499 type = callback;
7500 callback = btnValue;
7501 btnValue = null;
7502 }
7503 }
7504 if (!$.os.plus || type === 'div') {
7505 return createPopup(createInner(message, title || '提示') + createButtons([btnValue || '确定']), callback);
7506 }
7507 return plus.nativeUI.alert(message, callback, title || '提示', btnValue || '确定');
7508 };
7509 var createConfirm = function(message, title, btnArray, callback, type) {
7510 if (typeof message === 'undefined') {
7511 return;

Callers

nothing calls this directly

Calls 3

createPopupFunction · 0.70
createInnerFunction · 0.70
createButtonsFunction · 0.70

Tested by

no test coverage detected