其他分享
首页 > 其他分享> > :show-overflow-tooltip="true" 当文字超过3000时,鼠标移上去,闪屏

:show-overflow-tooltip="true" 当文字超过3000时,鼠标移上去,闪屏

作者:互联网

1:代码

        <el-table-column label="错误词" prop="errorWord" align="center">
          <template slot-scope="scope">
            <span v-if="scope.row.errorWord && scope.row.errorWord.length > 10">
              <el-popover
                placement="top-start"
                title=""
                width="800"
                trigger="hover"
                popper-class="workorder-problem-desc"
              >
                <div>{{ scope.row.errorWord }}</div>
                <span slot="reference">
                  {{ scope.row.errorWord.substr(0, 10) + "..." }}
                </span>
              </el-popover>
            </span>
            <span v-else>{{ scope.row.errorWord }}</span>
          </template>
        </el-table-column>

2:样式

.workorder-problem-desc {
  background-color: #303133;
  color: #fff;
  border-color: #303133;
}

 

3:展示

 

标签:10,show,color,移上去,303133,tooltip,errorWord,scope,row
来源: https://www.cnblogs.com/guohanting/p/16650805.html