diff --git a/.env b/.env index 9e1fee7..0a71cfc 100644 --- a/.env +++ b/.env @@ -50,3 +50,5 @@ VITE_SOURCE_MAP=N VITE_STORAGE_PREFIX= VITE_ICONIFY_URL=/iconify + +VITE_UPDATE_NOTIFY=N diff --git a/.env.prod b/.env.prod index d69fded..760f010 100644 --- a/.env.prod +++ b/.env.prod @@ -4,3 +4,5 @@ VITE_ICONIFY_URL=/snail-job/iconify # backend service base url, prod environment VITE_SERVICE_BASE_URL=/snail-job + +VITE_UPDATE_NOTIFY=N diff --git a/.env.test b/.env.test index 952c067..2cc5853 100644 --- a/.env.test +++ b/.env.test @@ -2,3 +2,5 @@ VITE_BASE_URL=/ # backend service base url, test environment VITE_SERVICE_BASE_URL=http://localhost:8080/snail-job + +VITE_UPDATE_NOTIFY=N diff --git a/src/components/common/status-switch.vue b/src/components/common/status-switch.vue index cabaf9d..60bab0c 100644 --- a/src/components/common/status-switch.vue +++ b/src/components/common/status-switch.vue @@ -5,6 +5,10 @@ defineOptions({ name: 'StatusSwitch' }); +const props = defineProps({ + disabled: Boolean +}); + const modelValue = defineModel('value', { default: 0 }); interface Emits { @@ -31,6 +35,7 @@ const handleUpdateValue = (value: Api.Common.EnableStatusNumber) => { :rubber-band="false" :checked-value="1" :unchecked-value="0" + :disabled="props.disabled" @update:value="handleUpdateValue" /> diff --git a/src/plugins/app.ts b/src/plugins/app.ts index 8376c9e..ac8dc24 100644 --- a/src/plugins/app.ts +++ b/src/plugins/app.ts @@ -6,7 +6,8 @@ export function setupAppVersionNotification() { document.addEventListener('visibilitychange', async () => { const buildTime = await getHtmlBuildTime(); - if (buildTime !== BUILD_TIME && document.visibilityState === 'visible') { + const { VITE_UPDATE_NOTIFY } = import.meta.env; + if (buildTime !== BUILD_TIME && document.visibilityState === 'visible' && VITE_UPDATE_NOTIFY === 'Y') { const n = window.$notification?.create({ title: $t('system.updateTitle'), content: $t('system.updateContent'), diff --git a/src/views/group/index.vue b/src/views/group/index.vue index 32f35f5..ccc0d42 100644 --- a/src/views/group/index.vue +++ b/src/views/group/index.vue @@ -75,8 +75,9 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP } callback(); }; - - return ; + return ( + + ); } }, { diff --git a/src/views/notify/recipient/index.vue b/src/views/notify/recipient/index.vue index 44e422a..c6a875c 100644 --- a/src/views/notify/recipient/index.vue +++ b/src/views/notify/recipient/index.vue @@ -85,7 +85,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP width: 130, render: row => (
- edit(row.id!)}> + edit(row.id!)}> {$t('common.edit')} {hasAuth('R_ADMIN') ? (