|
|
|
@ -21,27 +21,23 @@ import {
|
|
|
|
|
} from "../../core"; |
|
|
|
|
import { Toast } from "../single"; |
|
|
|
|
|
|
|
|
|
export const Msg = (() => { |
|
|
|
|
let $mask, $pop; |
|
|
|
|
let $mask, $pop; |
|
|
|
|
|
|
|
|
|
const messageShows = []; |
|
|
|
|
const messageShows = []; |
|
|
|
|
|
|
|
|
|
const toastStack = []; |
|
|
|
|
const toastStack = []; |
|
|
|
|
|
|
|
|
|
const defaultConfig = { |
|
|
|
|
const defaultConfig = { |
|
|
|
|
buttonHeight: 24, |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
export const Msg = { |
|
|
|
|
alert(title, message, callback, config = defaultConfig) { |
|
|
|
|
this._show(false, title, message, callback, config); |
|
|
|
|
}, |
|
|
|
|
confirm(title, message, callback, config = defaultConfig) { |
|
|
|
|
this._show(true, title, message, callback, config); |
|
|
|
|
}, |
|
|
|
|
prompt(title, message, value, callback, min_width) { |
|
|
|
|
// Msg.prompt(title, message, value, callback, min_width);
|
|
|
|
|
}, |
|
|
|
|
toast(message, options, context) { |
|
|
|
|
isString(options) && (options = { level: options }); |
|
|
|
|
options = options || {}; |
|
|
|
@ -270,5 +266,4 @@ export const Msg = (() => {
|
|
|
|
|
|
|
|
|
|
messageShows[messageShows.length] = createWidget(conf); |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
})(); |
|
|
|
|
}; |
|
|
|
|