You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
665 B
32 lines
665 B
5 years ago
|
/**
|
||
|
* 显示模态框
|
||
|
* @param {string} msg
|
||
|
* @param {boolean} showCancel
|
||
|
* @param {string} confirmText
|
||
|
*/
|
||
|
export const showModal = (msg, showCancel = false, confirmText = '知道了') =>
|
||
|
uni.showModal({
|
||
|
title: '提示',
|
||
|
content: msg,
|
||
|
showCancel,
|
||
|
confirmText,
|
||
|
confirmColor: '#1890ff',
|
||
|
});
|
||
|
|
||
|
/**
|
||
|
* 显示toast
|
||
|
* @param {string} msg
|
||
|
*/
|
||
|
export const showToast = msg =>
|
||
|
uni.showToast({
|
||
|
title: msg,
|
||
|
icon: 'none',
|
||
|
duration: 3000,
|
||
|
});
|
||
|
|
||
|
// 显示加载动画
|
||
|
export const showLoading = (msg = '努力加载中...') => uni.showLoading({ title: msg });
|
||
|
|
||
|
// 隐藏加载动画
|
||
|
export const hideLoading = () => uni.hideLoading();
|