* [refac] remove unused loading before edit doc.

This commit is contained in:
sunhao
2025-05-09 13:41:25 +08:00
committed by 刘刚
parent c281ef66e7
commit aa9c8a1159
+1 -6
View File
@@ -1192,12 +1192,7 @@ const commands =
if (typeof doc !== 'object') {
doc = docApp._treeMap.value.docs.get(doc)?.data;
}
docApp.load(null, null, null, {noLoading: false, picks: 'doc'}).then(() => {
if(docApp.spaceType != 'quick') doc = docApp._treeMap.value.docs.get(doc.id)?.data;
const editable = doc?.editable;
if(!editable) return zui.Modal.alert(getLang('needEditable'));
docApp.startEditDoc(doc, options);
});
return docApp.startEditDoc(doc, options);
},
/** 上传文档。Upload Doc. */
uploadDoc: function()