当前位置:网站首页>树行表达方式
树行表达方式
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
});
树行表达图基本就是介绍这两种了,其实还有很多我就不一一介绍其他的方法方式了,只要记住都是换汤不换药的这种模式,认真去探求,一定是没有任何问题的! 加油,少年!
边栏推荐
- WFST decoding process
- Two methods to judge the size end
- [C language] comprehensively analyze the pointer and sort out the pointer knowledge points
- [experiment sharing] CCIE BGP reflector experiment
- [C language] Fibonacci sequence [recursion and iteration]
- JS preventdefault() keyboard input limit onmousewheel stoppropagation stop event propagation
- 9. Pointer of C language (2) wild pointer, what is wild pointer, and the disadvantages of wild pointer
- Raspberry pie 4B ffmpeg RTMP streaming
- 6. Functions of C language, why functions are needed, how functions are defined, and the classification of functions
- Kubeedge releases white paper on cloud native edge computing threat model and security protection technology
猜你喜欢
C language - data storage
C语言简单实例 1
[C language] comprehensively analyze the pointer and sort out the pointer knowledge points
Array out of bounds
[C language] advanced pointer exercise 1
83.(cesium之家)cesium示例如何运行
JS batch add event listening onclick this event delegate target currenttarget onmouseenter OnMouseOver
软考中级(系统集成项目管理工程师)高频考点
Circular linked list OJ question
Store and guarantee rancher data based on Minio objects
随机推荐
Data system of saltstack
Practice of real-time push demo of three web messages: long polling, iframe and SSE
MySQL command statement (personal summary)
Solve flask integration_ Error reporting in restplus
Solve the kangaroo crossing problem (DP)
C language implementation of strncpy
C language function
CDGA|工业互联网行业怎么做好数据治理?
Wust-ctf2021-re school match WP
Implementation of strcat in C language
83. (cesium home) how the cesium example works
Deploy ZABBIX automatically with saltstack
2. Floating point number, the difference between float and double in C language and how to choose them
Handan, Hebei: expand grassroots employment space and help college graduates obtain employment
Stories of Party members | Li qingai uses cartoons to drive farmers to increase income and become rich
WPF -- implement websocket server
基于 MinIO 对象存储保障 Rancher 数据
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] shutdown game [loop and switch statement]
Store and guarantee rancher data based on Minio objects