]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
workflow(sfc-playground): init custom formatter when selecting new version (#9958)
authorSerKo <44749100+serkodev@users.noreply.github.com>
Wed, 3 Jan 2024 08:54:47 +0000 (16:54 +0800)
committerGitHub <noreply@github.com>
Wed, 3 Jan 2024 08:54:47 +0000 (16:54 +0800)
close #9957

packages/sfc-playground/src/App.vue

index e8aeeeaef5637262ac4bfb94efaf1ad4b9f58463..200ac550d8fc0478c81d7c048be18b85417ffdf5 100644 (file)
@@ -137,6 +137,12 @@ onMounted(() => {
     :autoResize="true"
     :sfcOptions="sfcOptions"
     :clearConsole="false"
+    :preview-options="{
+      customCode: {
+        importCode: `import { initCustomFormatter } from 'vue'`,
+        useCode: `initCustomFormatter()`
+      }
+    }"
   />
 </template>