mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-05 19:56:39 +08:00
25 lines
423 B
JavaScript
25 lines
423 B
JavaScript
let loader = null;
|
|
|
|
const SmartPlugin = {};
|
|
|
|
SmartPlugin.install = function(Vue, options) {
|
|
Vue.prototype.$smart = {
|
|
loading: (message) => {
|
|
if (loader) {
|
|
loader.hide();
|
|
}
|
|
|
|
loader = Vue.$loading.show({
|
|
// Optional parameters
|
|
lockScroll: true,
|
|
color: '#1989fa'
|
|
});
|
|
},
|
|
loadingClear: () => {
|
|
loader.hide();
|
|
}
|
|
};
|
|
};
|
|
|
|
export default SmartPlugin;
|