评论需要添加功能,提交订单有问题
This commit is contained in:
@@ -48,12 +48,26 @@ const showToast = (message, type = 'none', duration = 2000) => {
|
||||
})
|
||||
}
|
||||
|
||||
// 导出响应式状态和方法
|
||||
/** 对话框带确认取消按钮 */
|
||||
const showDialog = (title, content) => {
|
||||
return new Promise(resolve => {
|
||||
uni.showModal({
|
||||
title,
|
||||
content,
|
||||
confirmText: '确定',
|
||||
cancelText: '取消',
|
||||
success: res => resolve(res.confirm)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/** 导出响应式状态和方法 */
|
||||
export const useUI = () => {
|
||||
return {
|
||||
isLoading: isLoading, // 可用于模板中 v-if="isLoading"
|
||||
showLoading,
|
||||
hideLoading,
|
||||
showToast
|
||||
showToast,
|
||||
showDialog
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user