当前位置:网站首页>在{{}}中拼接字符
在{{}}中拼接字符
2022-07-02 04:58:00 【走出自闭的鸟儿】
在{ {}}中拼接字符
后端返回这样的数据
[ { "addressId": 35, "city": "北京市", "createTime": null, "district": "西城区", "houseNumber": "a区1号12层230", "officeName": "北京大学第一医院-地下停车场", "province": "北京市", "recordStatus": 0, "userCode": "", "workAddress": "北京市西城区爱民一巷2号(北海北地铁站A西北口步行440米)", "workLatitude": 39.932312, "workLongitude": 116.380994 }, { "addressId": 36, "city": "北京市", "createTime": null, "district": "西城区", "houseNumber": "a区1号12层230", "officeName": "北京大学第一医院-地下停车场", "province": "北京市", "recordStatus": 0, "userCode": "", "workAddress": "北京市西城区爱民一巷2号(北海北地铁站A西北口步行440米)", "workLatitude": 39.932312, "workLongitude": 116.380994 } ]
使用elementui的el-table渲染数据时,prop只能显示一个属性,我想一次取city和district两个属性进行显示,此时可以采用插槽clot-scope获取到这行的数据,再将两个属性进行拼接
<el-table
:data="addressInfo"
style="width: 100%">
<el-table-column
prop="officeName"
label="地址">
</el-table-column>
<el-table-column
label="区域">
<template slot-scope="scope">
{
{ scope.row.city+"·"+scope.row.district}}
</template>
</el-table-column>
</el-table>
边栏推荐
- Promise all()
- MySQL table insert Chinese change? Solution to the problem of No
- Cultivate primary and secondary school students' love for educational robots
- Common errors of dmrman offline backup
- 【ClickHouse】How to create index for Map Type Column or one key of it?
- Introduction to Luogu 3 [circular structure] problem list solution
- DC-1靶场搭建及渗透实战详细过程(DC靶场系列)
- TypeScript函数详解
- Research on the security of ognl and El expressions and memory horse
- 農業生態領域智能機器人的應用
猜你喜欢
Embedded-c language-9-makefile/ structure / Consortium
Analyzing the hands-on building tutorial in children's programming
2022-003arts: recursive routine of binary tree
idea自动导包和自动删包设置
Pit encountered in win11 pytorch GPU installation
Leetcode merge sort linked list
Solution: the agent throws an exception error
What data does the main account of Zhengda Meiou 4 pay attention to?
Promise all()
UNET deployment based on deepstream
随机推荐
Unity particle Foundation
Cannot activate CONDA virtual environment in vscode
Cache consistency solution - how to ensure the consistency between the cache and the data in the database when changing data
win10 磁盘管理 压缩卷 无法启动问题
idea自动导包和自动删包设置
Here comes the chicken soup! Keep this quick guide for data analysts
Win10 disk management compressed volume cannot be started
win11安装pytorch-gpu遇到的坑
MMAP zero copy knowledge point notes
Research on the security of ognl and El expressions and memory horse
【ClickHouse】How to create index for Map Type Column or one key of it?
June book news | 9 new books are listed, with a strong lineup and eyes closed!
培养中小学生对教育机器人的热爱之心
Solution: the agent throws an exception error
Let正版短信测压开源源码
Cubemx DMA notes
LeetCode-对链表进行插入排序
C case of communication between server and client based on mqttnet
TypeScript函数详解
Mathematical problems (number theory) trial division to judge prime numbers, decompose prime factors, and screen prime numbers