diff --git a/docs/.vitepress/theme/components/PixiJSContainer/index.vue b/docs/.vitepress/theme/components/PixiJSContainer/index.vue index 9d5d9c7..26da354 100644 --- a/docs/.vitepress/theme/components/PixiJSContainer/index.vue +++ b/docs/.vitepress/theme/components/PixiJSContainer/index.vue @@ -3,6 +3,7 @@ import { computed, ref } from 'vue' import { useMessage } from 'naive-ui' import { Application } from 'vue3-pixi' import Card from '../Card/index.vue' +import { getCodeSandboxParams, getWithAppCodeSandboxParams } from './utils' const props = withDefaults( defineProps<{ @@ -32,6 +33,10 @@ const highlightedHtml = computed(() => decodeURIComponent(isUsingTs.value ? prop const code = computed(() => isUsingTs.value ? sfcTsCode.value : sfcJsCode.value) const githubBlobURL = 'https://github.com/hairyf/vue3-pixi/blob/main/' +const sandboxParams = computed(() => props.app + ? getWithAppCodeSandboxParams(code.value) + : getCodeSandboxParams(code.value)) + function onShowHighlighted() { showHighlighted.value = !showHighlighted.value } @@ -54,7 +59,14 @@ async function onCopyCode() {
-