Skip to content

Commit 9ef1261

Browse files
committed
修复各种通知bug
1 parent 405021f commit 9ef1261

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

dev-dist/sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ define(['./workbox-c6a197bf'], (function (workbox) { 'use strict';
8080
*/
8181
workbox.precacheAndRoute([{
8282
"url": "/index.html",
83-
"revision": "0.jb1rigjjheg"
83+
"revision": "0.k0mf6u0htl"
8484
}], {});
8585
workbox.cleanupOutdatedCaches();
8686
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("/index.html"), {

src/components/auth/SudoDialog.vue

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,13 @@ const handleSuccess = (data) => {
9090
};
9191
9292
const handleCancel = () => {
93-
if (!props.persistent) {
94-
dialogVisible.value = false;
95-
emit('cancel');
93+
dialogVisible.value = false;
94+
emit('cancel');
9695
97-
// 清理认证组件
98-
nextTick(() => {
99-
authComponent.value?.cleanup?.();
100-
});
101-
}
96+
// 清理认证组件
97+
nextTick(() => {
98+
authComponent.value?.cleanup?.();
99+
});
102100
};
103101
104102
const handleError = (error) => {

src/components/auth/SudoManager.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ export default {
173173
resolve(data.sudo_token);
174174
}
175175
this.pendingRequests.clear();
176+
this.showDialog = false;
176177
},
177178
178179
handleAuthCancel() {
@@ -184,6 +185,7 @@ export default {
184185
reject(error);
185186
}
186187
this.pendingRequests.clear();
188+
this.showDialog = false;
187189
},
188190
189191
handleAuthError(error) {
@@ -195,6 +197,7 @@ export default {
195197
reject(authError);
196198
}
197199
this.pendingRequests.clear();
200+
this.showDialog = false;
198201
}
199202
},
200203

src/components/auth/UnifiedAuth.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@
293293
variant="tonal"
294294
class="mr-2"
295295
:disabled="loading"
296-
:append-icon="forceMode ? 'mdi-refresh' : 'mdi-close'"
296+
297297
>
298298
取消
299299
</v-btn>
@@ -633,10 +633,8 @@ export default {
633633
},
634634
635635
handleCancel() {
636-
if (this.forceMode) {
637-
window.location.reload();
638-
return;
639-
}
636+
// 统一触发 cancel 事件,由父组件决定如何响应(例如关闭对话框)
637+
// 在 forceMode 下,父组件可以根据此事件来显示特定的提示信息
640638
this.$emit('cancel');
641639
},
642640

0 commit comments

Comments
 (0)