diff --git a/lib/zin/wg/docmenu/js/v1.js b/lib/zin/wg/docmenu/js/v1.js index b1734169ae..3eed70ef02 100644 --- a/lib/zin/wg/docmenu/js/v1.js +++ b/lib/zin/wg/docmenu/js/v1.js @@ -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 = `
  • `; diff --git a/module/doc/css/myspace.ui.css b/module/doc/css/myspace.ui.css index 07011832ae..f06541e8e3 100644 --- a/module/doc/css/myspace.ui.css +++ b/module/doc/css/myspace.ui.css @@ -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;}