Skip to content

Commit b2a937f

Browse files
committed
update
1 parent b3f278a commit b2a937f

File tree

13 files changed

+9896
-207
lines changed

13 files changed

+9896
-207
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
.DS_Store
22
node_modules/
3-
# dist/
3+
dist/
44
npm-debug.log
55
yarn-error.log
66

77
# Editor directories and files
88
.idea
9+
.project
910
*.suo
1011
*.ntvs*
1112
*.njsproj

.npmignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
node_modules/
3+
# dist/
4+
npm-debug.log
5+
yarn-error.log
6+
7+
# Editor directories and files
8+
.idea
9+
.project
10+
*.suo
11+
*.ntvs*
12+
*.njsproj
13+
*.sln

README.md

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,37 @@
22

33
> A simple organization tree chart based on Vue2.x
44
5+
## Usage
6+
7+
```
8+
# use npm
9+
npm i vue2-org-tree
10+
11+
# use yarn
12+
yarn add vue2-org-tree
13+
```
14+
### Import Plugins
15+
16+
``` js
17+
import Vue from 'vue'
18+
import Vue2OrgTree from 'vue2-org-tree'
19+
20+
Vue.use(Vue2OrgTree)
21+
22+
// ...
23+
```
24+
25+
526
## API
627

728
* #### props
829

930

1031
prop | descripton | type | default
1132
---------------|------------------------------|:----------------------:|---------------------
12-
data | | `Object` |
33+
data | | `Object` |
1334
props | configure props | `Object` | `{label: 'label', children: 'children', expand: 'expand'}`
14-
labelWidth | node label width | `String` \| `Number`. | `auto`
35+
labelWidth | node label width | `String` \| `Number`. | `auto`
1536
collapsable | children node is collapsable | `Boolean` | `true`
1637
renderContent | how to render node label | `Function` | -
1738
labelClassName | node label class | `Function` \| `String` | -
@@ -20,12 +41,12 @@
2041
* ### events
2142

2243
- on-expand
23-
44+
2445
well be called when the collapse-btn clicked
25-
46+
2647

2748
- on-node-click
28-
49+
2950
well be called when the node-label clicked
3051

3152

@@ -46,19 +67,5 @@
4667

4768
> IE9+、Chrome、Firefox、Opera
4869
49-
50-
51-
## Build Setup
52-
53-
``` bash
54-
# install dependencies
55-
npm install
56-
57-
# serve with hot reload at localhost:8080
58-
npm run dev
59-
60-
# build for production with minification
61-
npm run build
62-
```
63-
64-
For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).
70+
## License
71+
[MIT](http://opensource.org/licenses/MIT)

dist/build.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

dist/build.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)