zoukankan      html  css  js  c++  java
  • el-table表头自定义内容

     renderHeaderBig(h, { column, $index }) {
          // console.log(column.label);
          return h("div",{
            class: {
                    'text_overflowd': true,
                     
                  },
                  // style:'100px;',
          }, [
            h(
              "el-tooltip",
              {
                props: {
                  content: (function() {
                    return `${column.label}`;
                  })(),
                  placement: "right"
                }
              },[
                h("div",{
                  class: {
                    'text_overflowd': true,
                  }, 
                   style:'100px;margin:0 auto',
                }, [
                h("span", {
                  class: {
                    'text_overflowd': true,
                     
                  },
                  style:'100px;',
                  domProps: {
                    innerHTML: column.label
                  }
                }),
                // h("span", column.label),
                // h("span", {
                //   class: {
                //     "el-icon-question": true,
                //     woca: true
                //   }
                // })
              ])
              ]
             
            )
          ]);
          // return h("span", {}, [
          //   h("span", {}, "时间片段"),
          //   h(
          //     "el-popover",
          //     {
          //       props: {
          //         placement: "top-start",
          //          "200",
          //         trigger: "hover",
          //         content: "领先/落后品类=单店平均单量-该品类城市店均单量"
          //       }
          //     },
          //     [h("i", { slot: "reference", class: "el-icon-question" }, "")]
          //   )
          // ]);
          // return h(
          //     'el-tooltip',
          //     {
          //       props: {
          //         content: (function() {
          //           return `${column.label}`
          //         })(),
          //         placement: 'top'
          //       }
          //     },
          //     [ h('span', 'wocai'), h('span', {
          //         class: {
          //           'el-icon-question': true,
          //           'woca':true
          //         }
          //       })
          //     ]
          //   )
          // return h("div", [
          //   h(
          //     "el-tooltip",
          //     {
          //       props: {
          //         content: (function() {
          //           return `${column.label}`;
          //         })(),
          //         placement: "top"
          //       }
          //     },
          //     [
          //       h("span", column.label,{
          //         class: {
          //           "el-icon-question": true
          //         }
          //       })
          //     ]
          //   )
          // ]);
        },

    https://segmentfault.com/a/1190000022739301

  • 相关阅读:
    Rust-数据类型
    Rust-智能指针
    Rust-使用包、Crate和模块管理不断增长的项目
    Rust-Slice类型
    Rust-引用与借用
    Rust 的核心功能-所有权(ownership)
    How to fix “sudo: command not found error”
    ABC195 F
    CF1501D Two chandeliers【拓展欧几里得+二分】
    CCA的小球【容斥定理】
  • 原文地址:https://www.cnblogs.com/dianzan/p/12993908.html
Copyright © 2011-2022 走看看