动态设置浮窗宽度

发布时间 2023-11-15 14:49:24作者: 打个大大西瓜

但这个样式是全局的,所以动态也根据自己设置的 用 el-tooltip 标签 配合超出点点点样式
:show-overflow-tooltip="true" 给个宽度超出会有点点点

 <el-table-column width="" prop="initRemark" label="xxxxxx">
        <template slot-scope="scope">
          <el-tooltip class="item" effect="light" placement="top">
            <div slot="content" style="max-width: 800px;">{{ scope.row.Remark }}</div>
            <div class="oneLine">{{ scope.row.Remark }}</div>
          </el-tooltip>
        </template>
      </el-table-column>
//超出点点点
.oneLine {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}