乐趣区

关于前端:elementui-eltree组件flex布局出现横向滚动条

flex 布局 el-tree 能呈现纵向滚动条,不能失常呈现横向滚动条

<div style="width: 100%; height: 100%; display:flex; flex-direction: column;">
    <i-input placeholder="输出关键字查问" v-model="filterText">
      <i slot="suffix" class="el-input__icon el-icon-search"></i>
    </i-input>
    <div style="flex:1; margin-top: 10px; overflow:auto; white-space: nowrap;">
        <el-tree
          class="filter-tree"
          :props="defaultProps"
          :show-checkbox="showCheckBox"
          :default-expand-all="defExpand === 0"
          node-key="treeId"
          :expand-on-click-node="false"
          :filter-node-method="_filterNode"
          :check-strictly="checkWay !== 1"
          @node-click="_handleNodeClick"
          @check="_nodeCheck"
          :data="treeData"
          ref="tree">
        </el-tree>
    </div>
  </div>

解决办法:

/deep/.el-tree{
  display:inline-block;
  min-width:100%;
}
退出移动版