fix: 登录失效后回到登录页并只提示一次
This commit is contained in:
@@ -6,6 +6,7 @@ import { ApiError } from "../../shared/http";
|
||||
import { loadCaptcha, loadSaved, login, refreshCaptcha, resumeSaved, sendSms, type UserInfo } from "./api";
|
||||
import { isDark, toggleTheme } from "../../shared/theme";
|
||||
|
||||
defineProps<{ notice?: string }>();
|
||||
const emit = defineEmits<{ success: [user: UserInfo] }>();
|
||||
|
||||
const ready = ref(false);
|
||||
@@ -186,6 +187,7 @@ onUnmounted(stopCountdown);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<n-alert v-if="notice" type="warning" style="margin-bottom: 12px">{{ notice }}</n-alert>
|
||||
<n-spin :show="!ready && !offline">
|
||||
<n-alert v-if="!ready" type="warning" style="margin-bottom: 12px">连接失败,正在重试。</n-alert>
|
||||
<n-alert v-else-if="offline" type="warning" style="margin-bottom: 12px">{{ offline }}</n-alert>
|
||||
|
||||
Reference in New Issue
Block a user