yarn add @dgiot/dgiot-component
import Vue from 'vue'
import App from './App.vue'
+import dgiotStore from '@dgiot/dgiot-component/src/store'
+import dgiotBus from '@dgiot/dgiot-component/src/utils/bus'
+import dgiotMixin from '@dgiot/dgiot-component/src/mixins/mqtt'
Vue.use(dgiotBus)
Vue.mixin(dgiotMixin)
Vue.config.productionTip = false
new Vue({
dgiotStore,
render: h => h(App),
}).$mount('#app')
<template>
<div id="app">
+<dgiot-component />
</div>
</template>
<script>
+import dgiotMqttDashboard from '@dgiot/dgiot-component/mqtt'
export default {
name: 'App',
components: {
+dgiotMqttDashboard
},
mounted() {
console.log(this.Store)
},
}
</script>