Skip to content

Commit

Permalink
upgrade to 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hukaibaihu committed Jul 8, 2019
1 parent c978fcd commit 29535ff
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry=https://registry.npmjs.org/

36 changes: 26 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,32 @@ Vue.use(Vue2OrgTree)
* #### props


prop | descripton | type | default
---------------|------------------------------|:----------------------:|---------------------
data | | `Object` |
props | configure props | `Object` | `{label: 'label', children: 'children', expand: 'expand'}`
labelWidth | node label width | `String` \| `Number`. | `auto`
collapsable | children node is collapsable | `Boolean` | `true`
renderContent | how to render node label | `Function` | -
labelClassName | node label class | `Function` \| `String` | -
prop | descripton | type | default
------------------|--------------------------------|:----------------------:|---------------------
data | | `Object` |
props | configure props | `Object` | `{label: 'label', children: 'children', expand: 'expand'}`
labelWidth | node label width | `String` \| `Number`. | `auto`
collapsable | children node is collapsable | `Boolean` | `true`
renderContent | how to render node label | `Function` | -
labelClassName | node label class | `Function` \| `String` | -
selectedKey | The key of the selected node | `String` | -
selectedClassName | The className of the selected node | `Function` \| `String` | -


* ### events

- on-expand
- on-expand `callback function`

- params `e` `Event`
- params `data` `Current node data`

well be called when the collapse-btn clicked


- on-node-click
- on-node-click `callback function`

- params `e` `Event`
- params `data` `Current node data`

well be called when the node-label clicked

Expand All @@ -86,6 +94,14 @@ Vue.use(Vue2OrgTree)
## Change log

- 1.2.0

* Add props: `selectedClassName`, `selectedKey`

- 1.1.1

* Fixed bug [#11](https://github.com/hukaibaihu/vue-org-tree/issues/9)

- 1.1.0

* Extract CSS
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue2-org-tree",
"description": "A simple organization tree chart based on Vue2.x",
"version": "1.1.1",
"version": "1.2.0",
"main": "dist/index.js",
"module": "src/main.js",
"author": "steven <[email protected]>",
Expand Down

0 comments on commit 29535ff

Please sign in to comment.