xiaoluoboding / vue-smart-widget

🗃️Smart widget is a flexible and extensible content container component for Vue2.x / Vue3.x in Next branch.
https://xiaoluoboding.github.io/vue-smart-widget/
MIT License
185 stars 35 forks source link

get null when `import {SmartWidget, SmartWidgetGrid}` #40

Closed scil closed 2 years ago

scil commented 2 years ago

I do not want to reg component globally. I only want both locally, but failed, because SmartWidget and SmartWidgeGrid are null.

Maybe you con include src in npm package

import Vue from 'vue'
// import VueSmartWidget from 'vue-smart-widget'  
import {SmartWidget, SmartWidgetGrid} from 'vue-smart-widget'

export default {
  name: "dashboard",
  components: {
    'smart-widget':SmartWidget,
    'smart-widget-grid':SmartWidgetGrid,
  },
  data () {
    return {
      layout: [
        { x: 0, y: 0, w: 4, h: 4, i: '0' },
        { x: 4, y: 0, w: 4, h: 4, i: '1' },
        { x: 8, y: 0, w: 4, h: 4, i: '2' }
      ]
    }
  } 
}
DimaKuznietsov commented 2 years ago

Do you use last version of vue? Could you also provide mistake from the console of browser

scil commented 2 years ago

I used vue2.