fix(playground): could not open playground as Composition mode (#1787)

* fix: playground could not display as composition api
This commit is contained in:
Gweesin Chan 2024-07-27 11:38:18 +08:00 committed by GitHub
parent 5bc79b23a7
commit 335fc3883d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -192,9 +192,9 @@ export default defineComponent({
const tinyTheme = templateModeState.isSaas ? 'saas' : currentThemeKey.value.split('-')[1] const tinyTheme = templateModeState.isSaas ? 'saas' : currentThemeKey.value.split('-')[1]
const openModeQuery = open ? '' : '&openMode=preview' const openModeQuery = open ? '' : '&openMode=preview'
// TODO: mfOptionscompositon // TODO: mfOptionscompositon
const url = `${import.meta.env.VITE_PLAYGROUND_URL}?cmpId=${cmpId}&fileName=${ const url = `${import.meta.env.VITE_PLAYGROUND_URL}?cmpId=${cmpId}&fileName=${demo.codeFiles[0]}&apiMode=${
demo.codeFiles[0] isMobileFirst.value ? 'Options' : apiModeState.apiMode
}&apiMode=Options&mode=${templateModeState.mode}&theme=${tinyTheme}${openModeQuery}` }&mode=${templateModeState.mode}&theme=${tinyTheme}${openModeQuery}`
if (open) { if (open) {
window.open(url) window.open(url)