优化 Title 组件结构

This commit is contained in:
tao
2026-01-09 10:11:16 +08:00
parent 734d16539a
commit cd6a96442c

View File

@@ -2,8 +2,8 @@
<div class="title">
<span>{{ name }}</span>
<a-space class="subtitle">
<slot name="extra" />
<a-button v-if="showRefresh" size="small" type="primary" @click="handleRefresh">
<slot />
<a-button v-if="showRefresh" size="small" @click="handleRefresh">
<template #icon><i-lucide-rotate-ccw /></template>刷新
</a-button>
</a-space>
@@ -24,7 +24,6 @@ defineProps({
const slots = defineSlots<{
'default'(): any;
'extra'(): any;
}>();
const emit = defineEmits(['refresh']);