docs: complete handbook and prepare component verification tasks
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { Button } from "@heroui-vue/components";
|
||||
const pending = ref(false);
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<Button as-child v-slot="{ isPressed, isHovered, isFocusVisible }">
|
||||
<button class="handbook-state-button">
|
||||
{{
|
||||
isPressed
|
||||
? "按下中"
|
||||
: isHovered
|
||||
? "悬停中"
|
||||
: isFocusVisible
|
||||
? "键盘焦点"
|
||||
: "与我交互"
|
||||
}}
|
||||
</button>
|
||||
</Button>
|
||||
<Button is-disabled>禁用</Button>
|
||||
<Button :is-pending="pending">{{ pending ? "加载中" : "正常操作" }}</Button>
|
||||
<label>
|
||||
<input v-model="pending" type="checkbox" />
|
||||
加载状态
|
||||
</label>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped>
|
||||
.handbook-state-button[data-pressed="true"] {
|
||||
outline: 2px solid var(--focus);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user