mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-04 05:42:12 +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 {genAVValueHTML} from "./blockAttr";
|
||||||
import {hideMessage, showMessage} from "../../../dialog/message";
|
import {hideMessage, showMessage} from "../../../dialog/message";
|
||||||
import {fetchPost} from "../../../util/fetch";
|
import {fetchPost} from "../../../util/fetch";
|
||||||
import {hasClosestByClassName} from "../../util/hasClosest";
|
import {hasClosestBlock, hasClosestByClassName} from "../../util/hasClosest";
|
||||||
|
|
||||||
export const bindAssetEvent = (options: {
|
export const bindAssetEvent = (options: {
|
||||||
protyle: IProtyle,
|
protyle: IProtyle,
|
||||||
@ -334,6 +334,8 @@ export const dragUpload = (files: string[], protyle: IProtyle, cellElement: HTML
|
|||||||
isUpload: true,
|
isUpload: true,
|
||||||
id: protyle.block.rootID
|
id: protyle.block.rootID
|
||||||
}, (response) => {
|
}, (response) => {
|
||||||
|
const blockElement = hasClosestBlock(cellElement);
|
||||||
|
if (blockElement) {
|
||||||
hideMessage(msgId);
|
hideMessage(msgId);
|
||||||
const addUpdateValue: IAVCellAssetValue[] = [];
|
const addUpdateValue: IAVCellAssetValue[] = [];
|
||||||
Object.keys(response.data.succMap).forEach(key => {
|
Object.keys(response.data.succMap).forEach(key => {
|
||||||
@ -355,6 +357,7 @@ export const dragUpload = (files: string[], protyle: IProtyle, cellElement: HTML
|
|||||||
});
|
});
|
||||||
fetchPost("/api/av/renderAttributeView", {
|
fetchPost("/api/av/renderAttributeView", {
|
||||||
id: avID,
|
id: avID,
|
||||||
|
pageSize: parseInt(blockElement.getAttribute("data-page-size")) || undefined,
|
||||||
}, (response) => {
|
}, (response) => {
|
||||||
updateAssetCell({
|
updateAssetCell({
|
||||||
protyle,
|
protyle,
|
||||||
@ -364,5 +367,6 @@ export const dragUpload = (files: string[], protyle: IProtyle, cellElement: HTML
|
|||||||
addUpdateValue
|
addUpdateValue
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user