integrated_traffic_uniapp/main.js

54 lines
1.3 KiB
JavaScript
Raw Permalink Normal View History

2024-01-16 17:24:49 +08:00
import Vue from 'vue'
import App from './App'
import basics from './pages/basics/home.vue'
Vue.component('basics',basics)
import application from './pages/application/home.vue'
Vue.component('application',application)
import works from './pages/news/home.vue'
Vue.component('works',works)
import my from './pages/my/home.vue'
Vue.component('my',my)
import cuCustom from './colorui/components/cu-custom.vue'
Vue.component('cu-custom',cuCustom)
// 注册全局组件
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
Vue.component('mescroll-body', MescrollBody)
Vue.component('mescroll-uni', MescrollUni)
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
//配置公共方法
import common from './common/tool.js'
Vue.prototype.$noMultipleClicks = common.noMultipleClicks;
2024-01-22 14:28:07 +08:00
Vue.prototype.validStr = function(str) {
if (str != null && str != '' && typeof (str) != 'undefined' && str != 'undefined' && str != 0) { return true }
return false
}
2024-01-16 17:24:49 +08:00
Array.prototype.distinctPush =function(){
for(var i=0; i<arguments.length; i++){
var ele = arguments[i];
if(this.indexOf(ele) == -1){
this.push(ele);
}
}
};
2024-01-22 14:28:07 +08:00
2024-01-16 17:24:49 +08:00