踩过的坑 下次注意

1.element UI 里面的messageBox  若想修改弹窗样式  可以加上customClass

 open() {
        this.$alert(
          '<div style="height:600px;800px;background:red;"></div>', 
          '', 
          
          {
         customClass:'winClass',//弹窗样式
          dangerouslyUseHTMLString: true,
          showConfirmButton:false
        });
      }

但是注意 这个时候需要把style里面不能有scoped  否则样式不生效 

参考文档   https://segmentfault.com/q/1010000020057565/a-1020000020061747

2.怎么样element UI tabs 组件居中显示

<el-tabs stretch v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="活动介绍" name="first">活动介绍</el-tab-pane>
        <el-tab-pane label="活动动态" name="second">活动动态</el-tab-pane>
      </el-tabs>

参考文档  https://segmentfault.com/q/1010000018807069?utm_source=tag-newest

3.Vue element-ui popover 弹出框怎样插入html代码?

使用v-html

   <el-popover placement="left" title="" width="200" trigger="hover" >
         <div class="popover-content" v-html="html"></div>
      <el-button slot="reference">hover 激活</el-button>
    </el-popover>

export default {
    data(){
        return{
             html: '<h1>这是一段内容</h1><b>sdd</b> '
        }
    }
};

参考文档  https://segmentfault.com/q/1010000018042510

 

原文地址:https://www.cnblogs.com/lilamisu/p/13892522.html