优化提交预检、废卡按钮置灰与等待超时提示

This commit is contained in:
24kycj
2026-09-09 23:45:25 +08:00
parent ac566846c9
commit 9ab1bcbd5e
25 changed files with 1442 additions and 100 deletions
+10 -1
View File
@@ -2,6 +2,7 @@ import { resolve } from 'path'
import { readFileSync } from 'fs'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import vue from '@vitejs/plugin-vue'
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
const pkg = JSON.parse(readFileSync(resolve('package.json'), 'utf-8')) as { version: string }
@@ -25,6 +26,14 @@ export default defineConfig({
define: {
__APP_VERSION__: JSON.stringify(pkg.version)
},
plugins: [vue()]
plugins: [
vue(),
// 构建时预编译多语言消息 + 使用 vue-i18n runtime 构建,
// 避免运行时 new Function() 编译消息(会被 CSP script-src 'self' 拦截导致白屏)
VueI18nPlugin({
include: [resolve('src/renderer/src/i18n/locales/**')],
runtimeOnly: true
})
]
}
})