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 openModeQuery = open ? '' : '&openMode=preview'
// TODO: mfOptionscompositon
const url = `${import.meta.env.VITE_PLAYGROUND_URL}?cmpId=${cmpId}&fileName=${
demo.codeFiles[0]
}&apiMode=Options&mode=${templateModeState.mode}&theme=${tinyTheme}${openModeQuery}`
const url = `${import.meta.env.VITE_PLAYGROUND_URL}?cmpId=${cmpId}&fileName=${demo.codeFiles[0]}&apiMode=${
isMobileFirst.value ? 'Options' : apiModeState.apiMode
}&mode=${templateModeState.mode}&theme=${tinyTheme}${openModeQuery}`
if (open) {
window.open(url)