hukaibaihu / vue-org-tree Goto Github PK
View Code? Open in Web Editor NEWA simple organization tree based on Vue2.x
Home Page: https://hukaibaihu.github.io/vue-org-tree/
License: MIT License
A simple organization tree based on Vue2.x
Home Page: https://hukaibaihu.github.io/vue-org-tree/
License: MIT License
on-expand方法在
<Vue2OrgTree
:data="list"
:horizontal="horizontal"
:collapsable="collapsable"
@on-expand="onExpand"
@on-node-click="handleClick"
/>
中失效,只对on-node-click方法有响应
使用浏览器 chrome浏览器 版本 76.0.3809.100(正式版本) (64 位)
vue版本 2.9.6
横向时组件宽度不会撑开,超过宽度就会换行掉下来。只能把父节点的宽度写死。
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Loading PostCSS Plugin failed: Cannot find module 'autoprefixer'
当某一层展开的节点很多时,超过屏幕宽度会出现折叠,能否设置成超过屏幕宽度后不换行,出现横向滚动条?
ERROR in ./src/components/org-tree/org-tree.vue
Module not found: Error: Can't resolve 'vue' in '/Users/y1/Desktop/vue-org-tree-master 2/src/components/org-tree'
@ ./src/components/org-tree/org-tree.vue 33:17-31
@ ./src/components/org-tree/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:9000 webpack/hot/dev-server ./src/main.js
你好,我目前需求是前面显示头像后面显示昵称,可以告诉一下图片如何增加吗,谢谢
如何才能支持在UNIAPP里面调用,简单的把div换成view不行啊,感谢!
This relative module was not found:
收缩按钮和节点本身都触发点击事件 怎么避免点击收缩按钮的时候 不打印出对象
onClick(e, data){
console.log('展开对象')
console.log(data)
}
RT
感谢大神提供的组件,最近项目有组织架构的需求正好用到。在组件渲染后我发现控制台打印了一系列 listener,查看了源码发现在 node.js 的 render 函数里有一个 console.log。大神有时间可否考虑去掉这个日志?版本 1.3.1。
Is it possible to use Vue components for nodes representing instead of div
?
And handle events (click, ...) in these components. It will allow easily customize nodes.
Also it could be useful to use components for expand buttons.
下载了不知道如何使用
Can i use html in label of data?
通过组件的v1.2.0版本
<script src="https://unpkg.com/[email protected]/dist/index.js"></script>
无法引用组件库,但是v1.1.0和v1.1.1可以。
访问结果如图:
为什么调用expand方法会同时调用click事件
Is it possible to add an image beside or under the label? If possible, could you give me a simple example how?
Do you plan on making it responsive? I just added a couple of data and it seems that the lines of the tree breaks. Do you have any work arounds for a larger data?
I'm not an expert in Vue yet so I opted to ask. I am thinking of using this instead of Treant.js for our Family Tree chart because of its simplicity and compatibility with Vue.
Great project btw!
引入组件之后,项目在ie11上不能正常显示了
[Vue warn]: Failed to mount component: template or render function not defined.
load plugin - Vue.component('org-tree-node',Vue2OrgTree)
Good job on the tree chart @hukaibaihu!
Any chance of adding a pan and zoom feature to it as well? Would be nice when dealing with larger trees where you need zoom out in order for it to fit on the screen.
您好! 如标题,请问 子节点可以自动展开吗
Hey,
I'm trying to use this library via Unpkg and while registering the component I got an error:
Uncaught ReferenceError: Vue2OrgTree is not defined
Here's the codepen:
https://codepen.io/anon/pen/vzbdwX
插件的样式不见了,按操作流程是没样式的要把样式直接引入才行,我用的生产环境都炸了,赶紧查查改一版吧,让我更新一把
准备在项目中用
引入后无法点击展开或者收起
Hey,
I request you to publish this library to NPM in order to support easy installation.
And Publishing to NPM will also allow browser usage for the module using
<script type="text/javascript">
Vue.use(VueOrgTree);
</script>
Please let me know if you decide to do it.
是不是更新出问题了,昨天下午还好好的!最新版本1.2.0
当data 每项不包含 expand 字段时,expandAll 会不起效,建议组件初始化时,如果配置了该字段,做一次数据遍历
renderContent方法的返回中如何添加换行呢
父节点 label 较长时,子节点不能准确定位在展开按钮下,会错位
Hello, friend
I use this components to *.vue with frameword vue-element-admin, but style.css does not loaded,
how can do this?
waiting for your reply
thanks.
可以添加删除节点吗
也就是说org-tree-node-children是右节点,org-tree-node-label里面我也想插入节点
希望能够在org-tree-node-btn上去除这些事件。因为在org-tree-node-label做悬浮添加元素的时候会出现悬浮元素闪烁的bug。
vue项目启动后发现,组件有效但是样式丢失,build后才能生效,请问这是为什么?
RT
配置如下:
treeData: {
ID: 123,
Label: a,
Children: []
},
props: {
label: "Label",
expand: "expand",
children: "Children"
}
组件不报错,但就是无法渲染,节点无文案,点击节点却能返回节点数据
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.