Skip to content

Commit 528631f

Browse files
authored
Live demo (#42)
* feat: add progress in vue playground * feat: add 600 delay
1 parent a53a28f commit 528631f

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

Diff for: vue-playground/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"prismjs": "^1.29.0",
1515
"vue": "^3.2.13",
1616
"vue-live": "^2.5.4",
17+
"vue3-progress": "0.0.1-beta4",
1718
"vue-skia": "workspace:*"
1819
},
1920
"devDependencies": {

Diff for: vue-playground/src/App.vue

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<template>
2+
<vue3-progress />
23
<main v-if="!loading" style="text-align: center">
34
<template v-if="true">
45
<h1>Vue Skia</h1>
@@ -19,6 +20,7 @@
1920
</div>
2021
<VueLive
2122
:editorProps="{ lineNumbers: true }"
23+
:delay="600"
2224
:code="!loading && !debug ? code : LoadingCode"
2325
:layout="CustomLayout"
2426
:components="{
@@ -113,6 +115,7 @@ import code from "./code";
113115
import LoadingCode from "./loading-code";
114116
import "vue-live/style.css";
115117
import "prism-themes/themes/prism-night-owl.css";
118+
116119
export default defineComponent({
117120
name: "App",
118121
components: {
@@ -159,11 +162,15 @@ export default defineComponent({
159162
}
160163
161164
this.loading = false;
165+
(this as unknown as { $progress: { start: () => void; finish: () => void } }).$progress.finish();
162166
});
163167
},
168+
created() {
169+
(this as unknown as { $progress: { start: () => void; finish: () => void } }).$progress.start();
170+
},
164171
methods: {
165172
input(event: any) {
166-
this.code = event.target._value;
173+
// this.code = event.target._value;
167174
},
168175
copy() {
169176
try {

Diff for: vue-playground/src/main.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import { createApp } from "vue";
22
import App from "./App.vue";
33
import { VueSkia } from 'vue-skia'
4+
import Vue3Progress from "vue3-progress";
45

56
const app = createApp(App);
67
app.use(VueSkia);
8+
app.use(Vue3Progress, {
9+
position: "fixed",
10+
color: "rgb(0, 161, 132)",
11+
})
712
app.mount("#app");

0 commit comments

Comments
 (0)