we-tree-vue
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

WeTree

WeTree 组件

install

npm install WeTree ​

use

​``` // main.js import wetree from 'WeTree'

Vue.use(wetree) ​ // app.vue

{{ node.label }}
</WeTree>
<script> import WeTree from 'vue-we-tree' export default { name: 'we-tree', components: { WeTree }, data() { return { nodes: [], rootNodes: [ { id: 0, pid: -1, name: '我是根节点0', size: 40, avatar: '../static/icon_avatar_admin.png' }, { id: 1, pid: -1, name: '我是根节点1', size: 40, avatar: '../static/icon_avatar_admin.png' } ], props: { children: 'children', label: 'name', isLeaf: 'leaf', size: 'size', icon: 'avatar', pid: 'pid' } } }, mounted() { this.nodes = this.rootNodes } } ​```

Readme

Keywords

Package Sidebar

Install

npm i we-tree-vue

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

140 kB

Total Files

3

Last publish

Collaborators

  • pongtang