当前位置:网站首页>更改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>
边栏推荐
- Does database and table splitting cause reading diffusion problems? How to solve it?
- Sword finger offer II 016 Longest substring without repeating characters - sliding window
- Gets the number of occurrences of a character in a string
- Technology cloud report: how will the industrial Internet rebuild the security boundary in 2022?
- 目标识别、检测和 6D 姿态估算源码与方案(最先进的方法和数据集)
- 《MATLAB 神經網絡43個案例分析》:第7章 RBF網絡的回歸--非線性函數回歸的實現
- Filters and listeners
- Background position - mixed units
- 通俗理解时域采样与频域延拓
- sql中的Exists用法
猜你喜欢
![(node:22344) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permit](/img/c1/d56ec09663857afa52f20848aeadac.png)
(node:22344) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permit

Priority issues

Does database and table splitting cause reading diffusion problems? How to solve it?

Redis installation test

Union selector

Application method of new version UI of idea + use method of non test qualification and related introduction
![[character set 8] char8_ t、char16_ t、char32_ t、wchar、char](/img/ef/e57fb345b36c84d3585fca0568b0ee.png)
[character set 8] char8_ t、char16_ t、char32_ t、wchar、char
![[advanced pointer 2] array parameter transfer & pointer parameter transfer & function pointer & function pointer array & callback function](/img/90/447d601a8c338cdd5a6674a2dc59ae.png)
[advanced pointer 2] array parameter transfer & pointer parameter transfer & function pointer & function pointer array & callback function

Analysis of 43 cases of MATLAB neural network: Chapter 8 prediction of GRNN Network - Freight Volume Prediction Based on generalized regression neural network

Can you migrate backwards before the first migration in the south- Can you migrate backwards to before the first migration in South?
随机推荐
ip、DNS、域名、URL、hosts
Make a simple page with the websql database of HTML5:
《MATLAB 神经网络43个案例分析》:第7章 RBF网络的回归--非线性函数回归的实现
Does database and table splitting cause reading diffusion problems? How to solve it?
Sword finger offer II 016 Longest substring without repeating characters - sliding window
The classic dog contract of smart contract (I)
128. Plus longue séquence continue - table de hachage
IP, DNS, domain name, URL, hosts
Box model border
[character set 6] wide string and multi byte character conversion
ERROR 1630 (42000): FUNCTION a.avg does not exist. Check the ‘Function Name Parsing and Resolution‘
Notes on data mining in Tsinghua University (1)
2024. 考试的最大困扰度-滑动窗口
第三章 寄存器 (内存访问)
Tool classes for extracting zip files
Grab screen and ground glass effect
第六章-包含多个段的程序
128. 最长连续序列-哈希表
Cookies and sessions
【无标题】Task3 多路召回