mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-02 23:16:51 +00:00
减小页面体积
This commit is contained in:
@@ -87,12 +87,12 @@ export async function getPageWithRetry(id, from, retryAttempts = 3) {
|
||||
* 2.比如文件、视频、音频、url格式化
|
||||
* 3.代码块等元素兼容
|
||||
* @param {*} id 页面ID
|
||||
* @param {*} pageBlock 页面元素
|
||||
* @param {*} blockMap 页面元素
|
||||
* @param {*} slice 截取数量
|
||||
* @returns
|
||||
*/
|
||||
function filterPostBlocks(id, pageBlock, slice) {
|
||||
const clonePageBlock = deepClone(pageBlock)
|
||||
function filterPostBlocks(id, blockMap, slice) {
|
||||
const clonePageBlock = deepClone(blockMap)
|
||||
let count = 0
|
||||
|
||||
// 循环遍历文档的每个block
|
||||
@@ -132,14 +132,6 @@ function filterPostBlocks(id, pageBlock, slice) {
|
||||
const newUrl = `https://notion.so/signed/${encodeURIComponent(oldUrl)}?table=block&id=${b?.value?.id}`
|
||||
b.value.properties.source[0][0] = newUrl
|
||||
}
|
||||
|
||||
delete b?.role
|
||||
delete b?.value?.version
|
||||
delete b?.value?.created_by_table
|
||||
delete b?.value?.created_by_id
|
||||
delete b?.value?.last_edited_by_table
|
||||
delete b?.value?.last_edited_by_id
|
||||
delete b?.value?.space_id
|
||||
}
|
||||
|
||||
// 去掉不用的字段
|
||||
|
||||
Reference in New Issue
Block a user