Files
heroui-vue/apps/playground/src/App.vue
T

102 lines
2.8 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
import { defineAsyncComponent } from "vue";
// Keep regression URLs stable; load only the selected harness.
const labs = [
{
key: "color-field-protocol",
title: "颜色字段与 Picker",
component: defineAsyncComponent(
() => import("./ColorFieldProtocolLab.vue"),
),
},
{
key: "color-slider-foundation",
title: "颜色轨道",
component: defineAsyncComponent(
() => import("./ColorSliderFoundationLab.vue"),
),
},
{
key: "color-input-foundation",
title: "颜色输入",
component: defineAsyncComponent(
() => import("./ColorInputFoundationLab.vue"),
),
},
{
key: "color-foundation",
title: "颜色模型与 Area",
component: defineAsyncComponent(() => import("./ColorFoundationLab.vue")),
},
{
key: "range-calendar-foundation",
title: "范围日历",
component: defineAsyncComponent(
() => import("./RangeCalendarFoundationLab.vue"),
),
},
{
key: "select-lifecycle",
title: "Select 生命周期",
component: defineAsyncComponent(
() => import("../../../packages/vue/tests/fixtures/SelectLifecycle.vue"),
),
},
{
key: "scroll-tabs",
title: "滚动与 Tabs",
component: defineAsyncComponent(() => import("./ScrollTabsLab.vue")),
},
{
key: "overlay-animation",
title: "弹层动画",
component: defineAsyncComponent(() => import("./OverlayAnimationLab.vue")),
},
{
key: "date-picker-overlay",
title: "DatePicker 嵌套弹层",
component: defineAsyncComponent(() => import("./DatePickerLab.vue")),
},
{
key: "date-range-picker-overlay",
title: "DateRangePicker 嵌套弹层",
component: defineAsyncComponent(() => import("./DateRangePickerLab.vue")),
},
{
key: "overlay-components",
title: "弹层公共组合",
component: defineAsyncComponent(() => import("./OverlayComponentsLab.vue")),
},
{
key: "overlay-lab",
title: "弹层基础协议",
component: defineAsyncComponent(() => import("./OverlayLab.vue")),
},
{
key: "filter-virtual",
title: "集合过滤与虚拟化",
component: defineAsyncComponent(() => import("./FilterVirtualLab.vue")),
},
];
const query = new URLSearchParams(
typeof window === "undefined" ? "" : window.location.search,
);
const active = labs.find((lab) => query.has(lab.key));
</script>
<template>
<component :is="active.component" v-if="active" />
<main v-else class="lab-index">
<h1>交互回归入口</h1>
<p>组件使用示例请看文档站;这里保留需要真实浏览器验证的专项场景。</p>
<nav aria-label="回归场景">
<ul>
<li v-for="lab in labs" :key="lab.key">
<a :href="`?${lab.key}`">{{ lab.title }}</a>
</li>
</ul>
</nav>
</main>
</template>