diff --git a/docs/plugins/api.md b/docs/plugins/api.md index 430e0c06a..b9b311853 100644 --- a/docs/plugins/api.md +++ b/docs/plugins/api.md @@ -50,6 +50,49 @@ addCustomTab({ }, category: 'advanced', }) + + +const SFC = /* vue */ ` + + + + + +` + +addCustomTab({ + name: 'plugin-count', + title: 'Plugin Count', + icon: 'baseline-exposure-plus-1', + // SFC view + view: { + type: 'sfc', + sfc: SFC, + }, + category: 'app', +}) ``` ## `addCustomCommand` diff --git a/package.json b/package.json index c31b13382..cb62afb33 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "play:multi-app": "turbo dev --filter=./packages/playground/multi-app", "play:webpack": "turbo dev --filter=./packages/playground/webpack", "play:options-api": "turbo dev --filter=./packages/playground/options-api", + "play:plugin-sfc": "turbo dev --filter=./packages/playground/plugin-sfc", "docs": "pnpm -C docs run docs:dev", "docs:build": "pnpm -C docs run docs:build", "zip": "tsx ./scripts/extension-zip.ts", diff --git a/packages/client/package.json b/packages/client/package.json index 2f737a2de..176a89f03 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -41,7 +41,8 @@ "vis-network": "^9.1.9", "vite-hot-client": "^0.2.4", "vue-router": "^4.5.0", - "vue-virtual-scroller": "2.0.0-beta.8" + "vue-virtual-scroller": "2.0.0-beta.8", + "vue3-sfc-loader": "^0.9.5" }, "devDependencies": { "@iconify/json": "^2.2.277", diff --git a/packages/client/src/components/CustomTabComponent.vue b/packages/client/src/components/CustomTabComponent.vue index 0aea1e9cd..0c6f34b63 100644 --- a/packages/client/src/components/CustomTabComponent.vue +++ b/packages/client/src/components/CustomTabComponent.vue @@ -39,6 +39,9 @@ watch(() => tabName.value, () => { +