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" /> <FormModal @success="handleRefresh" />
<Grid> <Grid>
<template #top> <template #toolbar-actions>
<Tabs class="-mt-11" @change="handleChangeSceneType"> <Tabs class="w-full" @change="handleChangeSceneType">
<Tabs.TabPane tab="我负责的" key="1" /> <Tabs.TabPane tab="我负责的" key="1" />
<Tabs.TabPane tab="我参与的" key="2" /> <Tabs.TabPane tab="我参与的" key="2" />
<Tabs.TabPane tab="下属负责的" key="3" /> <Tabs.TabPane tab="下属负责的" key="3" />

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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