当前位置:网站首页>[ruoyi] ztree custom icon (iconskin attribute)
[ruoyi] ztree custom icon (iconskin attribute)
2022-07-06 02:46:00 【sayyy】
Preface
- ruoyi 4.6.0
- JQuery zTree core 3.5.12
establish iconSkin
.ztree li span.button.ico2_ico_open{
margin-right:2px; background-position: -147px -21px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico2_ico_close{
margin-right:2px; margin-right:2px; background-position: -147px 0; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico2_ico_docu{
margin-right:2px; background-position: -147px 0; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico2_ico_open: Style of branch node expansion status.ztree li span.button.ico2_ico_close: The style of the folded state of the branch node.ztree li span.button.ico2_ico_docu: The style of leaf nodes.ztree li span.button.<iconSkin name >_ico_open:<iconSkin name >CustomizableiconSkin ico2:.ztree li span.button.ico2_ico_docuThe icon of is set to be the same as.ztree li span.button.ico2_ico_closeThe icons of are consistent
Use iconSkin The way 1:
var setting = ...;
//js Middle node data :
var zTreeNodes = [
// The parent node expands Use the same icon when folding
{
name:" Parent node 1", iconSkin:"diy01"},
// The parent node expands Use different icons when folding
{
name:" Parent node 2", iconSkin:"diy02"},
// Personalized icon of leaf node
{
name:" Leaf node ", iconSkin:"diy03"}
];
//zTree initialization
$.fn.zTree.init($("#tree"), setting, zTreeNodes);
Use iconSkin The way 2:
var treeObj = $.fn.zTree.getZTreeObj("tree");
var treeNodes = treeObj.transformToArray(treeObj.getNodes());
treeNodes.forEach(treeNode => {
if (!treeNode.isParent) {
/* Set the leaf node's iconSkin Set to :ico2 */
treeNode.iconSkin = "ico2";
treeObj.updateNode(treeNode);
}
});
Reference resources
https://treejs.cn/v3/api.php
边栏推荐
- 张丽俊:穿透不确定性要靠四个“不变”
- 550 permission denied occurs when FTP uploads files, which is not a user permission problem
- inherited constructors
- How does yyds dry inventory deal with repeated messages in the consumption process?
- Redis installation
- Pure QT version of Chinese chess: realize two-man, man-machine and network games
- "Hands on learning in depth" Chapter 2 - preparatory knowledge_ 2.5 automatic differentiation_ Learning thinking and exercise answers
- 有沒有sqlcdc監控多張錶 再關聯後 sink到另外一張錶的案例啊?全部在 mysql中操作
- Large scale DDoS attacks take Myanmar offline
- PMP每日一练 | 考试不迷路-7.5
猜你喜欢
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 8](/img/16/33f5623625ba817e6e022b5cb7ff5d.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 8

MySQL winter vacation self-study 2022 11 (9)
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 16](/img/c3/f3746b161012acc3751b2bd0b8f663.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 16

Fault analysis | analysis of an example of MySQL running out of host memory

Ue4- how to make a simple TPS role (II) - realize the basic movement of the role
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 6](/img/38/51797fcdb57159b48d0e0a72eeb580.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 6

Sword finger offer 30 Stack containing min function

Solution: attributeerror: 'STR' object has no attribute 'decode‘

Déduisez la question d'aujourd'hui - 729. Mon emploi du temps I

A copy can also produce flowers
随机推荐
After changing the GCC version, make[1] appears in the compilation: cc: command not found
技术分享 | undo 太大了怎么办
MySQL winter vacation self-study 2022 11 (9)
High number_ Vector algebra_ Unit vector_ Angle between vector and coordinate axis
How to check the lock information in gbase 8C database?
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 17
CSP date calculation
2.12 simulation
如何精准识别主数据?
07 单件(Singleton)模式
Microservice registration and discovery
高数_向量代数_单位向量_向量与坐标轴的夹角
Déduisez la question d'aujourd'hui - 729. Mon emploi du temps I
解决:AttributeError: ‘str‘ object has no attribute ‘decode‘
C语言sizeof和strlen的区别
[Yu Yue education] basic reference materials of digital electronic technology of Xi'an University of Technology
Day 50 - install vsftpd on ceontos6.8
Network Security Learning - Web vulnerabilities (Part 1)
[Digital IC manual tearing code] Verilog asynchronous reset synchronous release | topic | principle | design | simulation
在GBase 8c数据库中使用自带工具检查健康状态时,需要注意什么?