Update LiveEditor

pull/756/head
Tuğçe Küçükoğlu 2021-01-08 12:07:35 +03:00
parent 6616c91fc4
commit e651adb9c6
1 changed files with 8 additions and 8 deletions

View File

@ -137,11 +137,6 @@ ${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'] = {
@ -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 {
</${scriptText}>
<style lang="scss">
@import './App.scss';
</style>
`
</style>`
}
_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);
}
}