diff --git a/main.js b/main.js index e024e72..d4dd311 100644 --- a/main.js +++ b/main.js @@ -75,13 +75,26 @@ const force2Decimal = function change2Decimal(value) { return forceToDecimal(value, 2) } +const toast = (title = '', position = 'center', success = function() {}) => { + uni.showToast({ + title, + mask: false, + icon: 'none', + duration: 2500, + position, + success + }) +} + Vue.prototype.$force2Decimal = force2Decimal Vue.prototype.$forceToDecimal = forceToDecimal Vue.config.productionTip = false App.mpType = 'app' Vue.prototype.$store = store -Vue.prototype.$dialog = dialog; +Vue.prototype.$dialog = dialog + +Vue.prototype.$toast = toast const app = new Vue(App)