Files
heroui-vue/apps/docs/demos/close-button-interactive.vue

13 lines
395 B
Vue
Raw Permalink 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 { ref } from "vue";
import { CloseButton } from "@heroui-vue/components";
const count = ref(0);
</script>
<template>
<div class="flex flex-col items-center justify-center gap-4">
<CloseButton :aria-label="`关闭(已点击 ${count} 次)`" @click="count++" />
<span class="text-sm text-muted">已点击:{{ count }} 次</span>
</div>
</template>