feat: 优化PureTableBar组件,title可使用插槽 (#560)

* feat: 优化PureTableBar组件,title可使用插槽
This commit is contained in:
Netfan 2023-05-19 16:30:05 +08:00 committed by GitHub
parent 79ff7c0462
commit 1f21a2d364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,9 +200,13 @@ export default defineComponent({
return () => (
<>
<div {...attrs} class="w-[99/100] mt-4 px-2 pb-2 bg-bg_color">
<div {...attrs} class="w-[99/100] mt-2 px-2 pb-2 bg-bg_color">
<div class="flex justify-between w-full h-[60px] p-4">
<p class="font-bold truncate">{props.title}</p>
{slots?.title ? (
slots.title()
) : (
<p class="font-bold truncate">{props.title}</p>
)}
<div class="flex items-center justify-around">
{slots?.buttons ? (
<div class="flex mr-4">{slots.buttons()}</div>