feat(card-list): 添加字段列数配置支持多列布局
Some checks failed
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled

- 新增 fieldColumns 配置项控制卡片内字段排列列数
- 支持通过 colSpan 设置字段跨列显示
- 优化卡片内容布局样式和字段显示效果
- 调整对账模块相关页面布局
This commit is contained in:
2026-01-07 14:41:52 +08:00
parent 75111681b4
commit ccfa4b5f15
9 changed files with 84 additions and 22 deletions

View File

@@ -87,6 +87,7 @@ const gridOptions = computed(() => ({
},
field: 'tel',
title: '用户手机号',
colSpan: 2,
},
{ editRender: { name: 'Input' }, field: 'orderMoney', title: '订单金额' },
{ editRender: { name: 'Input' }, field: 'realMoney', title: '实际金额' },
@@ -107,6 +108,8 @@ const gridOptions = computed(() => ({
name: 'Select',
props: {
options: [
{ label: '1个月', value: '1' },
{ label: '3个月', value: '3' },
{ label: '半年', value: '6' },
{ label: '一年', value: '12' },
{ label: '两年', value: '24' },
@@ -123,9 +126,10 @@ const gridOptions = computed(() => ({
],
showTitle: true,
titleField: 'productName',
gridColumns: 4,
gridHeight: '355px',
cardHeight: '345px',
gridColumns: 3,
fieldColumns: 2,
gridHeight: '220px',
cardHeight: '210px',
}));
const [Grid, gridApi] = useCardList<CreateOrderType>({

View File

@@ -266,7 +266,7 @@ function onCompleteCheckCreated() {
</div>
</div>
</Card>
<div class="flex flex-1 flex-col gap-2">
<div class="flex w-3/4 flex-1 flex-col gap-2">
<Card
:tab-list="tabList"
:active-tab-key="activeTabKey"
@@ -293,7 +293,7 @@ function onCompleteCheckCreated() {
<Card
v-if="activeTabKey !== '0'"
:title="`已选列表(${selectedData.length})`"
class="h-[405px] w-full"
class="h-[270px] w-full"
size="small"
>
<template #extra>
@@ -322,6 +322,7 @@ function onCompleteCheckCreated() {
padding: 5px !important;
}
.order-card {
width: 100%;
:deep(.ant-card-body) {
padding: 1px !important;
height: calc(100% - 46px); // 减去标签页头部高度

View File

@@ -0,0 +1,14 @@
<script lang="ts" setup>
import { ref } from 'vue';
import { TabPane, Tabs } from 'ant-design-vue';
const activeKey = ref(1);
</script>
<template>
<div>
<Tabs v-model:active-key="activeKey" :style="{ height: '200px' }">
<TabPane v-for="i in 30" :key="i" :tab="`Tab-${i}`">Content of tab {{ i }}</TabPane>
</Tabs>
</div>
</template>