A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jbaysolutions/vue-grid-layout/issues/311 below:

Injection "eventBus" not found · Issue #311 · jbaysolutions/vue-grid-layout · GitHub

Hi,

Just installed the vue-grid-layout and am having an error while trying the minimal example.
(probably a duplicate of Issue 247 but there are no solutions that I can use there).

I'm using:

Tested on: Firefox 65, Chrome 73

Error

[Vue warn]: Injection "eventBus" not found

found in

---> <GridItem>

[Vue warn]: Error in created hook: "TypeError: Cannot read property '$on' of undefined"

found in

---> <GridItem>

I have quickly tested with vue-grid-layout 2.3.2 and/or vue 2.6.9, the same is happening.

My code

 <grid-layout
               :layout.sync="layout"
               :col-num="2"
               :row-height="450"
               :is-draggable="true"
               :is-resizable="true"
               :is-mirrored="false"
               :vertical-compact="true"
               :margin="[10, 10]"
               :use-css-transforms="true"
          >
            <grid-item 
               v-for="comp in layout" 
              :x="comp.x" 
              :y="comp.y" 
              :w="comp.w" 
              :h="comp.h" 
              :i="comp.i">
          </grid-item>
</grid-layout>

Local data:

data: () => {
    return {
      layout: [
      {
        type: "WidgetComponent",
        title: "test1",
        x: 0,
        y: 0,
        h: 1,
        w: 2,
        i: "0",
      },
      {
        type: "WidgetComponent",
        title: "test2",
        x: 0,
        y: 2,
        h: 2,
        w: 1,
        i: "1",
      },
   ...
 ]
...

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4