Element: 如何给table头部加 tooltip

Created on 10 Mar 2017  ·  6Comments  ·  Source: ElemeFE/element

image

比如在上面的 地址 那里添加一个tooltip,鼠标划过去显示,看了文档,有个 renderHeader 函数,但是怎么组合 tooltip 上去呢

Most helpful comment

https://gist.github.com/f22ca194b0ed22425ac85f7a2f0778d8

参考这里,我写了个renderheader,你可以去文档里把tooltip元素在这里createElement试一下。

详细文档参考这里https://cn.vuejs.org/v2/guide/render-function.html#createElement-参数

All 6 comments

https://gist.github.com/f22ca194b0ed22425ac85f7a2f0778d8

参考这里,我写了个renderheader,你可以去文档里把tooltip元素在这里createElement试一下。

详细文档参考这里https://cn.vuejs.org/v2/guide/render-function.html#createElement-参数

Good job

@FlappyHeart 你的这个地址打不开 https://gist.github.com/f22ca194b0ed22425ac85f7a2f0778d8
可以重新给个demo么

哦,gist被墙了吧。我贴关键的过来

renderHeader(createElement, { column }) {
            return createElement(
              'el-button', {attrs: {size: 'mini', type: 'primary', icon: 'plus'}, on: {
                  click: this.showForm
              }}
            );
        }

@FlappyHeart 谢谢

这个自己写的table头部加popover的例子(使用了vue-data-tables插件),地址:https://github.com/cag2050/vue_tables_xlsx_demo/blob/master/src/views/useDataTablesComp.vue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chao-hua picture chao-hua  ·  3Comments

yuchonghua picture yuchonghua  ·  3Comments

sudo-suhas picture sudo-suhas  ·  3Comments

yorululu picture yorululu  ·  3Comments

fscardua picture fscardua  ·  3Comments