ATK4 如何使用树形视图
如何使用树视图例如作为侧边栏?
How to use treeview e. g. as sidebar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
如何使用树视图例如作为侧边栏?
How to use treeview e. g. as sidebar?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
没有标准元素。您可以构建自己的视图。查看其他项目的一些实现或使用 jsTree
There are no standard element. You can build your own View. Look in other projects for some implementation or use jsTree
似乎有一个附加组件正是您在网站上列出的所需内容。
至少根据描述看起来是这样。
它正在开发和附加组件中。
我正在考虑自己尝试该框架,所以我不知道这是否适合您。
It seems there is an add on that is exactly for what you are looking for listed on the website.
At least it seems that way according to the description.
Its located under development and add-ons.
I'm thinking about trying the framework myself so I have no idea if this will work for you or not.
我注意到有一个文件 atk4/lib/TreeView.php 扩展了 Lister
它似乎有点旧,因为它硬编码了 + 和 - 的图标图像路径作为 amodules3/templates/kt2/ ,在 Agiletoolkit 4.1.1 中是/atk4/templates/shared/images 但也许您可以尝试将其添加到页面中并查看它的作用。
从顶部的注释来看,看起来它需要一个 mysql 表,其中有一个名为 ID 的主键,以及同一个表中名为 Parent_id 的另一列,该列将提供值,并且可能为了显示文本字符串,可能需要另一个名为 name 的列与 refModel 的工作方式相同。
如果您决定尝试让它工作,也许您可以将其发布回 Romans 以在 ATK4.1 中更新
I noted there is a file atk4/lib/TreeView.php which extends Lister
It appears to be a bit old as it has hardcoded paths to the icon images for + and - as amodules3/templates/kt2/ which in agiletoolkit 4.1.1 is /atk4/templates/shared/images but maybe you can try adding this to a page and see what it does.
From the comments at the top, looks like it needed a mysql table with a primary key called ID and another column in the same table called parent_id which would provide the values and probably in order to display text strings would probably need another column called name in the same way refModel works.
If you decide to try and get it working, maybe you can post it back to Romans to update in ATK4.1
请检查最新的 ATK4 插件来源:
* https://github.com/atk4/atk4-addons
* * 插件“层次结构”
** 插件“树”
Please check newest ATK4 addons source:
* https://github.com/atk4/atk4-addons
* * addon "hierarchy"
* * addon "tree"