* [perf story #49381] Adjust for add module style.
This commit is contained in:
@@ -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}">`;
|
||||
|
||||
@@ -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;}
|
||||
|
||||
Reference in New Issue
Block a user