Skip to content

给vue-easy-tree设置height开启虚拟滚动之后,tree的item不能自适应宽度的,不设置高度,使用el-tree是可以自适应宽度的 #54

@itheimazzy

Description

@itheimazzy
 <vue-easy-tree :data="data"
                   height="200px"
                   :default-expand-all="false"
                   :show-checkbox='showCheckBox'
                   @check-change="handleCheckChange"
                   :expand-on-click-node="!parentselect"
                   :default-expanded-keys="defaultExpandedKeys"
                   :filter-node-method="filterNode"
                   :render-after-expand="true"
                   :node-key="treeProps.value"
                   :props="treeProps"
                   :style="`min-width: ${treeWidth}`"
                   @node-click="onClickNode"
                   class="select-tree"
                   highlight-current
                   ref="tree">
      <span slot-scope="{ node, data }">
        <span ref="label" v-html="getHighlightHtmlStrByString(node.label)"></span>
      </span>
    </vue-easy-tree>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions