优化Vditor文档目录样式

This commit is contained in:
yangjian 2021-06-04 08:17:56 +08:00
parent 1678ca660c
commit bc893914f7
4 changed files with 13 additions and 2 deletions

View File

@ -6,7 +6,7 @@
- [修复]开启「全站登录」后URL跳转异常的问题
- [优化]用户禁止同名文集创建,文集下禁止同名文档创建;
- [优化]文集导出异常提示;
- [优化]Vditor文档目录样式
### v0.6.7 2021-05-29
- [新增]表格文档支持Excel文件(.xlsx格式)导入;

View File

@ -167,6 +167,9 @@ ul#doc-tree{
}
}
/* 覆盖vditor文档目录样式 */
.vditor-outline{
width: 200px;
}
.vditor-outline ul{
padding-left: 0px;
}

View File

@ -429,6 +429,14 @@ function initDocRender(mode){
title:false,
};
var img_viewer = new Viewer(document.getElementById('content'), img_options);
// 渲染文档目录
var toc_cnt = $(".markdown-toc-list").children().length;
// console.log(toc_cnt)
if(toc_cnt > 0){
// console.log('显示文档目录')
$(".tocMenu").show();
initSidebar('.sidebar', '.doc-content');
}
},
})
}else if(mode == 4){

View File

@ -383,7 +383,7 @@
.forEach(function(link) {
link.target = '_blank';
// console.log(link,$(link).children('img').length)
console.log(link,$(link).children().length)
// console.log(link,$(link).children().length)
if($(link).children().length == 0){
link.classList.add('external');
}