This commit is contained in:
2026-09-19 17:02:11 +08:00
parent 4eb17ece4f
commit 514abf6eda
33 changed files with 525 additions and 223 deletions
+3 -2
View File
@@ -143,8 +143,8 @@ function setPage(value: number) {
<template>
<div class="data-table" :class="$attrs.class">
<header v-if="$slots.toolbar || $slots['toolbar-actions']" class="data-table__toolbar">
<div class="data-table__toolbar-heading"><slot name="toolbar" /></div>
<header v-if="$slots.toolbar || $slots['toolbar-actions']" class="data-table__toolbar" :class="{ 'data-table__toolbar--actions-only': !$slots.toolbar }">
<div v-if="$slots.toolbar" class="data-table__toolbar-heading"><slot name="toolbar" /></div>
<div class="data-table__toolbar-actions"><slot name="toolbar-actions" /></div>
</header>
<slot name="before-table" />
@@ -227,6 +227,7 @@ function setPage(value: number) {
<style scoped>
.data-table { min-width: 0; }
.data-table__toolbar { display: flex; min-height: 48px; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--client-gap); padding: var(--client-toolbar-padding); border-bottom: 1px solid var(--client-border); }
.data-table__toolbar--actions-only { justify-content: flex-start; }
.data-table__toolbar-heading, .data-table__toolbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--client-gap); }
.data-table__toolbar-heading { color: var(--client-muted); font-size: 12px; }
.data-table__toolbar-heading :slotted(strong) { color: var(--client-text); font-size: 14px; }