Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live demo #42

Merged
merged 2 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions vue-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"prismjs": "^1.29.0",
"vue": "^3.2.13",
"vue-live": "^2.5.4",
"vue3-progress": "0.0.1-beta4",
"vue-skia": "workspace:*"
},
"devDependencies": {
Expand Down
9 changes: 8 additions & 1 deletion vue-playground/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<template>
<vue3-progress />
<main v-if="!loading" style="text-align: center">
<template v-if="true">
<h1>Vue Skia</h1>
Expand All @@ -19,6 +20,7 @@
</div>
<VueLive
:editorProps="{ lineNumbers: true }"
:delay="600"
:code="!loading && !debug ? code : LoadingCode"
:layout="CustomLayout"
:components="{
Expand Down Expand Up @@ -113,6 +115,7 @@ import code from "./code";
import LoadingCode from "./loading-code";
import "vue-live/style.css";
import "prism-themes/themes/prism-night-owl.css";

export default defineComponent({
name: "App",
components: {
Expand Down Expand Up @@ -159,11 +162,15 @@ export default defineComponent({
}

this.loading = false;
(this as unknown as { $progress: { start: () => void; finish: () => void } }).$progress.finish();
});
},
created() {
(this as unknown as { $progress: { start: () => void; finish: () => void } }).$progress.start();
},
methods: {
input(event: any) {
this.code = event.target._value;
// this.code = event.target._value;
},
copy() {
try {
Expand Down
5 changes: 5 additions & 0 deletions vue-playground/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { createApp } from "vue";
import App from "./App.vue";
import { VueSkia } from 'vue-skia'
import Vue3Progress from "vue3-progress";

const app = createApp(App);
app.use(VueSkia);
app.use(Vue3Progress, {
position: "fixed",
color: "rgb(0, 161, 132)",
})
app.mount("#app");
Loading