Skip to content

Commit d0ca13a

Browse files
committed
fix: first compiling version
1 parent daf8881 commit d0ca13a

File tree

6 files changed

+3802
-5000
lines changed

6 files changed

+3802
-5000
lines changed

demo/App.vue

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
@@ -35,9 +35,7 @@
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
@@ -60,7 +58,7 @@
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>
@@ -86,7 +84,7 @@
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>
@@ -100,6 +98,7 @@
10098
</main>
10199
</template>
102100
<script>
101+
import { markRaw } from "vue";
103102
import { VueLive, VueLiveEditor, VueLivePreview } from "../src";
104103
import CustomLayout from "./CustomLayout";
105104
import 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,

demo/main.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import "./find.polyfill";
2-
import Vue from "vue";
2+
import { createApp } from "vue";
33
import App from "./App.vue";
44

5-
Vue.config.productionTip = false;
6-
Vue.config.devtools = true;
7-
8-
new Vue({
9-
render: (h) => h(App),
10-
}).$mount("#app");
5+
createApp(App).mount("#app");

0 commit comments

Comments
 (0)