1
0
forked from dyf/APP
Files
APP/utils/loading.js

45 lines
653 B
JavaScript
Raw Normal View History

2025-08-14 17:25:53 +08:00
// utils/loading.js
// 显示loading
export const showLoading = (ev,options) => {
if(!ev){
return;
}
if(!options){
options={a:1};
2025-08-15 16:39:00 +08:00
}
if(!options.text && options.title){
options.text=options.title;
2025-08-14 17:25:53 +08:00
}
2025-08-15 16:39:00 +08:00
if(!options.text){
options.text="请稍候...";
}
ev.$refs.loading.show(options);
2025-08-14 17:25:53 +08:00
}
// 隐藏loading
export const hideLoading = (ev) => {
if(!ev){
return;
}
console.log("hide.....")
ev.$refs.loading.hide();
}
// 更新loading配置
export const updateLoading = (ev,options) => {
if(!ev){
return;
}
if(!options){
options={a:1};
}
ev.$refs.loading.update(options)
}