dabeng / vue-orgchart

It's a simple and direct organization chart plugin. Anytime you want a tree-like chart, you can turn to OrgChart.
MIT License
289 stars 89 forks source link

Adding basic props #4

Open king1k opened 5 years ago

king1k commented 5 years ago

Hello @dabeng, I though of using this project in another project I need to create for my University (it must be in Vue so I can't use your other projects). Problem is, that I need to implement it until the end of January and I saw that the only available prop is "datasource". I will be really glad to use the basic props that the JQuery project has (like createNode, direction and pan). Are you planning to release those features on the next 1-2 weeks? it would really help me out because there is no good Vue projects which handles with tree charts.

Best regards, Tom

dabeng commented 5 years ago

Thank you so much for your planning to use vue-orgchart in your new project. I'll expose more options in the Spring Festival. 😊

verilog15 commented 5 years ago

@dabeng If I'm not mistaken, the Spring Festival will occur in two days (Happy holidays!) so I guess you already have in mind which options are going to be available. Can you specify them? It would be great to know if you are going to implement all of the options that I need (which the JQuery project has), So I can decide if I can use the Vue version or I'll have to go with the JQuery version. Anyway, if you can say the names before the Spring Festival, it will be great.

dabeng commented 5 years ago

Hi @verilog15,generally, Chinese New Year vocation is half of month . During that time, I'll expose equivalent options on new vuejs version of orgchart Asap😊

verilog15 commented 5 years ago

@dabeng Thanks for the reply! Can you specify when? I gonna have two following two weeks time to add it to our project so I wondering if it will occur on those dates

dabeng commented 5 years ago

Hi @king1k I have to say sorry. For various reasons, I only spared two days to update vue-orgchart during my Chinese New Year holiday. For now, there is the following available attributes and slot and you can find some new Demos on codesandbox.io.

Attributes

NameTypeRequiredDefaultDescription
datasourcejsonyesdatasource usded to build out structure of orgchart. It could be a json object.
panbooleannofalseUsers could pan the orgchart by mouse drag&drop if they enable this attribute.
zoombooleannofalseUsers could zoomin/zoomout the orgchart by mouse wheel if they enable this attribute.
zoomin-limitnumberno7Users are allowed to set a zoom-in limit.
zoomout-limitnumberno0.5Users are allowed to set a zoom-out limit.

Scoped Slots

<template slot-scope="{ nodeData }">
  <!-- feel free to customize the internal structure of node -->
</template>