mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-23 05:16:43 +08:00
添加loading组件
This commit is contained in:
15
src/assets/js/utils/toastLoading.js
Normal file
15
src/assets/js/utils/toastLoading.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
// 全屏loading工具类
|
||||||
|
import { Toast } from 'vant'
|
||||||
|
import Vue from 'vue'
|
||||||
|
Vue.use(Toast)
|
||||||
|
|
||||||
|
export function openLoading() {
|
||||||
|
Toast.loading({
|
||||||
|
mask: true,
|
||||||
|
message: '加载中...',
|
||||||
|
duration: 0 // 持续展示 toast
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function closeLoading() {
|
||||||
|
Toast.clear()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user