feat: 优化 table tab 的显示

This commit is contained in:
xingyu4j
2025-10-20 14:44:39 +08:00
parent eb61ac3adb
commit 5ceffa2fe9
19 changed files with 59 additions and 41 deletions

View File

@@ -132,8 +132,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
<FormModal @success="handleRefresh" />
<Grid>
<template #top>
<Tabs class="-mt-11" @change="handleChangeSceneType">
<template #toolbar-actions>
<Tabs class="w-full" @change="handleChangeSceneType">
<Tabs.TabPane tab="我负责的" key="1" />
<Tabs.TabPane tab="我参与的" key="2" />
<Tabs.TabPane tab="下属负责的" key="3" />

View File

@@ -122,8 +122,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
<FormModal @success="handleRefresh" />
<Grid>
<template #top>
<Tabs class="-mt-11" @change="handleChangeSceneType">
<template #toolbar-actions>
<Tabs class="w-full" @change="handleChangeSceneType">
<Tabs.TabPane tab="我负责的" key="1" />
<Tabs.TabPane tab="我参与的" key="2" />
<Tabs.TabPane tab="下属负责的" key="3" />

View File

@@ -132,8 +132,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
<FormModal @success="handleRefresh" />
<Grid>
<template #top>
<Tabs class="-mt-11" @change="handleChangeSceneType">
<template #toolbar-actions>
<Tabs class="-mt-11 w-full" @change="handleChangeSceneType">
<Tabs.TabPane tab="我负责的" key="1" />
<Tabs.TabPane tab="我参与的" key="2" />
<Tabs.TabPane tab="下属负责的" key="3" />

View File

@@ -166,8 +166,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
<FormModal @success="handleRefresh" />
<Grid>
<template #top>
<Tabs class="-mt-11" @change="handleChangeSceneType">
<template #toolbar-actions>
<Tabs class="-mt-11 w-full" @change="handleChangeSceneType">
<Tabs.TabPane tab="我负责的" key="1" />
<Tabs.TabPane tab="我参与的" key="2" />
<Tabs.TabPane tab="下属负责的" key="3" />

View File

@@ -139,8 +139,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
<FormModal @success="handleRefresh" />
<ImportModal @success="handleRefresh" />
<Grid>
<template #top>
<Tabs class="-mt-11" @change="handleChangeSceneType">
<template #toolbar-actions>
<Tabs class="w-full" @change="handleChangeSceneType">
<Tabs.TabPane tab="我负责的" key="1" />
<Tabs.TabPane tab="我参与的" key="2" />
<Tabs.TabPane tab="下属负责的" key="3" />

View File

@@ -114,8 +114,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
<FormModal @success="handleRefresh" />
<Grid>
<template #top>
<Tabs class="-mt-11" @change="handleChangeConfigType">
<template #toolbar-actions>
<Tabs class="w-full" @change="handleChangeConfigType">
<Tabs.TabPane
tab="拥有客户数限制"
:key="LimitConfType.CUSTOMER_QUANTITY_LIMIT"
@@ -156,7 +156,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
icon: ACTION_ICON.DELETE,
auth: ['crm:customer-limit-config:delete'],
popConfirm: {
title: $t('ui.actionMessage.deleteConfirm', [row.name]),
title: $t('ui.actionMessage.deleteConfirm', [row.id]),
confirm: handleDelete.bind(null, row),
},
},

View File

@@ -161,8 +161,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
<FormModal @success="handleRefresh" />
<Grid>
<template #top>
<Tabs class="-mt-11" @change="handleChangeSceneType">
<template toolbar-actions>
<Tabs class="w-full" @change="handleChangeSceneType">
<Tabs.TabPane tab="我负责的" key="1" />
<Tabs.TabPane tab="我参与的" key="2" />
<Tabs.TabPane tab="下属负责的" key="3" />

View File

@@ -144,8 +144,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
<FormModal @success="handleRefresh" />
<ReceivableFormModal @success="handleRefresh" />
<Grid>
<template #top>
<Tabs class="-mt-11" @change="handleChangeSceneType">
<template #toolbar-actions>
<Tabs class="w-full" @change="handleChangeSceneType">
<Tabs.TabPane tab="我负责的" key="1" />
<Tabs.TabPane tab="下属负责的" key="3" />
</Tabs>

View File

@@ -64,8 +64,12 @@ async function handleTabChange(key: any) {
<template>
<Page auto-content-height>
<Grid>
<template #top>
<Tabs v-model:active-key="activeTabName" @change="handleTabChange">
<template #toolbar-actions>
<Tabs
v-model:active-key="activeTabName"
class="w-full"
@change="handleTabChange"
>
<Tabs.TabPane
v-for="item in customerSummaryTabs"
:key="item.key"

View File

@@ -87,8 +87,12 @@ function handleActive(value: boolean) {
<template>
<Page auto-content-height>
<Grid>
<template #top>
<Tabs v-model:active-key="activeTabName" @change="handleTabChange">
<template #toolbar-actions>
<Tabs
v-model:active-key="activeTabName"
class="w-full"
@change="handleTabChange"
>
<Tabs.TabPane
v-for="item in customerSummaryTabs"
:key="item.key"

View File

@@ -143,8 +143,12 @@ onMounted(() => {
<template>
<Page auto-content-height>
<Grid>
<template #top>
<Tabs v-model:active-key="activeTabName" @change="handleTabChange">
<template #toolbar-actions>
<Tabs
v-model:active-key="activeTabName"
class="w-full"
@change="handleTabChange"
>
<Tabs.TabPane
v-for="item in customerSummaryTabs"
:key="item.key"

View File

@@ -71,8 +71,12 @@ async function handleTabChange(key: any) {
<template>
<Page auto-content-height>
<Grid>
<template #top>
<Tabs v-model:active-key="activeTabName" @change="handleTabChange">
<template #toolbar-actions>
<Tabs
v-model:active-key="activeTabName"
class="w-full"
@change="handleTabChange"
>
<Tabs.TabPane
v-for="item in customerSummaryTabs"
:key="item.key"

View File

@@ -64,8 +64,12 @@ async function handleTabChange(key: any) {
<template>
<Page auto-content-height>
<Grid>
<template #top>
<Tabs v-model:active-key="activeTabName" @change="handleTabChange">
<template #toolbar-actions>
<Tabs
v-model:active-key="activeTabName"
class="w-full"
@change="handleTabChange"
>
<Tabs.TabPane
v-for="item in customerSummaryTabs"
:key="item.key"

View File

@@ -234,9 +234,8 @@ onMounted(async () => {
</template>
<Grid>
<template #top>
<!-- TODO @xingyutabs 可以考虑往上以一些和操作按钮在一排 -->
<Tabs class="border-none" @change="onChangeTab">
<template #toolbar-actions>
<Tabs @change="onChangeTab" class="w-full">
<Tabs.TabPane
v-for="item in tabsData"
:key="item.type"

View File

@@ -113,8 +113,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
</template>
<Grid>
<template #top>
<Tabs class="-mt-11" @change="handleTabChange">
<template #toolbar-actions>
<Tabs class="w-full" @change="handleTabChange">
<TabPane
v-for="tab in statusTabs"
:key="tab.value"

View File

@@ -98,10 +98,10 @@ onMounted(() => {
</template>
<Grid>
<template #top>
<template #toolbar-actions>
<Tabs
v-model:active-key="statusTab"
class="-mt-11"
class="w-full"
@change="handleChangeStatus"
>
<Tabs.TabPane

View File

@@ -224,9 +224,8 @@ onMounted(async () => {
</template>
<Grid>
<template #top>
<!-- TODO @xingyutabs 可以考虑往上以一些和操作按钮在一排 -->
<ElTabs class="border-none" @tab-change="onChangeTab">
<template #toolbar-actions>
<ElTabs class="w-full" @tab-change="onChangeTab" :stretch="true">
<ElTabs.TabPane
v-for="item in tabsData"
:key="item.type"

View File

@@ -112,10 +112,10 @@ const [Grid, gridApi] = useVbenVxeGrid({
</template>
<Grid>
<template #top>
<template #toolbar-actions>
<ElTabs
:model-value="activeTab"
class="-mt-11"
class="w-full"
@tab-change="handleTabChange"
>
<ElTabPane

View File

@@ -98,10 +98,10 @@ onMounted(() => {
</template>
<Grid>
<template #top>
<template #toolbar-actions>
<ElTabs
v-model="statusTab"
class="-mt-11"
class="w-full"
@tab-change="handleChangeStatus"
>
<ElTabs.TabPane