@kxxxl-front-end/vue-tree
TypeScript icon, indicating that this package has built-in type declarations

3.2.4 • Public • Published

基于 fork 做了以下

优化

  • 支持node使用slot
  • 本地npm link开发直接使用源码,之前使用vue-cli不支持,vite没问题
  • 使用具体props传递给node,防止dom上出现大量attr属性与方法定义

bugfix

  • 解决 vue2.7 报错
  • 展开时scroll位置变化导致指向的节点发生了偏移
  • typescript类型支持(vue 2.7.16)

开发

# 当前目录
pnpm link --global

# 依赖目录
pnpm link --global @kxxxl-front-end/vue-tree

功能说明

node slot

<VTree
  :filterMethod="filterTree"
  :expandOnFilter="false"
  :load="createExpand"
  :nodeClassName="getNodeClass"
  :nodeMinHeight="height"
>
  <template #node="{ node }">
    <CNode :node="node" />
  </template>
</VTree>

typescript类型

import { VTree } from '@kxxxl-front-end/vue-tree'

const vtree: InstanceType<typeof VTree>
vtree.setData // 可以跳转和联想

Package Sidebar

Install

npm i @kxxxl-front-end/vue-tree

Weekly Downloads

0

Version

3.2.4

License

MIT

Unpacked Size

442 kB

Total Files

42

Last publish

Collaborators

  • defghy
  • yushuangc
  • ziruiwang
  • kxxxl-front-end-component-library