mirror of
https://github.com/imdap/ruoyi-plus-vben5.git
synced 2026-05-11 13:22:09 +08:00
* chore: update deps * feat: use jsonc/x language * chore: update eslint 10.0 * fix: no-useless-assignment * feat: add CLAUDE.md * chore: ignore * feat: claude * fix: lint * chore: suppot eslint v10 * fix: lint * fix: lint * fix: type check * fix: unit test * fix: Suggested fix * fix: unit test * chore: update stylelint v17 * chore: update all major deps * fix: echarts console warn * chore: update vitest v4 * feat: add skills ignores * chore: update deps * chore: update deps * fix: cspell * chore: update deps * chore: update tailwindcss v4 * chore: remove postcss config * fix: no use catalog * chore: tailwind v4 config * fix: tailwindcss v4 sort * feat: use eslint-plugin-better-tailwindcss * fix: Interference between enforce-consistent-line-wrapping, jsx-curly-brace-presence and Prettier * fix: Interference between enforce-consistent-line-wrapping, jsx-curly-brace-presence and Prettier * fix(lint): resolve prettier and better-tailwindcss formatting conflicts * fix(tailwind): update theme references and lint sources * style(format): normalize apps docs and playground vue files * style(format): normalize core ui-kit components * style(format): normalize effects ui and layout components
46 lines
1.2 KiB
Vue
46 lines
1.2 KiB
Vue
<script setup lang="ts">
|
|
import { computed } from 'vue';
|
|
|
|
import PreviewGroup from './preview-group.vue';
|
|
|
|
interface Props {
|
|
files?: string;
|
|
}
|
|
|
|
const props = withDefaults(defineProps<Props>(), { files: '() => []' });
|
|
|
|
const parsedFiles = computed(() => {
|
|
try {
|
|
return JSON.parse(decodeURIComponent(props.files ?? ''));
|
|
} catch {
|
|
return [];
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div class="relative rounded-xl border border-border shadow-float">
|
|
<div
|
|
class="not-prose relative w-full overflow-x-auto rounded-t-lg px-4 py-6"
|
|
>
|
|
<div class="flex w-full max-w-[700px] px-2">
|
|
<ClientOnly>
|
|
<slot v-if="parsedFiles.length > 0"></slot>
|
|
<div v-else class="text-sm text-destructive">
|
|
<span class="rounded-sm bg-destructive p-1 text-foreground">
|
|
ERROR:
|
|
</span>
|
|
The preview directory does not exist. Please check the 'dir'
|
|
parameter.
|
|
</div>
|
|
</ClientOnly>
|
|
</div>
|
|
</div>
|
|
<PreviewGroup v-if="parsedFiles.length > 0" :files="parsedFiles">
|
|
<template v-for="file in parsedFiles" #[file]>
|
|
<slot :name="file"></slot>
|
|
</template>
|
|
</PreviewGroup>
|
|
</div>
|
|
</template>
|