feat: add Checkbox and Radio field families
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user