diff --git a/element-vue/src/utils/dialog.js b/element-vue/src/utils/dialog.js index 5cef464..b8de8ee 100644 --- a/element-vue/src/utils/dialog.js +++ b/element-vue/src/utils/dialog.js @@ -24,3 +24,18 @@ export function showFail(content,that) { message: content }); } + +// 加载 +export function showLoading(content,that) { + return that.$loading({ + lock: true, + text: content, + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) +} + +// 关闭加载 +export function closeLoading(loading) { + loading.close() +}