* [perf story #49381] Adjust for add module style.

This commit is contained in:
wangyidong
2024-08-07 20:05:50 +08:00
committed by 孙广明
parent 37def888a2
commit a27cd76c01
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -31,10 +31,11 @@ window.addModule = function(id, addType)
const {lib, type, module} = $element.data();
let parentID = ['docLib', 'apiLib'].includes(type) ? '0' : $element.data('parent');
let level = $element.closest('.tree-item').attr('z-key-path').split(':').length;
if(addType == 'child' && !['docLib', 'apiLib'].includes(type)) parentID = id;
if(addType != 'same') level += 1;
const level = addType == 'same' ? $element.data('level') : $element.data('level') + 1;
const style = `style="margin-left: calc(${level} * var(--list-nested-indent, 20px))"`;
const style = `style="margin-left: calc(${level} * 12px)"`;
const className = addType == 'child' && ['docLib', 'apiLib'].includes(type) ? 'mt-2' : '';
let inputTpl = `<li class="tree-item ${className}">`;
+1 -1
View File
@@ -2,5 +2,5 @@
.doc-title[data-status=draft] .doc-name {max-width: calc(100% - 60px); overflow: hidden;}
[data-type="mine"]{display: none;}
[data-type="mine"] + menu{--list-nested-indent: 0px !important; border-bottom-width: 1px; padding-bottom: 8px; margin-bottom: 8px; max-height: calc(100vh - 250px); overflow-y:auto;}
[data-type="mine"] + menu{--list-nested-indent: 0px !important; border-bottom-width: 1px; padding-bottom: 8px; margin-bottom: 8px; max-height: calc(100vh - 250px); overflow-y:auto; padding-left:5px; padding-right: 5px;}
[data-type="mine"] + menu:before{border-left-width: 0px !important;}