diff --git a/docs/部署-本地打包丢文件问题与修复.md b/docs/部署-本地打包丢文件问题与修复.md new file mode 100644 index 00000000..c497cb90 --- /dev/null +++ b/docs/部署-本地打包丢文件问题与修复.md @@ -0,0 +1,83 @@ +# 部署-本地打包丢文件问题与修复 + +## 现象 + +`npm run deploy` 在本地构建、上传都正常,最后报: + +``` +❌ 新版本 index.html 缺失或为空,取消切换 +``` + +(来自 `scripts/remote/deploy.sh` 的打包完整性校验,`exit 1`;**线上版本未被切换,站点不受影响**。) + +服务器上留下一个残缺版本目录(如 `releases/v20261010_175526_29776/`): +有 `assets/`(743 个文件)、`favicon.ico`、`hikvision/`、`logo/`,**唯独没有 `index.html`**。 + +## 根因 + +**本地 `tar` 打包时把 `dist/index.html` 静默丢掉了**,上传的 `dist.tar.gz` 里根本没有它。 + +Windows 自带的 `tar.exe` 是 bsdtar(libarchive)。libarchive 有一条「不要把归档文件加进归档自己」的保护: + +```c +/* libarchive/archive_write_open_filename.c —— 打开输出文件时记录其身份 */ +if (S_ISREG(st.st_mode)) + archive_write_set_skip_file(a, st.st_dev, st.st_ino); + +/* libarchive/archive_write.c —— 写入每条 entry 时比对 */ +if (archive_entry_ino_is_set(entry) && + archive_entry_dev(entry) == (dev_t)a->skip_file_dev && + archive_entry_ino64(entry) == a->skip_file_ino) { + archive_set_error(&a->archive, EIO, "Can't add archive to itself"); + return (ARCHIVE_FAILED); /* 只让这一条 entry 失败,tar 退出码仍是 0 */ +} +``` + +Windows 下这组 `(dev, ino)` 文件身份信息不可靠:当**压缩包与被打包目录同处一个目录/同一个卷**时, +目录里某个普通文件会被误判成「归档自身」而被丢弃。实测丢的正好是 `dist/index.html`。 + +两个致命放大点: + +1. **退出码 0**:只给该 entry 返回 `ARCHIVE_FAILED`,不是致命错误 → `deploy.mjs` 里 `run('tar', ...)` 判不出来。 +2. **本地只校验 `dist/`,不校验压缩包** → 坏产物被上传,直到远端校验才失败。 + +## 复现与证据(本地实测) + +```powershell +# 压缩包放在项目目录里(旧写法)——丢文件,但退出码 0 +tar -czf dist.tar.gz -C dist . +# stderr: Can't add archive to itself +# 条目 780,无 ./index.html + +# 压缩包换到别的位置(或换个不会被误判的名字)——正常 +tar -czf "$env:TEMP\x.tar.gz" -C dist . +# 条目 781,含 ./index.html +``` + +两次归档**只差 `index.html` 一个文件**。 + +因为是文件身份信息「撞车」,取决于该目录的创建/删除历史(MFT 索引复用等),所以**表现为偶发**: +同样的命令换名/换目录/重跑就可能正常。 + +## 修复 + +改 `scripts/deploy.mjs`: + +1. **压缩包改放系统临时目录**(`os.tmpdir()`)——跨卷时 `dev` 不同,不可能再被误判; + 远端解压用的文件名仍是 `dist.tar.gz`(`TARBALL_NAME`),只是本地路径变了。 +2. **打包后回读压缩包校验**(`tar -tzf`),规则与远端 `deploy.sh` 一致: + `index.html` + `index.html` 里引用的所有 `/assets/*.js|css` 必须齐全;缺文件则**重新打包一次**,仍缺才中止。 +3. 本地 `index.html` 校验补上「非空」判断。 + +另外新增两个排查开关(不改线上行为): + +```bash +npm run deploy -- --pack-only # 构建 + 打包 + 校验,不上传 +npm run deploy -- --pack-only --skip-build # 复用已有 dist,只验证打包 +``` + +## 排查/验证手法 + +- 看压缩包内容:`tar -tzf <归档> | findstr index.html`(**必须确认有此条目**) +- 看到 `Can't add archive to itself` 警告即为本条问题的特征 +- 远端校验失败留下的版本目录可安全删除(脚本会按 KEEP 数量自然淘汰,不影响 `current`) diff --git a/scripts/deploy.mjs b/scripts/deploy.mjs index b35cce5c..c2da05ab 100644 --- a/scripts/deploy.mjs +++ b/scripts/deploy.mjs @@ -6,6 +6,8 @@ * 依赖本机已安装:ssh、scp、tar(Windows 10 1803+ 自带 OpenSSH 客户端与 bsdtar)。 * * 用法:npm run deploy + * npm run deploy -- --pack-only (只打包+校验,不上传,用于排查) + * npm run deploy -- --pack-only --skip-build */ import { spawnSync } from 'node:child_process'; import { existsSync, readFileSync, rmSync } from 'node:fs'; @@ -33,10 +35,23 @@ const LOCAL_DIST = path.resolve('dist'); const SSH_KEY = path.isAbsolute(config.sshKey) ? config.sshKey : path.join(os.homedir(), '.ssh', config.sshKey); const SSH_OPTS = ['-i', SSH_KEY, '-o', 'StrictHostKeyChecking=no']; const HOST = `${USER}@${IP}`; -const TARBALL = 'dist.tar.gz'; + +// 远端解压用的固定文件名(remote/deploy.sh 里写死了 dist.tar.gz) +const TARBALL_NAME = 'dist.tar.gz'; +// ⚠️ 本地压缩包必须放在项目目录之外(这里用系统临时目录)。 +// Windows 自带 bsdtar(tar.exe)有一条"不要把自己加进自己"的保护,按 (dev, ino) 判断文件身份; +// 而 Windows 下该身份信息不可靠:当压缩包与被打包目录同处一个目录/卷时, +// 某个普通文件会被误判为"归档自身"而被**静默丢弃**(实测丢 dist/index.html), +// 且 tar 退出码仍为 0,导致坏产物被上传、远端校验才报错。 +// 详见 docs/部署-本地打包丢文件问题与修复.md +const TARBALL = path.join(os.tmpdir(), `new3-dist-${process.pid}-${Date.now()}.tar.gz`); const NPM = process.platform === 'win32' ? 'npm.cmd' : 'npm'; +// --pack-only:只做构建+打包+校验,不上传(排查用);配合 --skip-build 复用已有 dist +const PACK_ONLY = process.argv.includes('--pack-only'); +const SKIP_BUILD = process.argv.includes('--skip-build'); + const RELEASE_NAME = `v${timestamp()}_${process.pid}`; // 版本号(带 PID,避免并发/重复发布冲突) const REMOTE_RELEASE = `${BASE_PATH}/releases/${RELEASE_NAME}`; @@ -73,24 +88,82 @@ function run(cmd, args, opts = {}) { if (res.status !== 0) process.exit(res.status ?? 1); } +/** + * 列出压缩包内的条目(去掉 tar 输出的 './' 前缀),失败直接中止。 + */ +function tarList(archive) { + const res = spawnSync('tar', ['-tzf', archive], { encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 }); + if (res.error || res.status !== 0) { + console.error(`❌ 读取压缩包内容失败: ${res.error ? res.error.message : (res.stderr || '').trim()}`); + process.exit(1); + } + return res.stdout + .split(/\r?\n/) + .filter(Boolean) + .map((name) => name.replace(/^\.\//, '')); +} + +/** + * 压缩 dist 并校验压缩包内容。 + * + * 不能只看 tar 的退出码:Windows bsdtar 丢文件时仍返回 0(见 TARBALL 处的说明), + * 因此这里按**与远端 deploy.sh 相同的规则**回读压缩包校验,缺文件则重新打包, + * 仍缺则本地中止,绝不把坏产物传上去。 + */ +function packDist() { + const html = readFileSync(path.join(LOCAL_DIST, 'index.html'), 'utf8'); + const refs = [...html.matchAll(/\/assets\/[A-Za-z0-9._-]+\.(?:js|css)/g)].map((m) => m[0].slice(1)); + + for (let attempt = 1; attempt <= 2; attempt++) { + rmSync(TARBALL, { force: true }); + run('tar', ['-czf', TARBALL, '-C', LOCAL_DIST, '.']); + + const entries = new Set(tarList(TARBALL)); + const missing = []; + if (!entries.has('index.html')) missing.push('index.html'); + for (const ref of refs) if (!entries.has(ref)) missing.push(ref); + + if (missing.length === 0) { + console.log(`📦 压缩包校验通过(${entries.size} 个条目,index.html + ${refs.length} 个入口资源齐全)`); + return; + } + + console.error(`⚠️ 压缩包缺少文件: ${[...new Set(missing)].join(', ')}(疑似 bsdtar 误判“归档自身”导致丢文件)`); + if (attempt === 2) { + console.error('❌ 重新打包后仍然缺文件,中止发布'); + process.exit(1); + } + console.log('🔁 重新打包…'); + } +} + console.log(`🚀 开始发布版本: ${RELEASE_NAME}`); try { // 1. 本地打包(失败立即中止,防止把坏产物发到线上) - run(NPM, ['run', 'build']); + if (!SKIP_BUILD) run(NPM, ['run', 'build']); // 2. 校验本地产物完整性 - if (!existsSync(path.join(LOCAL_DIST, 'index.html')) || !existsSync(path.join(LOCAL_DIST, 'assets'))) { - console.error('❌ 本地构建产物不完整(缺少 index.html 或 assets),中止发布'); + const localIndex = path.join(LOCAL_DIST, 'index.html'); + if (!existsSync(localIndex) || readFileSync(localIndex, 'utf8').trim() === '' || !existsSync(path.join(LOCAL_DIST, 'assets'))) { + console.error('❌ 本地构建产物不完整(缺少 index.html / assets 或 index.html 为空),中止发布'); process.exit(1); } - // 3. 压缩并上传到独立的新版本目录(全程不触碰当前运行目录) - run('tar', ['-czf', TARBALL, '-C', LOCAL_DIST, '.']); - run('ssh', [...SSH_OPTS, HOST, `mkdir -p '${REMOTE_RELEASE}'`]); - run('scp', [...SSH_OPTS, TARBALL, `${HOST}:${REMOTE_RELEASE}/${TARBALL}`]); + // 3. 压缩 + 校验压缩包(防 bsdtar 静默丢文件) + packDist(); - // 4. 远程:解压 → 校验 → 补齐旧资源 → 原子切换 → 健康检查 → 清理 + if (PACK_ONLY) { + rmSync(TARBALL, { force: true }); + console.log('✅ --pack-only:已完成构建与打包校验,未上传'); + process.exit(0); + } + + // 4. 上传到独立的新版本目录(全程不触碰当前运行目录) + run('ssh', [...SSH_OPTS, HOST, `mkdir -p '${REMOTE_RELEASE}'`]); + run('scp', [...SSH_OPTS, TARBALL, `${HOST}:${REMOTE_RELEASE}/${TARBALL_NAME}`]); + + // 5. 远程:解压 → 校验 → 补齐旧资源 → 原子切换 → 健康检查 → 清理 const remoteScript = readFileSync(path.join(__dirname, 'remote', 'deploy.sh'), 'utf8'); run( 'ssh', diff --git a/server.txt b/server.txt deleted file mode 100644 index e5e9b692..00000000 --- a/server.txt +++ /dev/null @@ -1 +0,0 @@ -[{"id": "text_1750000000001", "top": 6, "bold": true, "left": 0, "name": "出库单", "type": "text", "title": "出库单", "width": 148, "custom": true, "height": 10, "italic": false, "rotate": 0, "content": "出 库 单", "autoWrap": true, "fontSize": "18", "createdAt": "2026-06-14T00:00:00.000Z", "direction": "horizontal", "textAlign": "center", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "lineHeight": 10}, {"id": "line_1750000000002", "top": 18, "left": 10, "type": "line", "width": 128, "height": 0.5}, {"id": "text_1750000000003", "top": 21, "bold": false, "left": 10, "name": "发货单号", "type": "text", "title": "发货单号", "width": 26, "custom": true, "height": 7, "italic": false, "rotate": 0, "content": "发货单号:", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "direction": "horizontal", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "lineHeight": 6}, {"id": "144_1750000000004", "top": 21, "bold": false, "left": 36, "type": "text", "title": "出库单号", "width": 46, "height": 7, "italic": false, "rotate": 0, "content": "出库单号", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "delivery_order_code", "lineHeight": 6}, {"id": "text_1750000000005", "top": 21, "bold": false, "left": 84, "name": "波次号", "type": "text", "title": "波次号", "width": 20, "custom": true, "height": 7, "italic": false, "rotate": 0, "content": "波次号:", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "direction": "horizontal", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "lineHeight": 6}, {"id": "147_1750000000006", "top": 21, "bold": false, "left": 104, "type": "text", "title": "波次号", "width": 34, "height": 7, "italic": false, "rotate": 0, "content": "波次号", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "wave_no", "lineHeight": 6}, {"id": "text_1750000000007", "top": 29, "bold": false, "left": 10, "name": "创建时间", "type": "text", "title": "创建时间", "width": 26, "custom": true, "height": 7, "italic": false, "rotate": 0, "content": "创建时间:", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "direction": "horizontal", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "lineHeight": 6}, {"id": "157_1750000000008", "top": 29, "bold": false, "left": 36, "type": "text", "title": "创建时间", "width": 46, "height": 7, "italic": false, "rotate": 0, "content": "创建时间", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "create_at", "lineHeight": 6}, {"id": "text_1750000000009", "top": 29, "bold": false, "left": 84, "name": "快递公司", "type": "text", "title": "快递公司", "width": 26, "custom": true, "height": 7, "italic": false, "rotate": 0, "content": "快递公司:", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "direction": "horizontal", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "lineHeight": 6}, {"id": "154_1750000000010", "top": 29, "bold": false, "left": 110, "type": "text", "title": "物流公司", "width": 28, "height": 7, "italic": false, "rotate": 0, "content": "物流公司", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "logistics_name", "lineHeight": 6}, {"id": "text_1750000000011", "top": 37, "bold": false, "left": 10, "name": "运单号", "type": "text", "title": "运单号", "width": 20, "custom": true, "height": 7, "italic": false, "rotate": 0, "content": "运单号:", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "direction": "horizontal", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "lineHeight": 6}, {"id": "155_1750000000012", "top": 37, "bold": false, "left": 30, "type": "text", "title": "快递单号", "width": 78, "height": 7, "italic": false, "rotate": 0, "content": "快递单号", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "express_code", "lineHeight": 6}, {"id": "qrcode_1750000000013", "top": 4, "bold": false, "left": 120, "type": "qrcode", "title": "运单号", "width": 24, "height": 24, "italic": false, "rotate": 0, "content": "运单号", "autoWrap": true, "fontSize": "8", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "center", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "express_code", "lineHeight": 6}, {"id": "line_1750000000014", "top": 46, "left": 10, "type": "line", "width": 128, "height": 0.5}, {"id": "text_1750000000015", "top": 49, "bold": true, "left": 10, "name": "收件人信息", "type": "text", "title": "收件人信息", "width": 128, "custom": true, "height": 7, "italic": false, "rotate": 0, "content": "收件人信息", "autoWrap": true, "fontSize": "11", "createdAt": "2026-06-14T00:00:00.000Z", "direction": "horizontal", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "lineHeight": 6}, {"id": "text_1750000000016", "top": 57, "bold": false, "left": 10, "name": "收件人", "type": "text", "title": "收件人", "width": 20, "custom": true, "height": 7, "italic": false, "rotate": 0, "content": "收件人:", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "direction": "horizontal", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "lineHeight": 6}, {"id": "148_1750000000017", "top": 57, "bold": false, "left": 30, "type": "text", "title": "收件人", "width": 38, "height": 7, "italic": false, "rotate": 0, "content": "收件人", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "name", "lineHeight": 6}, {"id": "text_1750000000018", "top": 57, "bold": false, "left": 70, "name": "电话", "type": "text", "title": "电话", "width": 14, "custom": true, "height": 7, "italic": false, "rotate": 0, "content": "电话:", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "direction": "horizontal", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "lineHeight": 6}, {"id": "149_1750000000019", "top": 57, "bold": false, "left": 84, "type": "text", "title": "手机号", "width": 54, "height": 7, "italic": false, "rotate": 0, "content": "手机号", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "mobile", "lineHeight": 6}, {"id": "text_1750000000020", "top": 65, "bold": false, "left": 10, "name": "地址", "type": "text", "title": "地址", "width": 14, "custom": true, "height": 7, "italic": false, "rotate": 0, "content": "地址:", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "direction": "horizontal", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "lineHeight": 6}, {"id": "150_1750000000021", "top": 65, "bold": false, "left": 24, "type": "text", "title": "省", "width": 18, "height": 7, "italic": false, "rotate": 0, "content": "省", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "province", "lineHeight": 6}, {"id": "151_1750000000022", "top": 65, "bold": false, "left": 42, "type": "text", "title": "市", "width": 18, "height": 7, "italic": false, "rotate": 0, "content": "市", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "city", "lineHeight": 6}, {"id": "152_1750000000023", "top": 65, "bold": false, "left": 60, "type": "text", "title": "区", "width": 18, "height": 7, "italic": false, "rotate": 0, "content": "区", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "area", "lineHeight": 6}, {"id": "153_1750000000024", "top": 65, "bold": false, "left": 78, "type": "text", "title": "详细地址", "width": 60, "height": 7, "italic": false, "rotate": 0, "content": "详细地址", "autoWrap": true, "fontSize": "10", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "detail_address", "lineHeight": 6}, {"id": "line_1750000000025", "top": 74, "left": 10, "type": "line", "width": 128, "height": 0.5}, {"id": "table_1750000000026", "top": 77, "left": 10, "name": "table", "rows": [{"id": "159_1750000000027", "bold": false, "type": "text", "title": "商品编码", "width": 22, "height": 6, "italic": false, "rotate": 0, "content": "商品编码", "autoWrap": true, "fontSize": "9", "textAlign": "left", "underline": false, "field_code": "item_code", "lineHeight": 6}, {"id": "160_1750000000028", "bold": false, "type": "text", "title": "商品名称", "width": 40, "height": 6, "italic": false, "rotate": 0, "content": "商品名称", "autoWrap": true, "fontSize": "9", "textAlign": "left", "underline": false, "field_code": "item_name", "lineHeight": 6}, {"id": "161_1750000000029", "bold": false, "type": "text", "title": "数量", "width": 18, "height": 6, "italic": false, "rotate": 0, "content": "数量", "autoWrap": true, "fontSize": "9", "textAlign": "left", "underline": false, "field_code": "plan_qty", "lineHeight": 6}, {"id": "162_1750000000030", "bold": false, "type": "text", "title": "单价", "width": 20, "height": 6, "italic": false, "rotate": 0, "content": "单价", "autoWrap": true, "fontSize": "9", "textAlign": "left", "underline": false, "field_code": "actual_price", "lineHeight": 6}, {"id": "163_1750000000031", "bold": false, "type": "text", "title": "备注", "width": 28, "height": 6, "italic": false, "rotate": 0, "content": "备注", "autoWrap": true, "fontSize": "9", "textAlign": "left", "underline": false, "field_code": "detail_remark", "lineHeight": 6}], "type": "table", "width": 128, "height": 75, "createdAt": "2026-06-14T00:00:00.000Z", "rowHeight": 6, "updatedAt": "2026-06-14T00:00:00.000Z", "headerHeight": 6}, {"id": "line_1750000000032", "top": 154, "left": 10, "type": "line", "width": 128, "height": 0.5}, {"id": "text_1750000000033", "top": 158, "bold": false, "left": 10, "name": "备注", "type": "text", "title": "备注", "width": 14, "custom": true, "height": 7, "italic": false, "rotate": 0, "content": "备注:", "autoWrap": true, "fontSize": "9", "createdAt": "2026-06-14T00:00:00.000Z", "direction": "horizontal", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "lineHeight": 6}, {"id": "158_1750000000034", "top": 158, "bold": false, "left": 24, "type": "text", "title": "备注", "width": 114, "height": 7, "italic": false, "rotate": 0, "content": "备注", "autoWrap": true, "fontSize": "9", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "remark", "lineHeight": 6}, {"id": "text_printtime_label", "top": 166, "bold": false, "left": 10, "name": "打印时间", "type": "text", "title": "打印时间", "width": 26, "custom": true, "height": 7, "italic": false, "rotate": 0, "content": "打印时间:", "autoWrap": true, "fontSize": "9", "createdAt": "2026-06-14T00:00:00.000Z", "direction": "horizontal", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "lineHeight": 6}, {"id": "164_printtime", "top": 166, "bold": false, "left": 36, "type": "text", "title": "打印时间", "width": 102, "height": 7, "italic": false, "rotate": 0, "content": "打印时间", "autoWrap": true, "fontSize": "9", "createdAt": "2026-06-14T00:00:00.000Z", "textAlign": "left", "underline": false, "updatedAt": "2026-06-14T00:00:00.000Z", "field_code": "print_time", "lineHeight": 6}] \ No newline at end of file diff --git a/src/cloc-2.10.exe b/src/cloc-2.10.exe deleted file mode 100644 index 1a1c6935..00000000 Binary files a/src/cloc-2.10.exe and /dev/null differ diff --git a/src/components/UpperTable/MoreSettingsDialog.vue b/src/components/UpperTable/MoreSettingsDialog.vue index 613706cd..e4ba37a4 100644 --- a/src/components/UpperTable/MoreSettingsDialog.vue +++ b/src/components/UpperTable/MoreSettingsDialog.vue @@ -2,8 +2,8 @@ 更多设置表单 - 由 UpperTable「字段设置」中的「更多设置」按钮打开 - 表格工作模式(原字段设置工具栏内嵌的 radio,迁移至此) - - 界面显示(浏览器 localStorage 持久化选项:Scan-box 模式 / 工具栏按钮模式 / 快捷键区域 / 页面布局) - - 页面缓存 / tab 缓存分类(开关 / 最大缓存数量 / 应用范围) + - 界面显示(浏览器 localStorage 持久化选项:Scan-box 模式 / 工具栏按钮模式 / 快捷键区域) + - 页面缓存 / tab 缓存分类(开关 / 最大缓存数量) - 存储:experimental_{userId}_{roleId}(experimental store)、settings_{userId}_{roleId}(settings store) -->