Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event bus not found #247

Closed
Matthijskl opened this issue Nov 13, 2018 · 3 comments
Closed

Event bus not found #247

Matthijskl opened this issue Nov 13, 2018 · 3 comments

Comments

@Matthijskl
Copy link

Matthijskl commented Nov 13, 2018

I'm using this application; https://github.com/SimulatedGREG/electron-vue.

When using this grid layout in a Vue Electron application, there comes an error about 'Injection "eventBus" not found'.

Can someone help me to fix this, or explain to me why this is happening.

` import { GridLayout, GridItem } from 'vue-grid-layout'

export default {
name: 'landing-page',
components: { GridLayout, GridItem },
data () {
return {
layout: [{
'x': 0,
'y': 0,
'w': 4,
'h': 2,
'i': '0'
}]
}
}
}`

<grid-layout :layout.sync="layout" :col-num="12" :row-height="30" :is-draggable="true" :is-resizable="true" :is-mirrored="false" :vertical-compact="true" :margin="[10, 10]" :use-css-transforms="true" > <grid-item style="background: black;" v-for="item in layout" :x="item.x" :y="item.y" :w="item.w" :h="item.h" :i="item.i"> {{item.i}} </grid-item> </grid-layout>

@kazax-inc
Copy link

kazax-inc commented Nov 23, 2018

I have the same error with electron, but have worked yesterday and not for now with no code change... no new lib, or other

Injection "eventBus" not found

<template>
  <v-flex fill-height>
      <grid-layout
        :layout.sync="assetGrid"
        :col-num="5"
        :maxRows="4"
        :rowHeight="60"
        :is-draggable="true"
        :is-resizable="false"
        :is-mirrored="false"
        :vertical-compact="false"
        :margin="[0, 0]"
        :use-css-transforms="true"
      >

        <grid-item  v-for="item in assetGrid" :x="item.x" :y="item.y" :w="item.w" :h="item.h" :i="item.i">
          <AssetCard v-bind="asset[item.i]"></AssetCard>
        </grid-item>

      </grid-layout>
  </v-flex>
</template>

<script>
  import VueGridLayout from 'vue-grid-layout'
  import AssetCard from './card'
  export default {
    name: 'Watchlist',
    components: {
      GridLayout: VueGridLayout.GridLayout,
      GridItem: VueGridLayout.GridItem,
      AssetCard
    },
    props: [],
    data: () => {
      return {
        assetGrid: [
          {'x': 0, 'y': 0, 'w': 1, 'h': 1, 'i': '0'},
          {'x': 1, 'y': 0, 'w': 1, 'h': 1, 'i': '1'},
          {'x': 2, 'y': 0, 'w': 1, 'h': 1, 'i': '2'},
          {'x': 0, 'y': 1, 'w': 1, 'h': 1, 'i': '3'},
          {'x': 1, 'y': 1, 'w': 1, 'h': 1, 'i': '4'},
          {'x': 2, 'y': 1, 'w': 1, 'h': 1, 'i': '5'}
        ],
        asset: [10, 20, 30, 40, 50, 60]

      }
    },
    computed: {},
    methods: {},
    watch: {},
    mounted () {}
  }
</script>

<style scoped>
      
</style>

@kazax-inc
Copy link

kazax-inc commented Nov 24, 2018

Problem solved using the latest version of electron, vue and vuetify, the boilerplate is out of date, to have electron (latest) + vue (latest) + vuetify (latest) follow the instructions using vue CLI 3 instead of the boilerplate, to do this (Electron + vue + vuetify)
and to add:

  • router : vue add router

  • vuex : vue add vuex

  • axios : vue add axios

after a few basic configurations, you have the same result as the boilerplate but up to date

@FFGF
Copy link

FFGF commented Apr 17, 2019

i meet the same problem when i use electron-vue , I finish the problem

npm install vue-grid-layout@2.1.13

i doubt your electron-vue was builded by cli2, but the newest vue-grid-layout is builded by cli3. they are not match. so you better install vue-grid-layout that was builded by cli2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants