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 tinyTheme = templateModeState.isSaas ? 'saas' : currentThemeKey.value.split('-')[1]
|
||||||
const openModeQuery = open ? '' : '&openMode=preview'
|
const openModeQuery = open ? '' : '&openMode=preview'
|
||||||
// TODO: 目前mf只有Options写法,后续再放开compositon
|
// TODO: 目前mf只有Options写法,后续再放开compositon
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue