docs: complete handbook and prepare component verification tasks
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { Button, Link, buttonVariants } from "@heroui-vue/components";
|
||||
import { tv } from "@heroui-vue/styles";
|
||||
const count = ref(0);
|
||||
const customButton = tv({
|
||||
extend: buttonVariants,
|
||||
variants: { emphasis: { strong: "font-bold" } },
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<a href="#自定义变体" :class="buttonVariants({ variant: 'secondary' })">
|
||||
链接采用按钮外观
|
||||
</a>
|
||||
<Button
|
||||
as-child
|
||||
v-slot="{ isPressed }"
|
||||
:class="customButton({ emphasis: 'strong' })"
|
||||
@click="count++"
|
||||
>
|
||||
<button type="button" :data-custom-state="isPressed ? 'pressed' : 'idle'">
|
||||
自定义根节点 · {{ count }}
|
||||
</button>
|
||||
</Button>
|
||||
<Link href="/components/button">查看 Button API</Link>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user