UNPKG

829 BJavaScriptView Raw
1import store from './store/store'
2import ZCanvas from './components/z-canvas.vue'
3import ZView from './components/z-view.vue'
4import ZViewList from './components/z-list.vue'
5import ZSpot from './components/z-spot.vue'
6import ZDialog from './components/z-dialog.vue'
7
8const zircle = {
9 install (Vue) {
10 Object.defineProperty(Vue.prototype, '$zircle', {
11 get () {
12 return store.actions
13 }
14 })
15 Vue.component('z-canvas', ZCanvas)
16 Vue.component('z-view', ZView)
17 Vue.component('z-list', ZViewList)
18 Vue.component('z-spot', ZSpot)
19 Vue.component('z-dialog', ZDialog)
20 }
21}
22
23let GlobalVue = null
24if (typeof window !== 'undefined') {
25 GlobalVue = window.Vue
26} else if (typeof global !== 'undefined') {
27 GlobalVue = global.Vue
28}
29if (GlobalVue) {
30 GlobalVue.use(zircle)
31}
32
33export default zircle