From 854148299383fca8c6f278d18c53d01110d9d3b9 Mon Sep 17 00:00:00 2001 From: sight <1453017105@qq.com> Date: Thu, 11 Aug 2022 12:01:37 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D:=20=E6=B7=BB=E5=8A=A0=20stackblitz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/document-component/package.json | 1 + .../src/components/LayCode.vue | 30 ++- .../code-playground.ts} | 3 +- .../src/utils/code-stackblitz.ts | 93 +++++++++ pnpm-lock.yaml | 197 ++++++++++++------ 5 files changed, 248 insertions(+), 76 deletions(-) rename package/document-component/src/{composable/usePlayground.ts => utils/code-playground.ts} (98%) create mode 100644 package/document-component/src/utils/code-stackblitz.ts diff --git a/package/document-component/package.json b/package/document-component/package.json index ad27dd78..4a82cc76 100644 --- a/package/document-component/package.json +++ b/package/document-component/package.json @@ -21,6 +21,7 @@ "@types/markdown-it": "^12.2.3", "@types/markdown-it-container": "^2.0.4", "@types/prettier": "^2.4.4", + "@stackblitz/sdk": "^1.8.0", "escape-html": "^1.0.3", "markdown-it-container": "^3.0.0", "prismjs": "^1.28.0", diff --git a/package/document-component/src/components/LayCode.vue b/package/document-component/src/components/LayCode.vue index fce2d521..8832624c 100644 --- a/package/document-component/src/components/LayCode.vue +++ b/package/document-component/src/components/LayCode.vue @@ -12,11 +12,6 @@