feat: 增加升级说明页,退出弹窗默认选退出系统
This commit is contained in:
@@ -15,7 +15,7 @@ const page = ref<PageKey>(pageFromHash());
|
||||
const collapsed = ref(window.innerWidth < 800);
|
||||
const holdOpen = ref(false);
|
||||
const leaveOpen = ref(false);
|
||||
const leaveChoice = ref<"logout" | "revoke" | null>(null);
|
||||
const leaveChoice = ref<"logout" | "revoke">("logout");
|
||||
const pages = new Set<PageKey>(["home", "history", "exams", "trainings"]);
|
||||
|
||||
function hashName() {
|
||||
@@ -79,7 +79,7 @@ function onMenu(key: string) {
|
||||
}
|
||||
|
||||
function openLeave() {
|
||||
leaveChoice.value = null;
|
||||
leaveChoice.value = "logout";
|
||||
leaveOpen.value = true;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,6 @@ function confirmLeave() {
|
||||
<n-button @click="leaveOpen = false">取消</n-button>
|
||||
<n-button
|
||||
:type="leaveChoice === 'revoke' ? 'error' : 'primary'"
|
||||
:disabled="leaveChoice === null"
|
||||
@click="confirmLeave"
|
||||
>
|
||||
{{ leaveChoice === "revoke" ? "注销账号" : "退出系统" }}
|
||||
|
||||
Reference in New Issue
Block a user