vbenadmin表尾合计⾏⾃定义样式修改原表尾合计⾏是⽤的表格,对于有些情形需要不同的合计样式。如改成使⽤描述列表的形式:
文明学以此为例,修改步骤:
修改src\components\Table\src\components\TableFooter.vue
打喷嚏腰疼
<template>
<Description @register="register"/>
</template>蝴蝶山
export default defineComponent({
name:'BasicTableFooter',
components:{ Description },
props:{
//传参
mockData:{
type: Object,
},
schema:{
土豆排骨汤的做法type:Array as PropType<DescItem[]>,
},
},
tup(props){
const{ mockData, schema }= props;
const[register]=uDescription({
title:'汇总信息',
column:2,
data:mockData,我的老师600
schema:schema,
});
return{ register };
},
});
修改src\components\Table\src\hooks\uTableFooter.ts
const getFooterProps =computed((): Recordable |undefined=>{
const{ summaryFunc, showSummary, summaryData,mockData, schema }=unref(propsRef); return showSummary &&!unref(getIsEmptyData)
?()=>h(TableFooter,{ summaryFunc, summaryData,mockData, schema, scroll:unref(scrollRef)}) :undefined;
});
主要是加⼊所需传参
修改src\components\Table\src\types\table.ts,在BasicTableProps加⼊传参
schema?:DescItem[],
办理北京居住证mockData?: Object,
修改src\components\Table\src\props.ts⾥basicProps,加⼊传参
schema:{type:Array as PropType<DescItem[]>,default:null},
15的所有因数mockData:{
type: Object,
default:null,
葡萄胎早期症状
},
应⽤,在uTable⾥加⼊以下属性:
showSummary:true,
schema: schema,
mockData:mockData,