首页 > 其他分享 >elementUI table 数组中各项加逗号隔开

elementUI table 数组中各项加逗号隔开

时间:2022-11-08 15:57:55浏览次数:43  
标签:elementUI label 逗号 item 数组 table

js处理

//this.newTableData 数组 
            this.newTableData.map((item,index)=>{
                //item.label 数组
                if(item.label){
                    item.label = item.label.join(',');
                }
            })

element UI table 中用插槽实现:

<el-table-column prop="label" label="客群标签">
					<template slot-scope="scope">
						<div class="label-ceil">
							<div v-for="(item,ind) in scope.row.label" :key="ind">
								<span v-if="ind+1 == scope.row.label.length">{{item}} </span>
								<span v-else>{{item}},</span>
							</div>
						</div>
					</template>
				</el-table-column>

  数组最后一个不加逗号

标签:elementUI,label,逗号,item,数组,table
From: https://www.cnblogs.com/yeziyou/p/16869970.html

相关文章

  • Dataverse Table Types
    TabletypesThereareOOBtableswhicharepreconfiguredbyMicrosoft,suchasAccountandContacttables,andtherearethecustomtables,whichiscreatedby......
  • iptables 防火墙
    一.iptables概述1、netfilter/iptables关系二、iptables的四表五链1、四表2、五链三、iptables规则链(五链)的匹配顺序1、规则链之间的匹配顺序2、规则链内的匹......
  • elementUI table 第一列值相等合并
    效果如下: 首先:在table上加:span-method="spanMethod"   其次:methods中加两个方法dataPretreatment(){ //表格数据列合并预处理,生成一个与行数相同的数......
  • iOS15.6以后UITableview设置UITableViewStyleGrouped底部会多出一段空白
    在适配iPhone14的过程中,发现之前没问题的UITableview底部会多出一截,查看低版本系统手机正常显示,iOS15.6的iPhone11也有同样的问题。继iOS11以后UITableview多出空白又有新......
  • QTableWidget 遍历
    for(introw=0;row<ui->tableWidget->rowCount();row++){ for(intcol=0;col<ui->tableWidget->columnCount();col++) { QTableWidgetItem*item=ui->tableWidg......
  • contentEditable 富文本,中文输入法触发多次oninput事件解决办法
    1. contentEditable富文本,没有onchange事件,有oninput事件,但是遇见中文输入法时,会触发多次,而我们只想输入结束时触发。那我们需要用到compositionstart和compositionend事......
  • ElementUI侧边栏展开隐藏折叠功能
    一般后台管理项目中无论是ElementUI或Iview轻量UI框架都有很多组件来实现功能我们需要实现的是这样子的:在源代码里左侧菜单之前添加一个div,类名为“toggle-button”,然......
  • C#从大量数据的DataTable高效率快速导出到Excel
    using Microsoft.Office.Interop.Excel;using System.Runtime.InteropServices;  //dt:从数据库读取的数据;file_name:保存路径;sheet_name:表单名称private void Da......
  • Different lower_case_table_names settings for server (‘1‘) and data dictionary
    ubuntu18.04mysql8.0 ubuntu18.04下/etc/mysql/ mysql.cnf 里面加上了这么一段:[mysqld]lower_case_table_names=1#protocol=tcp为的是解决大小写敏感的问题,可是重启m......
  • Springboot Async异步扩展使用 结合 CompletableFuture
    前言很早前,出过一篇介绍springboot怎么使用异步线程的文章(如果你还未了解异步的使用,可以先看看这篇)《SpringBoot最简单的使用异步线程案例@Async》:然后近期有些小伙伴使用......