mirror of
https://github.com/mindoc-org/mindoc.git
synced 2026-02-27 17:03:57 +08:00
重写附件功能
This commit is contained in:
@@ -140,6 +140,23 @@ function pushDocumentCategory($node) {
|
||||
}
|
||||
window.documentCategory.push($node);
|
||||
}
|
||||
/**
|
||||
* 将数据重置到Vue列表中
|
||||
* @param $lists
|
||||
*/
|
||||
function pushVueLists($lists) {
|
||||
for(var i in window.vueApp.lists){
|
||||
var item = window.vueApp.lists[i];
|
||||
window.vueApp.lists.$remove(item);
|
||||
}
|
||||
|
||||
for(var j in $lists){
|
||||
var item = $lists[j];
|
||||
window.vueApp.lists.push(item);
|
||||
}
|
||||
console.log(window.vueApp.lists)
|
||||
$("#attachInfo").text(" " + window.vueApp.lists.length + " 个附件")
|
||||
}
|
||||
|
||||
//实现小提示
|
||||
$("[data-toggle='tooltip']").hover(function () {
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
$(function () {
|
||||
|
||||
wangEditor.config.mapAk = window.baiduMapKey;
|
||||
window.addDocumentModalFormHtml = $(this).find("form").html();
|
||||
wangEditor.config.printLog = false;
|
||||
window.editor = new wangEditor('htmlEditor');
|
||||
editor.config.uploadImgUrl = window.imageUploadURL;
|
||||
editor.config.uploadImgFileName = "editormd-file-file";
|
||||
editor.config.uploadImgFileName = "editormd-image-file";
|
||||
editor.config.uploadParams = {
|
||||
"editor" : "wangEditor"
|
||||
};
|
||||
wangEditor.config.menus.splice(0,0,"|");
|
||||
wangEditor.config.menus.splice(0,0,"save");
|
||||
wangEditor.config.menus.splice(0,0,"release");
|
||||
wangEditor.config.menus.splice(29,0,"attach")
|
||||
|
||||
//移除地图、背景色
|
||||
editor.config.menus = $.map(wangEditor.config.menus, function(item, key) {
|
||||
@@ -81,6 +82,8 @@ $(function () {
|
||||
pushDocumentCategory(node);
|
||||
window.selectNode = node;
|
||||
|
||||
pushVueLists(res.data.attach);
|
||||
|
||||
}else{
|
||||
layer.msg("文档加载失败");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user