mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-03 00:02:28 +08:00
- 更新 avatar-image, badge, checkbox, input, switch 等组件 - 优化 dialog, pagination, select-item, tabs 等组件 - 调整 table-card, refresh-button 组件
41 lines
645 B
Vue
41 lines
645 B
Vue
<template>
|
|
<Button
|
|
variant="ghost"
|
|
size="icon"
|
|
class="h-8 w-8"
|
|
:disabled="loading"
|
|
:title="title"
|
|
@click="handleClick"
|
|
>
|
|
<RefreshCcw
|
|
class="w-3.5 h-3.5"
|
|
:class="loading ? 'animate-spin' : ''"
|
|
/>
|
|
</Button>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { Button } from '@/components/ui'
|
|
import { RefreshCcw } from 'lucide-vue-next'
|
|
|
|
interface Props {
|
|
loading?: boolean
|
|
title?: string
|
|
}
|
|
|
|
interface Emits {
|
|
(e: 'click'): void
|
|
}
|
|
|
|
withDefaults(defineProps<Props>(), {
|
|
loading: false,
|
|
title: '刷新'
|
|
})
|
|
|
|
const emit = defineEmits<Emits>()
|
|
|
|
function handleClick() {
|
|
emit('click')
|
|
}
|
|
</script>
|