当前位置:网站首页>更改tabledata列名
更改tabledata列名
2022-06-12 09:04:00 【一只小奶狗】
<template>
<el-container>
<el-aside>
</el-aside>
<el-header>
<el-row :gutter="20">
<el-col :span="3">
<el-input v-model="input1"></el-input>
</el-col>
<el-col :span="3">
<el-input v-model="input1"></el-input>
</el-col>
<el-col :span="3">
<el-input v-model="input1"></el-input>
</el-col>
<el-col :span="2">
<el-button type="primary">查询</el-button>
</el-col>
<el-col :span="2">
<el-button type="primary" @click="exportData">导出</el-button>
</el-col>
</el-row>
</el-header>
<el-table
:data="tableData"
style="width: 50%">
<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>
<el-main>
</el-main>
</el-container>
</template>
<script>
export default {
name: "testPage",
data() {
return {
input1: '',
tableData: [{
date: '2016-05-02',
name: '王小虎1',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎2',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-01',
name: '王小虎3',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-03',
name: '王小虎4',
address: '上海市普陀区金沙江路 1516 弄'
}],
ripColumns: [
{
fedNam: 'name', fedRmk: '姓名'},
{
fedNam: 'address', fedRmk: '地址'},
{
fedNam: 'date', fedRmk: '日期'},
],
}
},
methods: {
exportData() {
this.trans();
},
trans() {
let res = [];
this.tableData.forEach(dat=>{
let obj = {
};
this.ripColumns.forEach(col =>{
obj[col['fedRmk']] = dat[col['fedNam']];
})
res.push(obj);
})
console.log(res)
}
}
}
</script>
<style scoped>
</style>
边栏推荐
- 2022 simulated examination platform operation of high voltage electrician work license question bank
- 128. 最长连续序列-哈希表
- Summary of common character sets
- Technology cloud report: how will the industrial Internet rebuild the security boundary in 2022?
- 2022 safety officer-c certificate special operation certificate examination question bank and simulation examination
- When the uniapp page jumps with complex data parameters.
- Problems that cannot be resolved by tar command
- Sword finger offer:[day 8 dynamic planning (simple)] --- > frog jumping on steps
- 剑指 Offer II 016. 不含重复字符的最长子字符串-滑动窗口
- IP, DNS, domain name, URL, hosts
猜你喜欢

Unittest test framework

Close asymmetric key
![[advanced pointer I] character array & array pointer & pointer array](/img/ea/150b2162e4e1641eee7e852935d101.png)
[advanced pointer I] character array & array pointer & pointer array

EIP-1559

Box model border

ERROR 1630 (42000): FUNCTION a.avg does not exist. Check the ‘Function Name Parsing and Resolution‘

网页中加载二次元3D虚拟主播源码(1:项目介绍和源码)

Domain name mapping to specified IP

《MATLAB 神经网络43个案例分析》:第8章 GRNN网络的预测----基于广义回归神经网络的货运量预测

Analysis of 43 cases of MATLAB neural network: Chapter 7 regression of RBF Network -- Realization of nonlinear function regression
随机推荐
Introduction to applet cloud development -- questionnaire evaluation applet practice (7)
xshell启动遇到“由于找不到mfc110.dll,无法继续执行代码的解决方法”
torch. logical_ And() method
Occupied occupied occupied occupied occupied
Encapsulate the amount input box component.
Handling abnormal data
第五章-[bx]和Loop指令
Source code and scheme for target recognition, detection and 6D attitude estimation (the most advanced method and data set)
(十三)文本渲染Text
Union selector
RuntimeError:Input and parameter tensors are not at the same device, found input tensor at cuda:0 an
mySql学习记录——二、mySql建表命令
剑指 Offer II 016. 不含重复字符的最长子字符串-滑动窗口
Chapter 3 registers (memory access)
2022 low voltage electrician retraining question bank and online simulation examination
Sword finger offer:[day 8 dynamic planning (simple)] --- > frog jumping on steps
Use NVM to dynamically adjust the nodejs version to solve the problem that the project cannot be run and packaged because the node version is too high or too low
长安链节点证书、角色、权限管理介绍
Can you migrate backwards before the first migration in the south- Can you migrate backwards to before the first migration in South?
(13) Text rendering text