docs: 部署编排与文档(仅服务,管理/页面自研)

This commit is contained in:
2026-08-23 22:39:38 +08:00
parent a92f767715
commit 8eb1b3941c
64 changed files with 25952 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
const { contextBridge } = require('electron');
// 获取数据目录路径(用于显示给用户)
// 优先使用主进程设置的真实路径,如果没有则回退到手动拼接
function getDataDirPath() {
// 如果主进程已设置真实路径,直接使用
if (process.env.ELECTRON_DATA_DIR) {
return process.env.ELECTRON_DATA_DIR;
}
}
contextBridge.exposeInMainWorld('electron', {
isElectron: true,
version: process.versions.electron,
platform: process.platform,
versions: process.versions,
dataDir: getDataDirPath()
});