<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>TreeView-Lise</title>
<link rel="stylesheet" href="./css/bootstrap-table.css">
<script src="./js/jquery.js"></script>
<script src="./js/bootstrap-table.js"></script>
<script src="./js/bootstraptable-treeview.js"></script>
</head>
<body>
<div style="margin:20px">
<input type="button" id="expandAllTree" value="展开所有" class="btn btn-defaul"/>
<input type="button" id="collapseAllTree" value="折叠所有" class="btn btn-defaul"/>
<table id="tree_table"></table>
</div>
<script>
$(function () {
var data = [
{
id: '1',
name: "菜单一",
desc: "这是一个描述",
parentId:'123',
},
{
id: '2',
name: "菜单二",
desc: "这是一个描述",
parentId:'124',
},
{
id: '3',
name: "二级菜单1",
desc: "这是一个描述",
parentId:'1',
},
{
id: '4',
name: "二级菜单2",
desc: "这是一个描述",
parentId:'1',
}
]
$('#tree_table').bootstrapTable({
data: data,
sidePagination: 'server',
pagination: false,
treeView: true,
treeId: "id",
treeParentId:'parentId',
collapseIcon: "glyphicon glyphicon-chevron-right",//折叠样式
expandIcon: "glyphicon glyphicon-chevron-down",//展开样式
leafIcon:"glyphicon glyphicon-th-list",//叶子节点样式
treeField: "flowName",
columns: [{
checkbox:true
},{
field: 'flowName',
title: '名称',
},
{
field: 'parentId',
title: '详情',
},
]
});
$("#expandAllTree").on('click',function(){
$('#tree_table').bootstrapTable("expandAllTree")
})
$("#collapseAllTree").on('click',function(){
$('#tree_table').bootstrapTable("collapseAllTree")
})
});
</script>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
bootstraptable-treeview树形,树形空格缩进bug已解决
共64个文件
sample:13个
master:4个
js:3个
需积分: 0 1 下载量 107 浏览量
2023-09-14
10:39:26
上传
评论
收藏 882KB ZIP 举报
温馨提示
bootstraptable-treeview树形,树形空格缩进bug已解决。
资源推荐
资源详情
资源评论
收起资源包目录
bootstrap-tree.zip (64个子文件)
bootstrap-tree
js
bootstrap-table.js 110KB
bootstraptable-treeview.js 25KB
jquery.js 99KB
.git
index 2KB
HEAD 23B
refs
heads
master 41B
tags
remotes
origin
master 41B
COMMIT_EDITMSG 49B
objects
19
434857630bd6545bd60e3e79fa751cf5a4d22b 340B
b9
3a4953fff68df523aa7656497ee339d6026d64 20KB
bd17e158d87fb1477f7ac3ddbb5a676f3c26d2 43KB
09
e04577f967187d6d801316e513ed75b5fd8db1 63B
79
7d237c46c45c9c8f952c62ca2bec2612993102 140B
94
fb5490a2ed10b2c69a4a567a4fd2e4f706d841 33KB
81
bcc6aaee12dbff15375196c28b35520b336ce2 7KB
1b
b1ee7ee67a585b15376881d318c36db3feb113 131B
32
6c421098a669f5284878d6a6f0653cbcd6d496 7KB
1d
aa6567e99385d8fc35d5eaf00921cf5898bad7 131B
70
125459f7d593b79cabc75bd60b91943aa65e93 49KB
67
bced30634f66f0f1f6d3fa8aa6cefa1ade11c4 217B
6c
31d8df046a8d28532e11ee3f732bc482ac6209 5KB
c9
c684a6df530f6dee7ecd11f0abc838ab73e3fd 26KB
pack
9e
612858f802245ddcbf59788a0db942224bab35 23KB
info
d3
659246915cacb0c9204271f1f9fc5f77049eac 45KB
73
b799d4cc0d61e2968c78756cce5e8d78a532c6 140B
de
954c1de789427e7d776df1e30329341f5613cd 214B
14
13fc609ab6f21774de0cb7e01360095584f65b 24KB
06
62cb96bfb78cb2603df4bc9995314bd6806312 37KB
2e
db4ec34cbc0b6559b808a3a1f31e0e587742ff 65KB
c4
2009973de29a445d8b1db83dc4b27d6b690d3a 17KB
64
539b54c3751a6d9adb44c8e3a45ba5a73b77f0 18KB
fd
ef7e3abfdd3ed9cc8226d4237cea755525f40f 39KB
description 73B
info
exclude 240B
logs
HEAD 430B
refs
heads
master 430B
remotes
origin
master 280B
hooks
post-update.sample 189B
prepare-commit-msg.sample 1KB
commit-msg.sample 896B
pre-receive.sample 544B
update.sample 4KB
pre-commit.sample 2KB
pre-rebase.sample 5KB
applypatch-msg.sample 478B
fsmonitor-watchman.sample 5KB
push-to-checkout.sample 3KB
pre-applypatch.sample 424B
pre-push.sample 1KB
pre-merge-commit.sample 416B
tgitchangelist 0B
config 310B
css
bootstrap-table.css 23KB
index.html 3KB
fonts
FontAwesome.otf 60KB
glyphicons-halflings-regular.svg 106KB
glyphicons-halflings-regular.ttf 44KB
glyphicons-halflings-regular.woff 23KB
glyphicons-halflings-regular.eot 20KB
fontawesome-webfont.eot 37KB
glyphicons-halflings-regular.woff2 18KB
fontawesome-webfont.woff 43KB
fontawesome-webfont.svg 194KB
fontawesome-webfont.ttf 77KB
共 64 条
- 1
资源评论
费马程序猿
- 粉丝: 897
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功