fix: renaming import

This commit is contained in:
zernonia 2023-09-06 09:56:38 +08:00
parent 380ffe756b
commit 746bcde87a
3 changed files with 4 additions and 3 deletions

View File

@ -13,7 +13,7 @@ const props = withDefaults(defineProps<{
const Component = defineAsyncComponent({ const Component = defineAsyncComponent({
loadingComponent: Spinner, loadingComponent: Spinner,
loader: () => import(`../../../src/lib/registry/default/examples/${props.name}.vue`), loader: () => import(`../../../src/lib/registry/default/example/${props.name}.vue`),
timeout: 5000, timeout: 5000,
}) })
</script> </script>

View File

@ -17,7 +17,7 @@ export default function (md: MarkdownRenderer) {
const { name, attrs } = props const { name, attrs } = props
const pluginPath = dirname(__dirname) 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)) { if (!fs.existsSync(srcPath)) {
console.error(`rendering ${path}: ${srcPath} does not exist`) console.error(`rendering ${path}: ${srcPath} does not exist`)

View File

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import DatePickerWithRange from '@/lib/registry/default/examples/DatePickerWithRange.vue' import DatePickerWithRange from '@/lib/registry/default/example/DatePickerWithRange.vue'
import { Card, CardContent } from '@/lib/registry/default/ui/card' import { Card, CardContent } from '@/lib/registry/default/ui/card'
import { Label } from '@/lib/registry/default/ui/label' import { Label } from '@/lib/registry/default/ui/label'
</script> </script>
@ -16,3 +16,4 @@ import { Label } from '@/lib/registry/default/ui/label'
</CardContent> </CardContent>
</Card> </Card>
</template> </template>
@/lib/registry/default/example/DatePickerWithRange.vue