wjbk

导航

提示文字被遮盖

一、在对应属性上加transfer搞定
<Tooltip :transfer="true" :content="tooltipContent">示例</Tooltip>



二、
render: (h, params) => {
            let texts = ''//表格列显示文字
            if (params.row.content !== null) {
              if (params.row.content.length > 6) { //进行截取列显示字数
                texts = params.row.content.substring(0, 6) + ".....";
              else {
                texts = params.row.content;
              }
            }
            return h('div', [
              h('Tooltip', {
                props: {
                  placement: 'bottom',
                  // transfer: true  //是否将弹层放置于 body 内
                },
                style: {
                  cursor: 'pointer',
                }
              }, [ //这个中括号表示是Tooltip标签的子标签
                texts, //表格列显示文字
                h('div', {
                    slot: 'content',
                    style: {
                      whiteSpace: 'normal'
                    }
                  }, params.row.content //整个的信息即气泡内文字
                )
              ])
            ]);
          }

 

render: (h, params) => {
            let texts = ''//表格列显示文字
            if (params.row.content !== null) {
              if (params.row.content.length > 6) { //进行截取列显示字数
                texts = params.row.content.substring(0, 6) + ".....";
              else {
                texts = params.row.content;
              }
            }
            return h('div', [
              h('Tooltip', {
                props: {
                  placement: 'bottom',
                  // transfer: true  //是否将弹层放置于 body 内
                },
                style: {
                  cursor: 'pointer',
                }
              }, [ //这个中括号表示是Tooltip标签的子标签
                texts, //表格列显示文字
                h('div', {
                    slot: 'content',
                    style: {
                      whiteSpace: 'normal'
                    }
                  }, params.row.content //整个的信息即气泡内文字
                )
              ])
            ]);
          }

posted on 2023-03-28 10:43  wjbk  阅读(54)  评论(0)    收藏  举报