smart-admin/smart-app/src/lib/smart-support.js
2024-03-10 22:26:32 +08:00

31 lines
506 B
JavaScript

export const SmartLoading = {
show: function (msg) {
uni.showLoading({ title: msg ? msg : '加载中' });
},
hide: function () {
uni.hideLoading();
},
};
export const SmartToast = {
success: (message) => {
uni.showToast({
title: message,
icon: 'success',
});
},
error: (message) => {
uni.showToast({
title: message,
icon: 'error',
});
},
toast: (message) => {
uni.showToast({
title: message,
icon: 'none',
});
},
};