forked from opentiny/tiny-vue
fix(playground): could not open playground as Composition mode (#1787)
* fix: playground could not display as composition api
This commit is contained in:
parent
5bc79b23a7
commit
335fc3883d
|
@ -192,9 +192,9 @@ export default defineComponent({
|
|||
const tinyTheme = templateModeState.isSaas ? 'saas' : currentThemeKey.value.split('-')[1]
|
||||
const openModeQuery = open ? '' : '&openMode=preview'
|
||||
// TODO: 目前mf只有Options写法,后续再放开compositon
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue