From ff583bc85307ee3ec08e266a464ec26656069ad7 Mon Sep 17 00:00:00 2001 From: opensnail <598092184@qq.com> Date: Sat, 8 Jun 2024 09:49:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(sj=5F1.0.0):=20=E4=BC=98=E5=8C=96=E7=BB=84?= =?UTF-8?q?=E6=99=AE=E9=80=9A=E7=94=A8=E6=88=B7=E6=9B=B4=E6=96=B0=E6=9D=83?= =?UTF-8?q?=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 ++ .env.prod | 2 ++ .env.test | 2 ++ src/components/common/status-switch.vue | 5 +++++ src/plugins/app.ts | 3 ++- src/views/group/index.vue | 5 +++-- src/views/notify/recipient/index.vue | 2 +- 7 files changed, 17 insertions(+), 4 deletions(-) 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') ? (