feat: add Checkbox and Radio field families

This commit is contained in:
maoyingjie
2026-10-22 09:15:27 +08:00
parent a4fb3c550a
commit bcadbeaf8c
75 changed files with 5293 additions and 22 deletions
+17 -2
View File
@@ -2,7 +2,11 @@
import { IconCode, IconCopy } from "@tabler/icons-vue";
import { computed, ref, watch, onBeforeUnmount, useId } from "vue";
import { highlights } from "virtual:docs-data";
const props = defineProps<{ name: string }>();
const props = defineProps<{
name: string;
align?: "center" | "start" | "end";
isBgSolid?: boolean;
}>();
const demos = import.meta.glob("../../demos/*.vue", {
eager: true,
import: "default",
@@ -53,7 +57,18 @@ onBeforeUnmount(() => clearTimeout(timer));
</script>
<template>
<div class="component-preview-container" :data-name="name">
<div class="preview not-prose">
<div
class="preview not-prose"
:style="{
alignItems:
align === 'start'
? 'flex-start'
: align === 'end'
? 'flex-end'
: undefined,
background: isBgSolid ? 'var(--background)' : undefined,
}"
>
<div class="demo-row">
<component :is="component" v-if="component" />
<p v-else role="alert">示例不存在:{{ name }}</p>