element ui中el-dialog如何自定义标题,加图标

效果图:
在这里插入图片描述

   <el-dialog
  title="提示"
  :visible.sync="dialogVisible"
  width="30%"
  :before-close="handleClose">
  <div slot="title" class="dialog-title">
    <i class="el-icon-warning"></i>
    <span class="title-text">数据详情</span>
    <div class="button-right">
      <span class="title-close" @click="cancel"></span>
    </div>
  </div>

  <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  </span>
</el-dialog>

猜你喜欢

转载自blog.csdn.net/qq_42931285/article/details/124701902