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