diff --git a/DEV.md b/DEV.md index d61a55875..b5dad6d93 100644 --- a/DEV.md +++ b/DEV.md @@ -7,15 +7,19 @@ ## NPM dependencies +Install pnpm + +`npm install -g pnpm` + In China, it may be necessary to set the Electron mirror environment variable: -* macOS/Linux: ELECTRON_MIRROR="https://cnpmjs.org/mirrors/electron/" npm install electron@14.2.5 -D +* macOS/Linux: ELECTRON_MIRROR="https://cnpmjs.org/mirrors/electron/" pnpm install electron@14.2.5 -D * Windows: `SET ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/` NPM mirror: -* May need to use mirror repository in China `npm --registry https://r.cnpmjs.org/ i -D --sass_binary_site=https://cnpmjs.org/mirrors/node-sass/` -* Revert to using official repository `npm --registry https://registry.npmjs.org i -D` +* May need to use mirror repository in China `pnpm --registry https://r.cnpmjs.org/ i -D --sass_binary_site=https://cnpmjs.org/mirrors/node-sass/` +* Revert to using official repository `pnpm --registry https://registry.npmjs.org i` ## Kernel @@ -44,4 +48,4 @@ On the desktop, go to the app folder to compile and run: * `npm run dev` * `npm run start` -For the mobile-end, please refer to the corresponding project repository. \ No newline at end of file +For the mobile-end, please refer to the corresponding project repository. diff --git a/DEV_zh_CN.md b/DEV_zh_CN.md index f653ac76b..91d65d901 100644 --- a/DEV_zh_CN.md +++ b/DEV_zh_CN.md @@ -7,15 +7,19 @@ ## NPM 依赖 +安装 pnpm + +`npm install -g pnpm` + 在中国可能需要设置 Electron 镜像环境变量: -* macOS/Linux:ELECTRON_MIRROR="https://cnpmjs.org/mirrors/electron/" npm install electron@14.2.5 -D +* macOS/Linux:ELECTRON_MIRROR="https://cnpmjs.org/mirrors/electron/" pnpm install electron@14.2.5 -D * Windows: `SET ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/` NPM 镜像: -* 在中国可能需要使用镜像仓库 `npm --registry https://r.cnpmjs.org/ i -D --sass_binary_site=https://cnpmjs.org/mirrors/node-sass/` -* 恢复使用官方仓库 `npm --registry https://registry.npmjs.org i -D` +* 在中国可能需要使用镜像仓库 `pnpm --registry https://r.cnpmjs.org/ i -D --sass_binary_site=https://cnpmjs.org/mirrors/node-sass/` +* 恢复使用官方仓库 `pnpm --registry https://registry.npmjs.org i` ## 内核 diff --git a/app/src/layout/dock/Bookmark.ts b/app/src/layout/dock/Bookmark.ts index f23191249..da372ab32 100644 --- a/app/src/layout/dock/Bookmark.ts +++ b/app/src/layout/dock/Bookmark.ts @@ -77,7 +77,7 @@ export class Bookmark extends Model { element: this.element.lastElementChild as HTMLElement, data: null, click(element: HTMLElement) { - const id = element.getAttribute("data-node-id") + const id = element.getAttribute("data-node-id"); fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => { openFileById({ id, diff --git a/app/src/util/Tree.ts b/app/src/util/Tree.ts index acc05d115..d90690531 100644 --- a/app/src/util/Tree.ts +++ b/app/src/util/Tree.ts @@ -104,9 +104,9 @@ ${item.label ? "data-label='" + item.label + "'" : ""}> } let iconHTML; if (item.type === "NodeDocument") { - iconHTML = `${unicode2Emoji(item.ial.icon || Constants.SIYUAN_IMAGE_FILE)}` + iconHTML = `${unicode2Emoji(item.ial.icon || Constants.SIYUAN_IMAGE_FILE)}`; } else { - iconHTML = `` + iconHTML = ``; } html += `