main.js 681 B

123456789101112131415161718192021222324252627
  1. import Vue from 'vue'
  2. import App from './App'
  3. import store from './store' // store
  4. import plugins from './plugins' // plugins
  5. import './permission' // permission
  6. import noclick from 'pages/common/noclick.js' //防止多次点击
  7. Vue.use(plugins)
  8. Vue.config.productionTip = false
  9. Vue.prototype.$store = store
  10. Vue.prototype.$noMultipleClicks = noclick.noMultipleClicks;
  11. App.mpType = 'app'
  12. const app = new Vue({
  13. ...App
  14. })
  15. //报错提示框5秒
  16. const originalShowToast = uni.showToast;
  17. uni.showToast = function(options) {
  18. if (options.duration === undefined) {
  19. options.duration = 3000; // 设置默认提示时间为 3000 毫秒
  20. }
  21. originalShowToast(options);
  22. };
  23. app.$mount()