pref: remove unused import
This commit is contained in:
parent
f5e61ec9ff
commit
4809a1eb85
@ -6,7 +6,7 @@
|
||||
</el-icon>
|
||||
</template>
|
||||
<template #append>
|
||||
<el-button v-if="model.verifyImage === 'none'" @click="getVerifyImage">获取验证码</el-button>
|
||||
<el-button v-if="model.verifyImage === 'none'" @click="updateVerifyImage">获取验证码</el-button>
|
||||
<el-icon v-else-if="model.verifyImage === 'fetching'" class="is-loading">
|
||||
<icon-ep-loading />
|
||||
</el-icon>
|
||||
@ -18,7 +18,7 @@
|
||||
alt="验证码"
|
||||
class="verify-image"
|
||||
draggable="false"
|
||||
@click="getVerifyImage"
|
||||
@click="updateVerifyImage"
|
||||
/>
|
||||
</template>
|
||||
</el-popover>
|
||||
@ -84,7 +84,7 @@ async function cooldown() {
|
||||
}
|
||||
}
|
||||
|
||||
async function getVerifyImage() {
|
||||
async function updateVerifyImage() {
|
||||
if (model.value.verifyImage === 'fetching' || !canRefresh.value) {
|
||||
return;
|
||||
}
|
||||
@ -106,7 +106,7 @@ async function getVerifyImage() {
|
||||
key: key,
|
||||
img
|
||||
};
|
||||
cooldown();
|
||||
cooldown().then();
|
||||
succeed = true;
|
||||
} catch (e) {
|
||||
if (e instanceof AxiosError) {
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useUserStore } from '@/stores';
|
||||
import { type PageErrorReason, usePageStore } from '@/stores/page';
|
||||
import { IdPool, waitRef } from '@/utils';
|
||||
import { useThrottleFn } from '@vueuse/core';
|
||||
import { toRef } from 'vue';
|
||||
import { IdPool } from '@/utils';
|
||||
import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router';
|
||||
import { RoutePermissionId } from './permissions';
|
||||
|
||||
@ -90,7 +88,7 @@ router.beforeEach(async (to, from) => {
|
||||
case 'initializing':
|
||||
return false;
|
||||
}
|
||||
if (permissionId !== undefined) {
|
||||
if (permissionId) {
|
||||
if (userStore.hasPermission(permissionId)) {
|
||||
return true;
|
||||
} else {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { reactive, readonly, ref } from 'vue';
|
||||
import { reactive, ref } from 'vue';
|
||||
|
||||
export type BackgroundURL = string | undefined;
|
||||
export type BackgroundOptions = {
|
||||
@ -71,7 +71,7 @@ export const useBackgroundStore = defineStore('background', () => {
|
||||
}
|
||||
|
||||
return {
|
||||
taskQueue: readonly(taskQueue),
|
||||
taskQueue: taskQueue,
|
||||
getURL,
|
||||
addURL,
|
||||
newCompId,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import axiosInstance, { type RawResp } from '@/api';
|
||||
import type { UserInfo } from '@/schemas';
|
||||
import { userInfoResponseSchema, type idAndNameSchema } from '@/schemas';
|
||||
import { type idAndNameSchema, userInfoResponseSchema } from '@/schemas';
|
||||
import { errorMessage } from '@/utils';
|
||||
import { StorageSerializers, useLocalStorage } from '@vueuse/core';
|
||||
import { AxiosError } from 'axios';
|
||||
|
@ -87,10 +87,8 @@ onBeforeMount(async () => {
|
||||
return;
|
||||
}
|
||||
userInfo.value = userInfoResponse.data;
|
||||
if (!userInfo.value.avatar) {
|
||||
}
|
||||
} catch (e) {
|
||||
} finally {
|
||||
if (!userInfo.value.avatar) { /* empty */ }
|
||||
} catch (e) { /* empty */ } finally {
|
||||
initialized.value = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user