From 746bcde87a10386e085c976da1c7f0a9aeb0baaf Mon Sep 17 00:00:00 2001 From: zernonia Date: Wed, 6 Sep 2023 09:56:38 +0800 Subject: [PATCH] fix: renaming import --- apps/www/.vitepress/theme/components/ComponentPreview.vue | 2 +- apps/www/.vitepress/theme/plugins/previewer.ts | 2 +- apps/www/src/examples/cards/components/DatePicker.vue | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/www/.vitepress/theme/components/ComponentPreview.vue b/apps/www/.vitepress/theme/components/ComponentPreview.vue index 4e16598a..a578e322 100644 --- a/apps/www/.vitepress/theme/components/ComponentPreview.vue +++ b/apps/www/.vitepress/theme/components/ComponentPreview.vue @@ -13,7 +13,7 @@ const props = withDefaults(defineProps<{ const Component = defineAsyncComponent({ loadingComponent: Spinner, - loader: () => import(`../../../src/lib/registry/default/examples/${props.name}.vue`), + loader: () => import(`../../../src/lib/registry/default/example/${props.name}.vue`), timeout: 5000, }) diff --git a/apps/www/.vitepress/theme/plugins/previewer.ts b/apps/www/.vitepress/theme/plugins/previewer.ts index 501b6930..277ea297 100644 --- a/apps/www/.vitepress/theme/plugins/previewer.ts +++ b/apps/www/.vitepress/theme/plugins/previewer.ts @@ -17,7 +17,7 @@ export default function (md: MarkdownRenderer) { const { name, attrs } = props const pluginPath = dirname(__dirname) - const srcPath = resolve(pluginPath, '../../src/lib/registry/default/examples/', `${name}.vue`).replace(/\\/g, '/') + const srcPath = resolve(pluginPath, '../../src/lib/registry/default/example/', `${name}.vue`).replace(/\\/g, '/') if (!fs.existsSync(srcPath)) { console.error(`rendering ${path}: ${srcPath} does not exist`) diff --git a/apps/www/src/examples/cards/components/DatePicker.vue b/apps/www/src/examples/cards/components/DatePicker.vue index 90f79103..66346dc3 100644 --- a/apps/www/src/examples/cards/components/DatePicker.vue +++ b/apps/www/src/examples/cards/components/DatePicker.vue @@ -1,5 +1,5 @@ @@ -16,3 +16,4 @@ import { Label } from '@/lib/registry/default/ui/label' +@/lib/registry/default/example/DatePickerWithRange.vue