From 9bc4e481e589fee95521a811374916afb3a38165 Mon Sep 17 00:00:00 2001 From: fhysy <1149505133@qq.com> Date: Fri, 20 Jun 2025 17:46:24 +0800 Subject: [PATCH] =?UTF-8?q?build(electron):=20=E6=9B=B4=E6=96=B0=E8=BD=AF?= =?UTF-8?q?=E4=BB=B6=E7=89=88=E6=9C=AC=E5=92=8C=E7=8E=AF=E5=A2=83=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除环境变量 VITE_APP_VERSION 的定义和使用 - 将软件版本从 1.0.9 修改为 1.0.0 - 调整方案列表背景色从 #ccc 改为 #ddd --- electron.vite.config.mjs | 4 ---- package.json | 2 +- src/renderer/src/views/calibration/index.vue | 5 +---- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/electron.vite.config.mjs b/electron.vite.config.mjs index 29774e3..3e72548 100644 --- a/electron.vite.config.mjs +++ b/electron.vite.config.mjs @@ -2,12 +2,8 @@ import { resolve } from 'path' import { defineConfig, externalizeDepsPlugin } from 'electron-vite' import vue from '@vitejs/plugin-vue' import VueDevTools from 'vite-plugin-vue-devtools'; -import pkg from './package.json' export default defineConfig({ - define: { - 'import.meta.env.VITE_APP_VERSION': JSON.stringify(pkg.version) - }, main: { plugins: [externalizeDepsPlugin()] }, diff --git a/package.json b/package.json index 1cbba41..7c7ee3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calibration-pc", - "version": "1.0.9", + "version": "1.0.0", "description": "谷云开发部开发的断路器标定软件", "main": "./out/main/index.js", "author": "example.com", diff --git a/src/renderer/src/views/calibration/index.vue b/src/renderer/src/views/calibration/index.vue index 18e7686..bd09e57 100644 --- a/src/renderer/src/views/calibration/index.vue +++ b/src/renderer/src/views/calibration/index.vue @@ -273,9 +273,6 @@ const devices = ref([]); const isScroll = ref(true); const logs = ref([]); const version = ref('V1.0.0'); -// 直接使用环境变量 -// const versionTxt = import.meta.env.VITE_APP_VERSION || 'dev'; -// version.value = versionTxt; const loading = ref(true); const isOpenLog = ref(false); @@ -707,7 +704,7 @@ const deleteCalibrationStep = index => { flex-shrink: 0; } .scheme-list { - background: #ccc; + background: #ddd; padding: 10px; font-size: 13px; display: flex;