From 370d7cc7010b16dfb7de9fd9a65d9c44273c6a2e Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Tue, 14 May 2024 13:50:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E5=AD=90=E8=A1=A8=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fb28fcf11..b5120d3a5 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,47 @@ tableForm:{ }] }, -// 主子合并隐藏子 -hiddenInMain:true -// 主子排序 不配置默认999,不要设置0(留给左侧固定列使用) -sortTableDefault: -// 查询条件排序 -sortSearchDefault: + + +**主子表合并需要修改的代码** +1、影响Table表头 +const tableColumns = +ref([…”PurchaseMain”.allSchemas.tableColumns,…”PurchaseDetail”.allSchemas.tableMainColumns]) + +PurchaseMain:主表 +PurchaseDetail:子表 + +2、影响搜索头部 +在TableHead标签内部添加属性: + + +3、影响操作按钮 +3.1 修改 { + const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 + if(findIndex>0&&findIndex<$index){ + return [] + } +…下面是原有的按钮逻辑,不变 +} + +4、更换子表的请求接口 +const { tableObject, tableMethods } = useTable({ + getListApi: “PurchasereceiptRequestDetailApi.getPurchasereceiptRequestDetailPage”// 分页接口 +}) + +5、ts文件配置: +hiddenInMain:true, //子表中数据不展示在主表 +sortTableDefault:1000, // 主页面中Table表中展示的排序位置:默认值999 ,最小值1,值越大越靠后,值越小越靠前 +sortSearchDefault:1000,// 搜素框中展示的排序位置,用法同sortTableDefault