Skip to content

Commit

Permalink
fixed bugs and upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
hukaibaihu committed Jun 6, 2020
1 parent f06c1ac commit bbaaa8c
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 11,288 deletions.
40 changes: 15 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,17 @@ Vue.use(Vue2OrgTree)

``` html
# css
<link href="https://unpkg.com/[email protected]/dist/style.css">

<!--
...
-->
<link href="https://unpkg.com/vue2-org-tree/dist/style.css">

# js
<script src="https://unpkg.com/vue@2.5.17/dist/vue.js"></script>
<script src="https://unpkg.com/vue2-org-tree@1.1.0/dist/index.js"></script>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/vue2-org-tree/dist/index.js"></script>
```


## API

* #### props

#### props

prop | descripton | type | default
------------------|-----------------------------------------|:----------------------:|:---------------------------------------------------------:
Expand All @@ -58,15 +53,15 @@ Vue.use(Vue2OrgTree)



* ### events

event name | descripton | type
------------------|-----------------------------------------|:----------------------
click | Click event | `Function`
mouseover | onMouseOver event | `Function`
mouseout | onMouseOut event | `Function`
### events

* ### Call events
event name | descripton | type
------------------|-----------------------------------------|:----------------------
click | Click event | `Function`
mouseover | onMouseOver event | `Function`
mouseout | onMouseOut event | `Function`

### Call events

#### on-expand
well be called when the collapse-btn clicked
Expand All @@ -78,13 +73,13 @@ well be called when the collapse-btn clicked
well be called when the node-label clicked

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

#### on-node-mouseover
It is called when the mouse hovers over the label.

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

#### on-node-mouseout
It is called when the mouse leaves the label.
Expand All @@ -104,14 +99,9 @@ It is called when the mouse leaves the label.

## Browser support

use table layout!
use table layout!

> IE9+、Chrome、Firefox、Opera
## License
[MIT](http://opensource.org/licenses/MIT)

## IMPORTANT
This repository is a fork to add 2 events that was needed to improve the project I needed.

Any issues found, visit the [original repository](https://github.com/hukaibaihu/vue-org-tree) and report the issues.
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<div>
<vue2-org-tree
:data="tree"
:labelWidth="90"
:labelClassName="labelClass"
:label-width="90"
:label-class-name="labelClass"
:render-content="renderContent"
@on-node-click="onNodeClick"
@on-node-mouseover="onNodeMouseOver"
Expand Down Expand Up @@ -50,10 +50,10 @@
console.log('CLICK', e);
},
onNodeMouseOver(e, data) {
alert('MOUSE OVER - ')
console.log('MOUSE OVER', e);
},
onNodeMouseOut(e, data) {
console.log('MOUSEOUT', e);
console.log('MOUSE OUT', e);
}
}
})
Expand Down
Loading

0 comments on commit bbaaa8c

Please sign in to comment.