From 788527e29ca261c61c2bbc30ef86c4fe32a5245e Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Mon, 10 Jul 2023 00:18:59 +0800 Subject: [PATCH] workflow: support custom TS version for playground (#8735) --- packages/sfc-playground/package.json | 4 +- packages/sfc-playground/src/App.vue | 2 +- packages/sfc-playground/src/Header.vue | 148 +++------- packages/sfc-playground/src/VersionSelect.vue | 114 ++++++++ packages/sfc-playground/vite.config.ts | 1 + pnpm-lock.yaml | 268 ++++++++++++++++-- 6 files changed, 404 insertions(+), 133 deletions(-) create mode 100644 packages/sfc-playground/src/VersionSelect.vue diff --git a/packages/sfc-playground/package.json b/packages/sfc-playground/package.json index 76e6a014e7..04752e3912 100644 --- a/packages/sfc-playground/package.json +++ b/packages/sfc-playground/package.json @@ -9,10 +9,10 @@ }, "devDependencies": { "@vitejs/plugin-vue": "^4.2.3", - "vite": "^4.3.9" + "vite": "^4.4.2" }, "dependencies": { - "@vue/repl": "^2.4.0", + "@vue/repl": "^2.5.4", "file-saver": "^2.0.5", "jszip": "^3.6.0", "vue": "workspace:*" diff --git a/packages/sfc-playground/src/App.vue b/packages/sfc-playground/src/App.vue index f9b77f47ea..744cfd4d9c 100644 --- a/packages/sfc-playground/src/App.vue +++ b/packages/sfc-playground/src/App.vue @@ -73,7 +73,7 @@ function toggleSSR() { store.setFiles(store.getFiles()) } -const theme = ref('dark') +const theme = ref<'dark' | 'light'>('dark') function toggleTheme(isDark: boolean) { theme.value = isDark ? 'dark' : 'light' } diff --git a/packages/sfc-playground/src/Header.vue b/packages/sfc-playground/src/Header.vue index d8271b8e52..e865a76a5f 100644 --- a/packages/sfc-playground/src/Header.vue +++ b/packages/sfc-playground/src/Header.vue @@ -1,44 +1,35 @@ @@ -109,28 +60,28 @@ async function fetchVersions(): Promise { Vue SFC Playground