element自定义el-dialog标题,加图标

在这里插入图片描述
template中

<el-dialog :visible.sync="dialogTableVisible">
  <div slot="title" class="dialog-title">
    <i class="el-icon-edit-outline"></i>
    <span class="title-text">数据详情</span>
    <div class="button-right">
      <span class="title-close" @click="cancel"></span>
    </div>
  </div>
  <el-table :data="gridData">
    <el-table-column property="date" label="日期" width="150"></el-table-column>
    <el-table-column property="name" label="姓名" width="200"></el-table-column>
    <el-table-column property="address" label="地址"></el-table-column>
  </el-table>
</el-dialog>

data中

data () {
	retrun: {
		dialogTableVisible: false,
		gridData: []
	}
}

methods中:

methods: {
	cancel () {
		this.dialogTableVisible = false
	}
}

style中:

<style>
.dialog-title {
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
  }
  .dialog-title i {
    color: #45A4F9;
    /* color: #0B2278; */
    font-size: 16px;
    line-height: 38px;
  }
  .dialog-footer {
    text-align: left;
    font-size: 14px;
    font-weight: 700;
  }
</style>
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值