web_toolset/web/html/body/nas/sftp.html
2020-05-13 17:39:29 +08:00

86 lines
2.6 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>FTP</title>
<link rel="stylesheet" href="/layui/css/layui.css">
</head>
<body>
<div class="layui-layout layui-layout-admin">
<div id="header"></div>
<div class="layui-body" style="top: 100px; ">
<div id="side"></div>
<blockquote class="layui-elem-quote"><span id="ip">SFTP</span></blockquote>
<div id="sftp"></div>
<div id="footer"></div>
</div>
<script src="/layui/layui.js"></script>
<script src="/js/jquery-3.2.1.js"></script>
<script>
$('#header').load("/html/header.html");
$('#footer').load("/html/footer.html");
$('#side').load("/html/body/nas/side.html");
layui.use('tree', function () {
var tree = layui.tree;
//渲染
var inst1 = tree.render({
elem: '#sftp' //绑定元素
,edit: ['add', 'update', 'del'] //操作节点的图标
, data: [{
title: '江西' //一级菜单
, children: [{
title: '南昌' //二级菜单
, children: [{
title: '高新区' //三级菜单
//…… //以此类推,可无限层级
}]
}]
}, {
title: '陕西' //一级菜单
, children: [{
title: '西安' //二级菜单
}]
}]
,click:function(obj){
console.log(obj.data)
if(!obj.data.children){
obj.data={
"title":obj.data.title,
"children":[
{"title":'a'}
]
}
inst1.reload({
data:obj.data,
})
}
}
});
});
$.ajax({ cache: false })
</script>
</body>
<style>
#icon {
float: right;
}
#rss+.layui-table-view tbody>tr>td>.layui-table-cell {
height: 100px;
line-height: 100px;
}
</style>
</html>