From e651adb9c62f36074b4c01b42fba0de513d2e430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Fri, 8 Jan 2021 12:07:35 +0300 Subject: [PATCH] Update LiveEditor --- src/views/liveeditor/LiveEditor.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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); } }