mirror of
https://github.com/mindoc-org/mindoc.git
synced 2026-02-27 17:03:57 +08:00
pref: 优化cherry-markdown toc样式解决 convertImageToDataUri not func BUG (#966)
* feat: 首页项目拖拽排序功能 * feat: 增加首页项目拖拽排序增加只能管理员进行, 排序失败元素回到原本位置 * perf: 新建文章以后直接进入到编辑文章页面 * perf: 优化文档打开时或刷新时样式闪动问题 * perf: 优化表格样式 * feat: 支持上传视频功能 * feat: 视频样式调整 * feat: 直接粘贴视频上传功能 * perf: 优化markdown目录显示 * feat: 项目配置新增是否开启打印功能 * perf: 优化模型自动更新表字段 * perf: 创建项目时增加选择编辑器功能 * perf: 优化cherry-markdown 菜单栏 * perf: 优化项目阅读界面, 新增打开搜索面板快捷键(Ctrl + f), esc恢复到目录快捷键功能 * perf: 优化项目搜索 * perf: 文章TOC样式调整 * feat: 配置管理中增加本地化切换 * feat: 配置管理中增加本地化切换 * fix: 调整页面内copyright的链接为: https://mindoc.com.cn/域名下 * fix: 创建README.md资源 * fix: 创建README.md资源 * fix: README更新 * fix: README更新 * fix: README 地址修改 * fix: 调整cherryMarkdown toc样式 兼容打印样式 fix: 修复 convertImageToDataUri not func * fix: cherry-markdown 上传附件和样式调整
This commit is contained in:
@@ -630,10 +630,11 @@ function myFileUpload(file, callback) {
|
||||
},
|
||||
success: function (data) {
|
||||
layer.close(layerIndex);
|
||||
if (data[0].errcode !== 0) {
|
||||
layer.msg(data[0].message);
|
||||
// 验证data是否为数组
|
||||
if (data.errcode !== 0) {
|
||||
layer.msg(data.message);
|
||||
} else {
|
||||
callback(data[0].url); // 假设返回的 JSON 中包含上传文件的 URL,调用回调函数并传入 URL
|
||||
callback(data.url); // 假设返回的 JSON 中包含上传文件的 URL,调用回调函数并传入 URL
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -141,6 +141,7 @@ function renderPage($data) {
|
||||
$("#article-info").text($data.doc_info);
|
||||
$("#view_count").text("阅读次数:" + $data.view_count);
|
||||
$("#doc_id").val($data.doc_id);
|
||||
checkMarkdownTocElement();
|
||||
if ($data.page) {
|
||||
loadComment($data.page, $data.doc_id);
|
||||
} else {
|
||||
@@ -154,7 +155,7 @@ function renderPage($data) {
|
||||
$("#view_container").removeClass("theme__dark theme__green theme__light theme__red theme__default")
|
||||
$("#view_container").addClass($data.markdown_theme)
|
||||
}
|
||||
checkMarkdownTocElement();
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -442,6 +443,9 @@ function loadCopySnippets() {
|
||||
|
||||
function checkMarkdownTocElement() {
|
||||
let toc = $(".markdown-toc-list");
|
||||
if ($(".toc").length) {
|
||||
toc = $(".toc");
|
||||
}
|
||||
let articleComment = $("#articleComment");
|
||||
if (toc.length) {
|
||||
$(".wiki-bottom-left").css("width", "calc(100% - 260px)");
|
||||
|
||||
Reference in New Issue
Block a user