0.0.3 • Published 3 years ago

@dgiot/dgiot-component v0.0.3

Weekly downloads
-
License
Mozilla Public Li...
Repository
github
Last release
3 years ago

dgiot-component

微服务架构图_02.png

Installation

yarn add @dgiot/dgiot-component

Quick Start

main.js

  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')

examples.vue

<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>

Online examples

Edit gmullerb-react-reducer-provider