table-multilevel
v0.1.1
Published
table-multilevel
Downloads
4
Readme
cyq-fd
说明:table自定义动态多级嵌套表头
| 方法名 | 参数 | 说明 | | -------| ---------------------| :----: | | 无 | col, data |col: 表头结构树 2.data: table数据 |
Example
<template>
<div id="app">
<TableMultilevel :col="col" :data="data"></TableMultilevel>
</div>
</template>
<script>
import TableMultilevel from 'table-multilevel'
export default {
name: 'App',
components: {
TableMultilevel
},
data () {
return {
col: [{
prop: 'athleteName',
label: '姓名',
fixed: 'left'
},
{
label: '基础体能测试',
children: [
{
label: '2000米测功仪',
children: [
{
prop: 'twoThousandDynamometer',
label: '成绩'
},
{
prop: 'twoThousandDynamometerScore',
label: '得分'
}
]
},
{
label: '3000米测功仪',
children: [
{
prop: 'threeThousand',
label: '成绩'
},
{
prop: 'threeThousandScore',
label: '得分'
}
]
},
{
prop: 'basePhysicalTotalScore',
label: '本组得分'
}
]
},
{
label: '躯干稳定性和上下肢力量均衡性测试',
children: [
{
label: '上肢比值',
children: [
{
prop: 'upperLimbRatio',
label: '成绩'
},
{
prop: 'upperLimbRatioScore',
label: '得分'
}
]
},
{
label: '下肢比值',
children: [
{
prop: 'lowerRatio',
label: '成绩'
},
{
prop: 'lowerRationScore',
label: '得分'
}
]
},
{
prop: 'stabilityScoreAndPowerBalanceScore',
label: '本组得分'
}
]
},
{
label: '板块体能测试',
children: [
{
label: '80%以上最大心率保持时间',
prop: 'maxRateHeart'
},
{
prop: 'platePhysicalScore',
label: '本组得分'
}
]
}, {
prop: 'totalScore',
label: '总分'
}],
data: [
{
athleteName: '陈XX',
twoThousandDynamometer: 6,
twoThousandDynamometerScore: 8,
threeThousand: 7,
threeThousandScore: 8,
basePhysicalTotalScore: 7,
upperLimbRatio: 7,
upperLimbRatioScore: 6,
lowerRatio: 9,
lowerRationScore: 7,
stabilityScoreAndPowerBalanceScore: 8,
maxRateHeart: 9,
platePhysicalScore: 9,
totalScore: 8
},
{
athleteName: '陈XX',
twoThousandDynamometer: 6,
twoThousandDynamometerScore: 8,
threeThousand: 7,
threeThousandScore: 8,
basePhysicalTotalScore: 7,
upperLimbRatio: 7,
upperLimbRatioScore: 6,
lowerRatio: 9,
lowerRationScore: 7,
stabilityScoreAndPowerBalanceScore: 8,
maxRateHeart: 9,
platePhysicalScore: 9,
totalScore: 8
}
]
}
}
}
</script>