11<template >
2- <main style =" text-align : center ; " >
2+ <main style =" text-align : center " >
33 <h1 >Vue Live renders vue code in the browser</h1 >
44 <p class =" description" >
55 <em >vue-live</em > is a VueJs component. It renders the code passed in prop
3535 <h2 >Pure JavaScript code</h2 >
3636 <p >Or if you prefer to, use the <b >new Vue()</b > format</p >
3737 <VueLive :code =" codeJs" :layout =" CustomLayout" />
38- <h2 >
39- Extra dependencies
40- </h2 >
38+ <h2 >Extra dependencies</h2 >
4139 <p >
4240 Use the <b >requires</b > prop to make libraries and packages available in
4341 the browser
6058 />
6159
6260 <h2 >Default Layout</h2 >
63- <div style =" width : 950px ; max-width : 95vw ; margin : 20px auto ; " >
61+ <div style =" width : 950px ; max-width : 95vw ; margin : 20px auto " >
6462 <VueLive :code =" `<input type='button' value='I am Groot' />`" />
6563 </div >
6664 <h2 >Custom Layout</h2 >
8684 <div class =" preview-separate" >
8785 <VueLivePreview :code =" separateCode" />
8886 </div >
89- <hr style =" width : 950px ; " />
87+ <hr style =" width : 950px " />
9088 <p >Edit the code here</p >
9189 <VueLiveEditor :code =" separateCode" @change =" updateCode" />
9290 <div class =" button-bar" ><button >Save</button ></div >
10098 </main >
10199</template >
102100<script >
101+ import { markRaw } from " vue" ;
103102import { VueLive , VueLiveEditor , VueLivePreview } from " ../src" ;
104103import CustomLayout from " ./CustomLayout" ;
105104import DatePicker from " vuejs-datepicker" ;
@@ -118,12 +117,12 @@ export default {
118117 components: { VueLive, VueLiveEditor, VueLivePreview, GithubCorners },
119118 data () {
120119 return {
121- registeredComponents: { DatePicker },
120+ registeredComponents: { DatePicker: markRaw (DatePicker) },
122121 codeSfc,
123122 codeTemplate,
124123 codeJs,
125124 codeChicago,
126- CustomLayout,
125+ CustomLayout: markRaw (CustomLayout) ,
127126 chicagoRequires: { " ./chicagoNeighbourhoods" : all },
128127 realjsx,
129128 separateCode: codeSfc,
0 commit comments