From f017756d07feb171783a07bad7e70c6490a36905 Mon Sep 17 00:00:00 2001 From: SerKo Date: Sun, 31 Dec 2023 20:02:23 +0800 Subject: [PATCH] feat(sfc-playground): init custom formatter when preview --- packages/sfc-playground/src/App.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/sfc-playground/src/App.vue b/packages/sfc-playground/src/App.vue index 1a484cc4801..8e299e9aa4e 100644 --- a/packages/sfc-playground/src/App.vue +++ b/packages/sfc-playground/src/App.vue @@ -134,6 +134,12 @@ onMounted(() => { :autoResize="true" :sfcOptions="sfcOptions" :clearConsole="false" + :preview-options="{ + customCode: { + importCode: `import { initCustomFormatter } from 'vue'`, + useCode: `initCustomFormatter()` + } + }" />