当前位置:网站首页>树行表达方式
树行表达方式
2022-07-28 18:15:00 【加油,少年!】
树形图的结构大家不言而喻 ,非常的好用以及实用的完美性相结合,所以现在我给大家简洁的介绍一下树行的用法以及结构性!!
1.常规用法

这是树行结构的一个表视图 主要表达省份 市 以及区,这样做的目的呢,就是更加鲜明的表达出结构的用意 用来凸显实用化 简洁化 完美化 的这一部分。
<div id="test12" class="demo-tree-more"></div>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
<legend>常规用法</legend>
</fieldset> ,data1 = [{
title: '江西'
,id: 1
,children: [{
title: '南昌'
,id: 1000
,children: [{
title: '青山湖区'
,id: 10001
},{
title: '高新区'
,id: 10002
}]
},{
title: '九江'
,id: 1001
},{
title: '赣州'
,id: 1002
}]
},{
title: '广西'
,id: 2
,children: [{
title: '南宁'
,id: 2000
},{
title: '桂林'
,id: 2001
}]
},{
title: '陕西'
,id: 3
,children: [{
title: '西安'
,id: 3000
},{
title: '延安'
,id: 3001
}]
}]这些呢,就是表明树行结构的代码,主用data 来表示其中的用意,title表示的就是省份 当然 在里面也可以包含chidren 再次声明一个title来表明其中的一个市级城市 也可以一直套用chidren 来套用这个,可以无线连接下去,表明其中的实用关系。
2.手风琴模式
此图也是树行结构的图形 但是使用方法与前一种是完全不相同的结构 ,但是大致的意思是完全的相同,所以说二者选一的抉择,所谓换汤不换药的这种方式去表达同一种意思!
<div id="test2" class="demo-tree"></div>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
<legend>手风琴模式</legend>
</fieldset>tree.render({
elem: '#test4'
,data: [{
title: '优秀'
,children: [{
title: '80 ~ 90'
},{
title: '90 ~ 100'
}]
},{
title: '良好'
,children: [{
title: '70 ~ 80'
},{
title: '60 ~ 70'
}]
},{
title: '要努力奥'
,children: [{
title: '0 ~ 60'
}]
}]
,accordion: true
});树行表达图基本就是介绍这两种了,其实还有很多我就不一一介绍其他的方法方式了,只要记住都是换汤不换药的这种模式,认真去探求,一定是没有任何问题的! 加油,少年!
边栏推荐
- Solve the cookie splitting problem (DP)
- The results of the second quarter online moving people selection of "China Internet · moving 2022" were announced
- How to use pycharm to quickly create a flask project
- [C language] advanced pointer exercise 1
- 83.(cesium之家)cesium示例如何运行
- [C language] guessing numbers game [function]
- [C language] 5000 word super detailed explanation of various operations of the sequence table
- mmo及时战斗游戏中的场景线程分配
- WPF -- implement websocket server
- Deploy LNMP automatically with saltstack
猜你喜欢

9. Pointer of C language (3) classic program, exchange the value of two numbers for deep analysis, (easy to understand), are formal parameters and arguments a variable?

C language pointer and two-dimensional array

Solve the cookie splitting problem (DP)

Stories of Party members | Li qingai uses cartoons to drive farmers to increase income and become rich

A chip company fell in round B

The privatized instant messaging platform protects the security of enterprise mobile business

JS preventdefault() keyboard input limit onmousewheel stoppropagation stop event propagation
![[C language] Fibonacci sequence [recursion and iteration]](/img/02/6cff776db583f1b149686e15649d41.png)
[C language] Fibonacci sequence [recursion and iteration]

CDGA|工业互联网行业怎么做好数据治理?

Handan, Hebei: expand grassroots employment space and help college graduates obtain employment
随机推荐
Durham High Lord (classic DP)
Longest Palindromic Substring
[C language] step jumping problem [recursion]
The cloud native programming challenge is hot, with 510000 bonus waiting for you to challenge!
[C language] advanced pointer exercise 1
English translation Arabic - batch English translation Arabic tools free of charge
Introduction to seven kinds of polling (practice link attached)
3、 Are formal and actual parameters in a programming language variables?
Advanced notes (Part 2)
9. Pointer of C language (2) wild pointer, what is wild pointer, and the disadvantages of wild pointer
Use of strtok and strError
Implementation of strcat in C language
XOR operation and its usage
Array method added in ES6
MySQL command statement (personal summary)
Usage of const and assert
C语言数据 3(2)
通配符 SSL/TLS 证书
How can Plato obtain premium income through elephant swap in a bear market?
JVM(二十四) -- 性能监控与调优(五) -- 分析GC日志