diff --git a/src/views/liveeditor/LiveEditor.vue b/src/views/liveeditor/LiveEditor.vue index 139b1a8ee..acbdf223d 100644 --- a/src/views/liveeditor/LiveEditor.vue +++ b/src/views/liveeditor/LiveEditor.vue @@ -137,12 +137,7 @@ ${style}` components += `app.component("${comp}", ${comp}); `; }) - } else { - imports = `import ${this.name.slice(0, -4)} from "primevue/${this.name.slice(0, -4).toLowerCase()}"; -`; - components = `app.component("${this.name.slice(0, -4)}", ${this.name.slice(0, -4)}); -`; - } + } _files['src/main.js'] = { content: `import { createApp } from "vue"; @@ -152,9 +147,11 @@ import "primevue/resources/primevue.min.css"; import "primeicons/primeicons.css"; import App from "./App.vue"; import PrimeVue from "primevue/config"; +import ${this.name.slice(0, -4)} from "primevue/${this.name.slice(0, -4).toLowerCase()}"; ${imports} const app = createApp(App); app.use(PrimeVue, { ripple: true }); +app.component("${this.name.slice(0, -4)}", ${this.name.slice(0, -4)}); ${components} app.mount("#app"); ` @@ -191,8 +188,7 @@ export default { - ` +` } _files['src/App.scss'] = { @@ -457,6 +453,10 @@ img.flag { extDependencies['@fullcalendar/timegrid'] = "5.4.0"; } + if(this.name === 'OrganizationChartDemo') { + extDependencies['mitt'] = "^2.1.0"; + } + return this.createSandboxParameters(`${name}${extension}`, _files, extDependencies); } }