This commit is contained in:
Vanessa 2022-09-03 19:49:52 +08:00
parent 6da0ab12db
commit 510d268ba2

View file

@ -93,10 +93,10 @@ export class Outline extends Model {
data: null,
click: (element: HTMLElement) => {
const id = element.getAttribute("data-node-id");
fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => {
fetchPost("/api/attr/getBlockAttrs", {id}, (attrResponse) => {
openFileById({
id,
action: foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_FOCUS, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML],
action: attrResponse.data["heading-fold"] === "1" ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_FOCUS, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML],
});
});
}