Merge branch 'release/zentaopms_18.3' of https://gitlab.zcorp.cc/easycorp/zentaopms into release/zentaopms_18.3

This commit is contained in:
tianshujie
2023-03-28 08:51:42 +08:00
2 changed files with 11 additions and 3 deletions
+2
View File
@@ -9,6 +9,7 @@
.overflow-auto {overflow: auto;}
.overflow-visible {overflow: visible;}
.overflow-hidden {overflow: hidden;}
.img-lib {width: 14px; height: 14px; margin-bottom: 2px;}
#mainContent {padding-top: 0; padding-bottom: 0; height: calc(100vh - 125px);}
#mainContent #createDropdown {display: inline-block;}
#mainContent #createDropdown ul {position: absolute;}
@@ -62,6 +63,7 @@ li.drag-shadow ul {display: none!important;}
.file-tree a.show-icon {padding-right: 15px;}
.flex-between {display: flex; align-items: center; justify-content: space-between;}
.flex-center {display: flex; align-items: center; justify-content: center;}
.flex-start {display: flex; align-items: center;}
.tree li > .list-toggle {top: 4px;}
.input-tree {width: 120px;}
.tree-icon {position: absolute; right: 0;}
+9 -3
View File
@@ -17,6 +17,12 @@ $(function()
return dropdown;
}
var imgObj = {
'annex': 'annex',
'lib': 'wiki-file-lib'
}
console.log(treeData);
$('#fileTree').tree(
{
initialState: 'active',
@@ -26,9 +32,9 @@ $(function()
var libClass = ['lib', 'annex', 'api', 'execution'].indexOf(item.type) !== -1 ? 'lib' : '';
var hasChild = item.children ? !!item.children.length : false;
var $item = '<a href="###" style="position: relative" data-has-children="' + hasChild + '" title="' + item.name + '" data-id="' + item.id + '" class="' + libClass + '" data-type="' + item.type + '">';
$item += '<div class="text h-full w-full flex-between overflow-hidden">';
$item += '<span>';
if(libClass == 'lib') $item += '<i class="icon-file-excel"></i> ';
$item += '<div class="text h-full w-full flex-start overflow-hidden">';
if(libClass == 'lib') $item += '<div class="img-lib" style="background-image:url(static/svg/' + imgObj[item.type || 'lib'] + '.svg)"></div>';
$item += '<span style="padding-left: 5px;">';
$item += item.name
$item += '</span>';
$item += '<i class="icon icon-drop icon-ellipsis-v hidden tree-icon" data-isCatalogue="' + (item.type ? false : true) + '"></i>';