default csb type fixed

pull/1143/head
Tuğçe Küçükoğlu 2021-03-23 14:41:50 +03:00
parent d07b0a84d5
commit 6973d2701e
1 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<span v-if="showEditor"> <span v-if="showEditor">
<SplitButton :model="items" label="Edit in CodeSandbox" class="liveEditorSplitButton" /> <SplitButton :model="items" label="Edit in CodeSandbox" class="liveEditorSplitButton" @click="openDefaultCSB" />
</span> </span>
</template> </template>
@ -649,11 +649,18 @@ export const router = createRouter({
} }
return this.createSandboxParameters(`${name}${extension}`, _files, extDependencies); return this.createSandboxParameters(`${name}${extension}`, _files, extDependencies);
},
openDefaultCSB() {
this.postSandboxParameters(this.defaultSourceType);
} }
}, },
computed: { computed: {
showEditor() { showEditor() {
return this.$appState.codeSandbox; return this.$appState.codeSandbox;
},
defaultSourceType() {
return this.$appState.sourceType;
} }
} }
} }