-
html页面怎么做循环列表_超好用的Excel下拉列表怎么做?看这一篇就够了
2020-12-24 18:54:29收集上来的各部门工作进度表,里面的答案...这样的下拉列表怎么做?下拉列表是什么?简单来说,下拉列表就是创建这样子的下拉箭头。在重复性数据登记的时候,我们可以用下拉列表进行勾选,减少重复性输入。比如我们...私信回复关键词【插件】,获取Excel高手都在用的“插件合集+插件使用小技巧”!
收集上来的各部门工作进度表,里面的答案五花八门。
即使在表头上进行提示规范,手动输入也十分低效。
有没有什么办法能够规范、高效地进行输入呢?
有!
答案就是——下拉列表!
这样的下拉列表怎么做?
下拉列表是什么?
简单来说,下拉列表就是创建这样子的下拉箭头。
在重复性数据登记的时候,我们可以用下拉列表进行勾选,减少重复性输入。
比如我们在做考勤的时候,一般分为:
正常、请假、旷工、外勤四种情况。
如果一个人一个人去输入效率会非常低;
而如果我们做了一个下拉列表,直接在这四种情况中勾选就可以了~
02
下拉列表怎么做?
下拉列表也分一级、二级、多级等等,我们要根据实际工作内容进行选择。
事不宜迟,我们赶紧来看看吧~
♦ 一级下拉列表 ♦
方法一:【Alt + ↓】
先给大家介绍一个超快做法:【Alt + ↓】
但这种方法只能局限于同列中已经输入过的内容,适合选项较少的内容输入。
比如上图性别或者简单的对错判断。
如果选项比较多的话会变得十分麻烦。
方法二:数据有效性
这是我们工作中最常用的方法,操作起来也十分便捷。
我们拿视频中的第一大类来举例子~
❶ 我们选中「类别」这一列,点击【数据】选项卡 —【数据验证】(部分版本也称【数据有效性】)。
❷ 勾选「允许」一栏中的【序列】,「来源」一栏选中「大类」这一列的三个选项。
❸ 确定,下拉列表就做好了!我们可以直接在单元格中进行选择。
ok,今天的分享就到这里了!
私信回复关键词【插件】,获取Excel高手都在用的“插件合集+插件使用小技巧”!
-
unique函数_多级下拉列表怎么做?会用这2个函数就行了
2020-12-11 04:42:23老师,请问这个多级下拉列表怎么做?要明白这个效果怎么做,你必须清楚下面这几点,这是 Excel 必备的基础。第一,如何制作下拉列表?下拉列表的本质是什么?第二,如何给每个单元格制作对应的下拉选项?注意看,当...私信回复关键词【福利】,获取丰富办公资源,助你高效办公早下班!
老师,请问这个多级下拉列表怎么做?
要明白这个效果怎么做,你必须清楚下面这几点,这是 Excel 必备的基础。
第一,如何制作下拉列表?下拉列表的本质是什么?
第二,如何给每个单元格制作对应的下拉选项?
注意看,当「产品线」变化时,H 列的「大类」选项是动态变化的。
类似的,选择「大类」的时候,I 列的「中类」也是随之更新的。
因为单元格数据是根据条件更新的,所以对应创建的下拉列表,也是动态变化的。
所以,我们需要做的,就是给每一个单元格,设置一个对应的动态下拉选项。
接下来是具体的解决方法。
01
解决方法
这个效果使用之前讲过的 FILTER 和 UNIQUE 函数可以轻松实现。
先准备好对应类别的明细。
我们挨个看一下每个类别下拉列表的做法。
◆ 产品线下拉列表 ◆
首先针对「产品」使用 UNIQUE 函数,提取 B 列的非重复值。
公式如下:
=UNIQUE(B3:B32)
然后,选中 G3 单元格,在上方选项卡中,找到【数据验证】;
验证条件中,设置「允许」为「序列」;
「来源」为「=$G$7#」,点击确定:
这样产品线的下拉列表就搞定啦!
◆ 大类下拉列表 ◆
产品的「大类」是需要根据「产品线」内容动态更新的。
比如选择食品,那么就要把食品对应的大类提取出来。
这里可以分成两个步骤。
❶ 筛选「食品」对应的「大类」。
这个简单,用 FILTER 函数就可以实现。(FILTER 函数目前仅适用于 Office 365 预览体验计划~)
语法如下:
=FILTER(要筛选的数据列,筛选条件,无法满足条件时返回的值)
公式如下:
=UNIQUE(FILTER(C3:C32,B3:B32=G3))
❷ 对「大类」内容提取唯一值。
这个是 UNIQUE 函数要干的活,在上一步的公式基础上,套一个 UNIQUE 函数就可以了。
公式如下:
=UNIQUE(FILTER(C3:C32,B3:B32=G3))
下拉列表的创建,和「产品线」完全一样,就不再重复演示了~
◆ 中类下拉列表 ◆
接下来提取「中类」的内容,思路和提取「大类」是一样的。
❶ 筛选对应「中类」的内容。
首先找出大类对应的中类所有内容。这里使用 FILTER 来实现。
公式如下:
=FILTER(D3:D32,C3:C32=H3)
❷ 提取「中类」唯一值。
然后使用 UNIQUE 函数对内容提取唯一值。
公式和「大类」基本一样:
=UNIQUE(FILTER(D3:D32,C3:C32=H3))
◆ 明细下拉列表 ◆
接下来的「明细」也是相同的思路,公式如下:
=UNIQUE(FILTER(E3:E32,D3:D32=I3))
02
总结
我们再来总结一下。
❶ 多级下拉列表的本质是,给每个单元格设定对应的下拉选项。
❷ 如何设置动态的下拉选项?
使用 FILTER 函数,有条件地筛选下拉选项,然后用 UNIQUE 函数提取唯一值。
因为单元格内容是动态的,那么下拉选项肯定也是动态的。
明白了这个原理之后,我们还可以做出很多其他的效果!
比如按照关键字进行模糊匹配,再输出对应的下拉列表选项。
对应的公式是:
=FILTER(A2:A15,ISNUMBER(FIND(C2,A2:A15)))
最后,考一考你:
你能够用文字解释一下这段公式的作用和原理吗?
评论区等你的答案!
私信回复关键词【福利】,获取丰富办公资源,助你高效办公早下班!
-
Mybatis插入列表怎么做?
2020-03-26 23:09:40书接上回,哎呀,有时候我需要往数据库里插入列表对象,不断的循环,然后插入单条记录,觉得很傻很天真啊,有没有效率高一些的方法呢? 建表 还是以简化的goods_info表为例,建表语句: CREATE TABLE `goods_info` ...大家好,我是道哥,专注于后端java开发,喜欢写作和分享。如果觉得文章对你有用,那就点个赞呗!如果能转发那是对道哥最大的支持!
书接上回,哎呀,有时候我需要往数据库里插入列表对象,不断的循环,然后插入单条记录,觉得很傻很天真啊,有没有效率高一些的方法呢?
建表
还是以简化的goods_info表为例,建表语句:
CREATE TABLE `goods_info` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `gmt_create` datetime NOT NULL COMMENT '创建时间', `gmt_modified` datetime NOT NULL COMMENT '修改时间', `name` varchar(50) DEFAULT NULL COMMENT '货物名称', `status` int(11) NOT NULL COMMENT '货物状态,0-未出售,1-已出售', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COMMENT='货物信息表' ;
批量插入多个对象怎么写呢?
这里要注意,需要定义一个VO对象,里面包含要插入的字段定义。然后insert语句如下所写:
<insert id="saveGoodsList" parameterType="java.util.List" useGeneratedKeys="false"> insert into goods_info(gmt_create,gmt_modified,name,status) values <foreach collection="list" item="item" index="index" separator=","> (now(),now(),#{item.name},#{item.status}) </foreach> </insert>
就这么简单,就可以实现Mybatis插入列表对象。
文章不求长和多,每次能学到一点就好,能够看到这里的都是真爱啊,觉得有用的话,就点个赞。评论和转发是对道哥最大的鼓励。
程序员的小伙伴们,学习之路,同行的人越多才可以走的更远,加入公众号[程序员之道],一起交流沟通,走出我们的程序员之道! -
拿到mep以后,从进程中拿当前函数分配的堆内存块地址列表怎么做
2016-08-23 07:27:35拿到mep以后,从进程中拿当前函数分配的堆内存块地址列表怎么做?需要用到进程快照获取么? -
微博列表怎么做
2012-12-13 13:54:43像是新浪微博ios客户端的微博列表是怎么做出来的 是用table做的么? tablecell可以自适应内容高度吗? 谢谢 -
java多级菜单列表怎么做_java中怎样做多级菜单
2020-12-19 17:51:19展开全部1。sevice层:/*** 构建 点取筛取 树形动态菜单* @return tree* @throws BasicException*/public String buildTree()throws BasicException{try {StringBuffer xmlBuffer = new StringBuffer();...展开全部
1。sevice层:
/**
* 构建 点取筛取 树形动态菜单
* @return tree
* @throws BasicException
*/
public String buildTree()throws BasicException{
try {
StringBuffer xmlBuffer = new StringBuffer();
int a = 0;
xmlBuffer.append("d.add(0,-1,'全部');");
xmlBuffer.append("\n");
List list = getDao().findFundInvestType();
if(list!=null&&list.size()!=0){
int b = 0;
for(int i=0;i
FundInvestType bean = (FundInvestType)list.get(i);
String code = bean.getInvestCode();
// if is sencond
if(code.length()==2){
b++;
a=i;
xmlBuffer.append("d.add("+b+",0,'"+bean.getInvestName()+"','');");
xmlBuffer.append("\n");
}else if(code.length()==10){
//if is second
if(code.substring(2,10).equals("00000000")){
b++;
a=i;
xmlBuffer.append("d.add("+b+",0,'"+bean.getInvestName()+"','');");
xmlBuffer.append("\n");
}else{//if is third,it father is second
b++;
int k = a+1;
xmlBuffer.append("d.add("+b+","+k+",'"+bean.getInvestName()+"','');");
xmlBuffer.append("\n");
}
}
}
}
return xmlBuffer.toString();
} catch (RuntimeException e) {
throw new BasicException(e.getMessage());
}
}
2。jsp页面32313133353236313431303231363533e4b893e5b19e31333238656561:
String webapp=request.getContextPath()+"/fund";
%>
基金投资类型基金投资类型 3。js文件:
// Node object
function Node(id, pid, name, url, title, target, icon, iconOpen, open) {
this.id = id;
this.pid = pid;
this.name = name;
this.url = url;
this.title = title;
this.target = target;
this.icon = icon;
this.iconOpen = iconOpen;
this._io = open || false;
this._is = false;
this._ls = false;
this._hc = false;
this._ai = 0;
this._p;
};
// Tree object
function dTree(objName) {
this.config = {
target : null,
folderLinks : true,
useSelection : true,
useCookies : true,
useLines : true,
useIcons : true,
useStatusText : false,
closeSameLevel : false,
inOrder : false
}
this.icon = {
root : './fund/menu/img/base.gif',
folder : './fund/menu/img/folder.gif',
folderOpen : './fund/menu/img/folderopen.gif',
node : './fund/menu/img/page.gif',
empty : './fund/menu/img/empty.gif',
line : './fund/menu/img/line.gif',
join : './fund/menu/img/join.gif',
joinBottom : './fund/menu/img/joinbottom.gif',
plus : './fund/menu/img/plus.gif',
plusBottom : './fund/menu/img/plusbottom.gif',
minus : './fund/menu/img/minus.gif',
minusBottom : './fund/menu/img/minusbottom.gif',
nlPlus : './fund/menu/img/nolines_plus.gif',
nlMinus : './fund/menu/img/nolines_minus.gif'
};
this.obj = objName;
this.aNodes = [];
this.aIndent = [];
this.root = new Node(-1);
this.selectedNode = null;
this.selectedFound = false;
this.completed = false;
};
// Adds a new node to the node array
dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) {
this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open);
};
// Open/close all nodes
dTree.prototype.openAll = function() {
this.oAll(true);
};
dTree.prototype.closeAll = function() {
this.oAll(false);
};
// Outputs the tree to the page
dTree.prototype.toString = function() {
var str = '
\n';';if (document.getElementById) {
if (this.config.useCookies) this.selectedNode = this.getSelected();
str += this.addNode(this.root);
} else str += 'Browser not supported.';
str += '
if (!this.selectedFound) this.selectedNode = null;
this.completed = true;
return str;
};
// Creates the tree structure
dTree.prototype.addNode = function(pNode) {
var str = '';
var n=0;
if (this.config.inOrder) n = pNode._ai;
for (n; n
if (this.aNodes[n].pid == pNode.id) {
var cn = this.aNodes[n];
cn._p = pNode;
cn._ai = n;
this.setCS(cn);
if (!cn.target && this.config.target) cn.target = this.config.target;
if (cn._hc && !cn._io && this.config.useCookies) cn._io = this.isOpen(cn.id);
if (!this.config.folderLinks && cn._hc) cn.url = null;
if (this.config.useSelection && cn.id == this.selectedNode && !this.selectedFound) {
cn._is = true;
this.selectedNode = n;
this.selectedFound = true;
}
str += this.node(cn, n);
if (cn._ls) break;
}
}
return str;
};
// Creates the node icon, url and text
dTree.prototype.node = function(node, nodeId) {
var str = '
' + this.indent(node, nodeId);';if (this.config.useIcons) {
if (!node.icon) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node);
if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node;
if (this.root.id == node.pid) {
node.icon = this.icon.root;
node.iconOpen = this.icon.root;
}
str += '
';
}
if (node.url) {
if (node.title) str += ' title="' + node.title + '"';
if (node.target) str += ' target="' + node.target + '"';
if (this.config.useSelection && ((node._hc && this.config.folderLinks) || !node._hc))
str += ' οnclick="javascript: ' + this.obj + '.s(' + nodeId + ');"';
else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id)
if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += '
';str += '
if (node._hc) {
str += '
';';str += this.addNode(node);
str += '
}
this.aIndent.pop();
return str;
};
// Adds the empty and line icons
dTree.prototype.indent = function(node, nodeId) {
var str = '';
if (this.root.id != node.pid) {
for (var n=0; n
str += '
';
(node._ls) ? this.aIndent.push(0) : this.aIndent.push(1);
if (node._hc) {
} else str += '
';
}
return str;
};
// Checks if a node has any children and if it is the last sibling
dTree.prototype.setCS = function(node) {
var lastId;
for (var n=0; n
if (this.aNodes[n].pid == node.id) node._hc = true;
if (this.aNodes[n].pid == node.pid) lastId = this.aNodes[n].id;
}
if (lastId==node.id) node._ls = true;
};
// Returns the selected node
dTree.prototype.getSelected = function() {
var sn = this.getCookie('cs' + this.obj);
return (sn) ? sn : null;
};
// Highlights the selected node
dTree.prototype.s = function(id) {
if (!this.config.useSelection) return;
var cn = this.aNodes[id];
if (cn._hc && !this.config.folderLinks) return;
if (this.selectedNode != id) {
if (this.selectedNode || this.selectedNode==0) {
eOld = document.getElementById("s" + this.obj + this.selectedNode);
eOld.className = "node";
}
eNew = document.getElementById("s" + this.obj + id);
eNew.className = "nodeSel";
this.selectedNode = id;
if (this.config.useCookies) this.setCookie('cs' + this.obj, cn.id);
}
};
// Toggle Open or close
dTree.prototype.o = function(id) {
var cn = this.aNodes[id];
this.nodeStatus(!cn._io, id, cn._ls);
cn._io = !cn._io;
if (this.config.closeSameLevel) this.closeLevel(cn);
if (this.config.useCookies) this.updateCookie();
};
// Open or close all nodes
dTree.prototype.oAll = function(status) {
for (var n=0; n
if (this.aNodes[n]._hc && this.aNodes[n].pid != this.root.id) {
this.nodeStatus(status, n, this.aNodes[n]._ls)
this.aNodes[n]._io = status;
}
}
if (this.config.useCookies) this.updateCookie();
};
// Opens the tree to a specific node
dTree.prototype.openTo = function(nId, bSelect, bFirst) {
if (!bFirst) {
for (var n=0; n
if (this.aNodes[n].id == nId) {
nId=n;
break;
}
}
}
var cn=this.aNodes[nId];
if (cn.pid==this.root.id || !cn._p) return;
cn._io = true;
cn._is = bSelect;
if (this.completed && cn._hc) this.nodeStatus(true, cn._ai, cn._ls);
if (this.completed && bSelect) this.s(cn._ai);
else if (bSelect) this._sn=cn._ai;
this.openTo(cn._p._ai, false, true);
};
// Closes all nodes on the same level as certain node
dTree.prototype.closeLevel = function(node) {
for (var n=0; n
if (this.aNodes[n].pid == node.pid && this.aNodes[n].id != node.id && this.aNodes[n]._hc) {
this.nodeStatus(false, n, this.aNodes[n]._ls);
this.aNodes[n]._io = false;
this.closeAllChildren(this.aNodes[n]);
}
}
}
// Closes all children of a node
dTree.prototype.closeAllChildren = function(node) {
for (var n=0; n
if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) {
if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls);
this.aNodes[n]._io = false;
this.closeAllChildren(this.aNodes[n]);
}
}
}
// Change the status of a node(open or closed)
dTree.prototype.nodeStatus = function(status, id, bottom) {
eDiv = document.getElementById('d' + this.obj + id);
eJoin = document.getElementById('j' + this.obj + id);
if (this.config.useIcons) {
eIcon = document.getElementById('i' + this.obj + id);
eIcon.src = (status) ? this.aNodes[id].iconOpen : this.aNodes[id].icon;
}
eJoin.src = (this.config.useLines)?
((status)?((bottom)?this.icon.minusBottom:this.icon.minus):((bottom)?this.icon.plusBottom:this.icon.plus)):
((status)?this.icon.nlMinus:this.icon.nlPlus);
eDiv.style.display = (status) ? 'block': 'none';
};
// [Cookie] Clears a cookie
dTree.prototype.clearCookie = function() {
var now = new Date();
var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);
this.setCookie('co'+this.obj, 'cookieValue', yesterday);
this.setCookie('cs'+this.obj, 'cookieValue', yesterday);
};
// [Cookie] Sets value in a cookie
dTree.prototype.setCookie = function(cookieName, cookieValue, expires, path, domain, secure) {
document.cookie =
escape(cookieName) + '=' + escape(cookieValue)
+ (expires ? '; expires=' + expires.toGMTString() : '')
+ (path ? '; path=' + path : '')
+ (domain ? '; domain=' + domain : '')
+ (secure ? '; secure' : '');
};
// [Cookie] Gets a value from a cookie
dTree.prototype.getCookie = function(cookieName) {
var cookieValue = '';
var posName = document.cookie.indexOf(escape(cookieName) + '=');
if (posName != -1) {
var posValue = posName + (escape(cookieName) + '=').length;
var endPos = document.cookie.indexOf(';', posValue);
if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
else cookieValue = unescape(document.cookie.substring(posValue));
}
return (cookieValue);
};
// [Cookie] Returns ids of open nodes as a string
dTree.prototype.updateCookie = function() {
var str = '';
for (var n=0; n
if (this.aNodes[n]._io && this.aNodes[n].pid != this.root.id) {
if (str) str += '.';
str += this.aNodes[n].id;
}
}
this.setCookie('co' + this.obj, str);
};
// [Cookie] Checks if a node id is in a cookie
dTree.prototype.isOpen = function(id) {
var aOpen = this.getCookie('co' + this.obj).split('.');
for (var n=0; n
if (aOpen[n] == id) return true;
return false;
};
// If Push and pop is not implemented by the browser
if (!Array.prototype.push) {
Array.prototype.push = function array_push() {
for(var i=0;i
this[this.length]=arguments[i];
return this.length;
}
};
if (!Array.prototype.pop) {
Array.prototype.pop = function array_pop() {
lastElement = this[this.length-1];
this.length = Math.max(this.length-1,0);
return lastElement;
}
};
本回答被网友采纳
已赞过
已踩过<
你对这个回答的评价是?
评论
收起
-
Android下拉列表怎么做?(小白速成7)
2021-01-12 20:59:58Android下拉列表 采用组件设置的形式添加下拉列表 我们要先添加选项,也就是我们列表中要选择的东西。 定义在values文件夹中的strings.xml中. <string-array name="spinner_data"> <item>山西</... -
java多级菜单列表怎么做_用java怎么写二级菜单?
2021-01-12 05:40:342007-09-21 回答import java.awt.*;import java.awt.event.keyevent;import java.awt.event.mouseadapter;import java.awt.event.mouseevent;import java.awt.event.windowadapter;import java.awt.event.... -
java多级菜单列表怎么做_JAVA构造多级菜单
2020-12-19 17:51:19很多时候我们在前段展现时要用到多级菜单,刚好今天做了个简单的,整理一下;首先我们要确定要展现的菜单结构:--根菜单--一级菜单A--二级菜单A--三级菜单A--一级菜单B与Hibernate构造无限极菜单不同的是,这个菜单... -
iOS类似今日头条 网易新闻 视频列表怎么做
2015-08-07 15:13:57如题 请教大神类似今日头条或网易新闻中的视频是怎么实现的?有大神给个思路或者demo吗 -
请教这个列表怎么做的
2014-02-28 11:42:29新手不知道怎么弄,求助大家了,这个是什么控件吗,复选框怎么加的 [img=https://img-bbs.csdn.net/upload/201402/28/1393558903_290479.jpg][/img] -
java多级菜单列表怎么做_Java 集合 之 List 多级菜单
2020-12-19 17:51:18import java.util.List;public class TestCategory{public static String level="";public static void main(String[] args){MenuManager mm=new MenuManager();mm.add(new Menu(0,-1,"主控管理系统"));... -
c# EF 执行存储过程 返回数据列表 怎么做
2017-06-25 19:24:13我的上下文代码如下 public class JuCheapContext2 : DbContext { /// <summary> /// 带参数构造函数 用于传入跨服务器的SQL服务器地址 ... public JuCheapContext2(string connectionString) : base... -
新手求助,asp.net 论坛帖子列表怎么做,从帖子列表跳转到帖子里又怎么做?
2013-05-23 22:09:05新手求助,asp.net 论坛帖子列表怎么做,从帖子列表跳转到帖子里又怎么做? 希望高手能给出详细思路,有例子更好。 -
Excel单元格下拉列表怎么做?
2010-06-22 20:14:00你或许经常会遇到一份Excel表格在填写过程中出错(格式、类型等不符合要求),尤其是利用此表格收集信息时,为了防止填表人员出现类似情况,将Excel单元格的内容设定为只能从下拉列表中选择即可解决你的烦恼。... -
java多级菜单列表怎么做_java实现的二级联动菜单效果
2020-12-29 05:44:51这篇文章主要介绍了java实现的二级联动菜单效果,结合实例形式分析了java前台页面布局及与后台交互构造联动菜单的相关技巧,需要的朋友可以参考下本文实例讲述了java实现的二级联动菜单效果。分享给大家供大家参考,... -
java多级菜单列表怎么做_vue+ java 实现多级菜单递归效果
2020-12-19 17:51:15获取请求 2获取所有菜单 3递归菜单的父子关系 /** * Purpose:菜单列表页面 * @author JaxWan * @param req * @return IZrarResponse */ public IZrarResponse searchMenus(IZrarRequest req){ IZrarResponse res = ... -
java多级菜单列表怎么做_Java构建网站多级菜单功能解决方案
2020-12-19 17:51:11} }/*** 递归设置栏目的子节点 * *@paramid 父节点id *@paramallMenu 节点列表 *@return */ private List List if(nav.getParentid().equals(id)) { childList.add(nav); } }//递归设置子节点 for(Menu nav : ... -
java多级菜单列表怎么做_多级菜单生成的嵌套路由如何展示页面
2020-12-19 17:51:14菜单数据结构 menuData{"data": [{"id": 1,"menuName": "一级菜单","path": "/home","icon": "el-icon-setting","component": "Home","childMenu": [{"id": 2,"menuName": "二级菜单-1","path": "/baseConfig/... -
java多级菜单列表怎么做_【转载】Java实现多级菜单(递归)
2020-12-19 17:51:21();for (Menu nav : allMenu) {// 遍历所有节点,将所有菜单的父id与传过来的根节点的id比较//相等说明:为该根节点的子节点。if(nav.ParentId().equals(id)){childList.add(nav);}}//递归for (Menu nav : childList... -
java多级菜单列表怎么做_基于JAVA实现的N层菜单(树形结构)
2021-01-15 04:20:56/*** @Description 生成树形结构nodeTree; List tagList原始无序数据链表* @auther: wz* @date: 2019/1/18 15:09*/private List createNodeTree(List tagList) {long beginTime = System.currentTimeMillis();...