element is written dead, how to flexibly pass it into the specified field? For example, I know that the backend will return some key and valuations, and I want to replace the fields in label and Prop directly. I used v-for to facilitate prop bound fields and found that this didn"t work.
<template>
<el-table
:data="tableData"
style="width: 100%">
<el-table-column
prop="date"
label=""
width="180">
</el-table-column>
<el-table-column
prop="name"
label=""
width="180">
</el-table-column>
<el-table-column
prop="address"
label="">
</el-table-column>
</el-table>
</template>
<script>
export default {
data() {
return {
tableData: [{
date: "2016-05-02",
name: "",
address: " 1518 "
}, {
date: "2016-05-04",
name: "",
address: " 1517 "
}, {
date: "2016-05-01",
name: "",
address: " 1519 "
}, {
date: "2016-05-03",
name: "",
address: " 1516 "
}]
}
}
}
</script>