요소 ui table header에 tooltipe 추가

3485 단어

1.render-header


<br> export default {<br>   methods: {<br>     // render <br>     renderHeader (h,{column}) {<br>     return h(<br>         'div',[ <br>              h('span', column.label),<br>              h('el-tooltip',{<br>           props:{<br>         effect:'dark',<br>         content:' ',<br>         placement:'top'<br>       },    <br>      },[<br>                  h('i', {<br>                      class:'el-icon-question',<br>                      style:'color:#409eff;margin-left:5px;'<br>                  })<br>             ],{<br>                 content: ' '<br>             })<br>         ]<br>     );<br> }<br><br>   },<br>   data() {<br>     return {<br>       tableData2: [{<br>         date: '2016-05-02',<br>         name: ' ',<br>         address: ' 1518 ',<br>       }, {<br>         date: '2016-05-04',<br>         name: ' ',<br>         address: ' 1518 '<br>       }, {<br>         date: '2016-05-01',<br>         name: ' ',<br>         address: ' 1518 ',<br>       }, {<br>         date: '2016-05-03',<br>         name: ' ',<br>         address: ' 1518 '<br>       }]<br>     }<br>   }<br> }<br>
renderHeader (h,{column}) {
    return h(
        'div',[
             h('span', column.label),
             h('el-tooltip',{
          props:{
        effect:'dark',
        content:' ',
        placement:'top'
      },   
     },[
                 h('i', {
                     class:'el-icon-question',
                     style:'color:#409eff;margin-left:5px;'
                 })
            ],{
                content: ' '
            })
        ]
    );
}  

 
https://www.cnblogs.com/jmwlhj/p/11004378.html

2.scope solit


  

https://blog.csdn.net/pinbolei/article/details/89883175

좋은 웹페이지 즐겨찾기