File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,9 @@ VITE_SOURCE_MAP=N
4949# Used to differentiate storage across different domains
5050VITE_STORAGE_PREFIX = SOY-REACT_
5151
52+ # used to control whether the program automatically detects updates
53+ VITE_AUTOMATICALLY_DETECT_UPDATE = Y
54+
5255# backend service base url, test environment
5356VITE_SERVICE_BASE_URL = https://mock.apifox.cn/m1/3109515-0-default
5457
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ import { Button } from 'antd';
33import { $t } from '../locales' ;
44
55export function setupAppVersionNotification ( ) {
6+ const canAutoUpdateApp = import . meta. env . VITE_AUTOMATICALLY_DETECT_UPDATE === 'Y' ;
7+
8+ if ( ! canAutoUpdateApp ) return ;
9+
610 let isShow = false ;
711
812 document . addEventListener ( 'visibilitychange' , async ( ) => {
Original file line number Diff line number Diff line change @@ -105,5 +105,7 @@ declare namespace Env {
105105 readonly VITE_ICONIFY_URL ?: string ;
106106 /** Used to differentiate storage across different domains */
107107 readonly VITE_STORAGE_PREFIX ?: string ;
108+ /** Whether to automatically detect updates after configuring application packaging */
109+ readonly VITE_AUTOMATICALLY_DETECT_UPDATE ?: CommonType . YesOrNo ;
108110 }
109111}
You can’t perform that action at this time.
0 commit comments