mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 16:30:13 +08:00
🐛 数据库加载更多后的操作
This commit is contained in:
parent
c9eed7c86d
commit
c301a4ac0a
@ -13,7 +13,7 @@ import {previewImage} from "../../preview/image";
|
||||
import {genAVValueHTML} from "./blockAttr";
|
||||
import {hideMessage, showMessage} from "../../../dialog/message";
|
||||
import {fetchPost} from "../../../util/fetch";
|
||||
import {hasClosestByClassName} from "../../util/hasClosest";
|
||||
import {hasClosestBlock, hasClosestByClassName} from "../../util/hasClosest";
|
||||
|
||||
export const bindAssetEvent = (options: {
|
||||
protyle: IProtyle,
|
||||
@ -334,6 +334,8 @@ export const dragUpload = (files: string[], protyle: IProtyle, cellElement: HTML
|
||||
isUpload: true,
|
||||
id: protyle.block.rootID
|
||||
}, (response) => {
|
||||
const blockElement = hasClosestBlock(cellElement);
|
||||
if (blockElement) {
|
||||
hideMessage(msgId);
|
||||
const addUpdateValue: IAVCellAssetValue[] = [];
|
||||
Object.keys(response.data.succMap).forEach(key => {
|
||||
@ -355,6 +357,7 @@ export const dragUpload = (files: string[], protyle: IProtyle, cellElement: HTML
|
||||
});
|
||||
fetchPost("/api/av/renderAttributeView", {
|
||||
id: avID,
|
||||
pageSize: parseInt(blockElement.getAttribute("data-page-size")) || undefined,
|
||||
}, (response) => {
|
||||
updateAssetCell({
|
||||
protyle,
|
||||
@ -364,5 +367,6 @@ export const dragUpload = (files: string[], protyle: IProtyle, cellElement: HTML
|
||||
addUpdateValue
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user