数据详情
._el-dialog如何给他的header加个标签">
当前位置:   article > 正文

element自定义el-dialog标题,加图标_el-dialog如何给他的header加个标签

el-dialog如何给他的header加个标签

在这里插入图片描述
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>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

data中

data () {
	retrun: {
		dialogTableVisible: false,
		gridData: []
	}
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

methods中:

methods: {
	cancel () {
		this.dialogTableVisible = false
	}
}
  • 1
  • 2
  • 3
  • 4
  • 5

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>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/86040
推荐阅读