fix: only apply iframe for demos with browser window
This commit is contained in:
parent
fa9468a7d3
commit
9f25df8b89
@ -68,7 +68,10 @@
|
|||||||
'live-preview-browser': browser
|
'live-preview-browser': browser
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<one-iframe global-style="body { margin: 0 !important; } body > article { margin: 24px 36px; } .veui-layout { min-width: auto !important; }">
|
<one-iframe
|
||||||
|
v-if="browser"
|
||||||
|
global-style="body { margin: 0 !important; } body > article { margin: 24px 36px; } .veui-layout { min-width: auto !important; }"
|
||||||
|
>
|
||||||
<v-live-preview
|
<v-live-preview
|
||||||
class="editor-preview"
|
class="editor-preview"
|
||||||
:code="transformedCode"
|
:code="transformedCode"
|
||||||
@ -78,6 +81,15 @@
|
|||||||
@error="handleError"
|
@error="handleError"
|
||||||
/>
|
/>
|
||||||
</one-iframe>
|
</one-iframe>
|
||||||
|
<v-live-preview
|
||||||
|
v-else
|
||||||
|
class="editor-preview"
|
||||||
|
:code="transformedCode"
|
||||||
|
:requires="imports"
|
||||||
|
:check-variable-availability="false"
|
||||||
|
@success="dismissError"
|
||||||
|
@error="handleError"
|
||||||
|
/>
|
||||||
<transition name="editor-error">
|
<transition name="editor-error">
|
||||||
<veui-alert
|
<veui-alert
|
||||||
v-if="error"
|
v-if="error"
|
||||||
|
@ -121,6 +121,9 @@ Icon.register({
|
|||||||
flex 1 1 auto
|
flex 1 1 auto
|
||||||
height calc(100% - 48px)
|
height calc(100% - 48px)
|
||||||
|
|
||||||
|
& >>> .live-preview
|
||||||
|
padding 24px 36px
|
||||||
|
|
||||||
& >>> .VueLive-error
|
& >>> .VueLive-error
|
||||||
display none
|
display none
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user