javascript
复制代码
<template>
<div class="nox">
<table class="hot-table" height='244'>
<tr>
<th v-for="(item, index) in headers" :key="index">{{item.label}}</th>
</tr>
<tr v-for="(item, index) in evaluationData.list" :key="index">
<td>{{item.name}}</td>
<td>{{item.value1}}</td>
<td>{{item.value2}}</td>
</tr>
</table>
</div>
</template>
<script>
export default {
data () {
return {
headers: [
{ label: '名称', prop: 'key' },
{ label: '数量', prop: 'highRiskNum' },
{ label: '总价', prop: 'highRiskProportion', unit: '%' }
],
evaluationData: {
list: [
{ name: '9999', value1: '111', value2: '222' },
{ name: '9999', value1: '111', value2: '222' },
{ name: '9999', value1: '111', value2: '222' },
{ name: '9999', value1: '111', value2: '222' },
{ name: '9999', value1: '111', value2: '222' },
{ name: '9999', value1: '111', value2: '222' }
]
}
}
}
}
</script>
<style lang="less" scoped>
.nox {
background: #fff;
}
.hot-table {
width: 300px;
th {
height: 20px;
font-size: 12px;
font-weight: normal;
background: #edf0f5;
padding-left: 20px;
color: #404e73;
}
td {
height: 20px;
font-size: 12px;
text-align: center;
border-bottom: 1px solid #f2f3f6;
}
}
</style>