Not sure if I should post this on stackoverflow vs here but thought I try it here first. I'm new to gantt-elastic and vue in general but wanted to add gantt-elastic as a vue component. I ran into an issue registering the component.
I installed gantt-elastic using yarn add gantt-elastic.
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import './registerServiceWorker';
import 'quasar/dist/quasar.min.css'; // WS- Added this after commenting out .styl imports
import './styles/quasar.styl';
import '@quasar/extras/roboto-font/roboto-font.css';
import '@quasar/extras/material-icons/material-icons.css';
import GanttElastic from "gantt-elastic/src/GanttElastic.vue";
import {
Quasar,
QLayout,
QHeader,
QDrawer,
QPageContainer,
QPage,
QToolbar,
QToolbarTitle,
QBtn,
QIcon,
QList,
QItem,
QItemSection,
QItemLabel
} from 'quasar';
Vue.use(Quasar, {
config: {},
components: {
QLayout,
QHeader,
QDrawer,
QPageContainer,
QPage,
QToolbar,
QToolbarTitle,
QBtn,
QIcon,
QList,
QItem,
QItemSection,
QItemLabel,
GanttElastic
},
directives: {},
plugins: {}
});
Vue.config.productionTip = false;
new Vue({
router,
store,
render: (h) => h(App)
}).$mount('#app');
<template>
<q-page padding>
<gantt-elastic :tasks="tasks" :options="options">
<!-- <gantt-elastic-header slot="header"></gantt-elastic-header>
<gantt-elastic-footer slot="footer"></gantt-elastic-footer> -->
</gantt-elastic>
</q-page>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
@Component
export default class PageAbout extends Vue {
private tasks:any;
private options:any;
}
</script>
vue.runtime.esm.js?8846:619 [Vue warn]: Unknown custom element: <gantt-elastic> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <PageAbout> at src/views/Chart.vue
<QPageContainer>
<QLayout>
<LayoutDefault> at src/layouts/Default.vue
<App> at src/App.vue
<Root>