guifei zhu
2024-11-27 6017f46b762663b9393cdae8422e0de1ed3db218
main.js
@@ -1,11 +1,16 @@
import App from './App'
import Vue from 'vue'
import Vue from 'vue'
import store from './store'; // 引入 Vuex store
// 此处为引用自定义顶部
import cuCustom from './colorui/components/cu-custom.vue'
Vue.component('cu-custom',cuCustom);
import TnCustom from './components/TnCustom/TnCustom.vue'
Vue.component('tn-custom', TnCustom)
import MqttView from './mqtt/MqttView.vue'
Vue.component('mqtt-view', MqttView)
import uView from "uview-ui";
Vue.use(uView);
@@ -26,8 +31,11 @@
Vue.prototype.$lget = lget
import mqttTool from './lib/mqttTool.js'
Vue.prototype.$mqttTool = mqttTool
Vue.prototype.$mqttTool = mqttTool
const EventBus = new Vue();
Vue.prototype.$eventBus = EventBus
 
//全局监控定时器(在页面使用局部定时器会出现无法关闭问题)
@@ -38,7 +46,8 @@
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
const app = new Vue({
   store, // 注入 store
  ...App
})
app.$mount()