固定列表的表格

固定的行:行名称不一样,每一个值对应赋值
在这里插入图片描述

html:

		<el-table class="table-box" :data="allObj.peoArr">
          <el-table-column prop="name" min-width="130"></el-table-column>
          <el-table-column label="车主" prop="owner" min-width="180" v-if="typeFlag == 1 || typeFlag == 2 ">
            <template slot-scope="scope">
              <span>{{ (scope.row.owner || '') }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="insuredName" label="被保险人" min-width="180">
            <template slot-scope="scope">
              <span>{{ (scope.row.insuredName || '') }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="benefiPeo" label="受益人" min-width="180" v-if="typeFlag ==3">
            <template slot-scope="scope">
              <span>{{ (scope.row.benefiPeo || '') }}</span>
            </template>
          </el-table-column>
          <el-table-column label="投保人" min-width="180">
            <template slot-scope="scope">
              <span>{{ (scope.row.applicantName || '') }}</span>
            </template>
          </el-table-column>
        </el-table>

data:

        peoArr: [
          { name: '姓名', owner: '', insuredName: '', benefiPeo: '', applicantName: '' },
          { name: '手机号', owner: '', insuredName: '', benefiPeo: '', applicantName: '' },
          { name: '证件类型', owner: '', insuredName: '', benefiPeo: '', applicantName: '' },
          { name: '证件号', owner: '', insuredName: '', benefiPeo: '', applicantName: '' },
          { name: '邮箱', owner: '', insuredName: '', benefiPeo: '', applicantName: '' },
          { name: '城市', owner: '', insuredName: '', benefiPeo: '', applicantName: '' },
          { name: '地址', owner: '', insuredName: '', benefiPeo: '', applicantName: '' }
        ],

方法内 对应赋值

this.allObj.peoArr = [
          { name: '姓名', owner: '1', insuredName: '11', benefiPeo: '王企鹅无群', applicantName: '' },
          { name: '手机号', owner: '2', insuredName: '22', benefiPeo: '王企鹅', applicantName: '' },
          { name: '证件类型', owner: '3', insuredName: '222', benefiPeo: '', applicantName: '特务' },
          { name: '证件号', owner: '4', insuredName: '444', benefiPeo: '惹我', applicantName: '' },
          { name: '邮箱', owner: '5', insuredName: '555', benefiPeo: '', applicantName: '二' },
          { name: '城市', owner: '6', insuredName: '666', benefiPeo: '', applicantName: '' },
          { name: '地址', owner: '7', insuredName: '777', benefiPeo: '', applicantName: '' }
        ]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值