Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
hukaibaihu committed Sep 6, 2018
1 parent b3f278a commit b2a937f
Show file tree
Hide file tree
Showing 13 changed files with 9,896 additions and 207 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
.DS_Store
node_modules/
# dist/
dist/
npm-debug.log
yarn-error.log

# Editor directories and files
.idea
.project
*.suo
*.ntvs*
*.njsproj
Expand Down
13 changes: 13 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules/
# dist/
npm-debug.log
yarn-error.log

# Editor directories and files
.idea
.project
*.suo
*.ntvs*
*.njsproj
*.sln
49 changes: 28 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,37 @@

> A simple organization tree chart based on Vue2.x
## Usage

```
# use npm
npm i vue2-org-tree
# use yarn
yarn add vue2-org-tree
```
### Import Plugins

``` js
import Vue from 'vue'
import Vue2OrgTree from 'vue2-org-tree'

Vue.use(Vue2OrgTree)

// ...
```


## API

* #### props


prop | descripton | type | default
---------------|------------------------------|:----------------------:|---------------------
data | | `Object` |
data | | `Object` |
props | configure props | `Object` | `{label: 'label', children: 'children', expand: 'expand'}`
labelWidth | node label width | `String` \| `Number`. | `auto`
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` | -
Expand All @@ -20,12 +41,12 @@
* ### events

- on-expand

well be called when the collapse-btn clicked


- on-node-click

well be called when the node-label clicked


Expand All @@ -46,19 +67,5 @@

> IE9+、Chrome、Firefox、Opera


## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build
```

For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).
## License
[MIT](http://opensource.org/licenses/MIT)
7 changes: 0 additions & 7 deletions dist/build.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/build.js.map

This file was deleted.

Loading

0 comments on commit b2a937f

Please sign in to comment.