UNPKG

sohelp-ele

Version:

SohelpEle Library

29 lines (28 loc) 729 B
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); var elementUi = require("element-ui"); function messageLoading(options) { if (typeof options === "string") { options = { message: options }; } const loading = elementUi.Loading.service({ spinner: "none", background: options.background || "transparent" }); return elementUi.Message( Object.assign( { duration: 0, customClass: "ele-message-loading" }, options, { onClose: (ins) => { loading.close(); options.onClose && options.onClose(ins); } } ) ); } exports.messageLoading = messageLoading;