diff --git a/src/main.js b/src/main.js index 104fc6638..368775c7e 100644 --- a/src/main.js +++ b/src/main.js @@ -110,7 +110,7 @@ router.beforeEach(function (to, from, next) { const app = createApp(App); -app.config.globalProperties.$appState = reactive({inputStyle: 'outlined', darkTheme: false}); +app.config.globalProperties.$appState = reactive({inputStyle: 'outlined', darkTheme: false, codeSandbox: false}); app.use(PrimeVue, {ripple: true}); app.use(ToastService); diff --git a/src/views/liveeditor/LiveEditor.vue b/src/views/liveeditor/LiveEditor.vue index 0c9f23caf..fb388f9ba 100644 --- a/src/views/liveeditor/LiveEditor.vue +++ b/src/views/liveeditor/LiveEditor.vue @@ -1,5 +1,5 @@ @@ -45,7 +45,7 @@ export default { activeButtonIndex: { type: String, default: null - }, + } }, methods: { postSandboxParameters() { @@ -494,6 +494,11 @@ img.flag { return this.createSandboxParameters(`${name}${extension}`, _files, extDependencies); } + }, + computed: { + showEditor() { + return this.$appState.codeSandbox; + } } } \ No newline at end of file