misc improvements

This commit is contained in:
陆柯 2022-08-17 17:08:13 +08:00
parent 93dd43a1c4
commit 671092026c

View File

@ -452,6 +452,7 @@ export default {
}) })
*/ */
showToast ({ tool, type, image, title, duration = 2000, ...rest }) { showToast ({ tool, type, image, title, duration = 2000, ...rest }) {
// rename to popToast?
if (tool !== 'uni') { if (tool !== 'uni') {
// 来自 <ucToast> 或 <u-toast> 或 <u-top-tips> // 来自 <ucToast> 或 <u-toast> 或 <u-top-tips>
const toast = this.thisPage()?.$refs?.toast || getApp().globalData.toast || wo.toast const toast = this.thisPage()?.$refs?.toast || getApp().globalData.toast || wo.toast
@ -461,7 +462,7 @@ export default {
return return
} else if (popup) { } else if (popup) {
wo.ss.popMessage = title wo.ss.popMessage = title
wo.ss.popType = type || 'success' wo.ss.popType = type || 'success' // success/error/warning/info
wo.ss.popDuration = duration || 2000 wo.ss.popDuration = duration || 2000
popup.open() popup.open()
return return