fix: [xpack]After replacing the logo,The original logo will flash(#2270)

* perf: Top N Segments increase to 10000

* fix: [xpack]After replacing the logo,The original logo will flash(#2270)
This commit is contained in:
wangdan-fit2cloud 2025-02-28 15:21:24 +08:00 committed by GitHub
parent dd84da4add
commit ee7cc8058f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 19 additions and 9 deletions

View File

@ -55,7 +55,7 @@
/>
</g>
</svg>
<img v-else src="@/assets/logo/MaxKB-logo.svg" :height="height" />
<img src="@/assets/logo/MaxKB-logo.svg" :height="height" />
</template>
</template>
<script setup lang="ts">
@ -75,7 +75,7 @@ const isDefaultTheme = computed(() => {
})
const fileURL = computed(() => {
if (user.themeInfo?.loginLogo) {
if (user.themeInfo) {
if (typeof user.themeInfo?.loginLogo === 'string') {
return user.themeInfo?.loginLogo
} else {

View File

@ -1,4 +1,5 @@
import { hasPermission } from '@/utils/permission/index'
import NProgress from 'nprogress'
import {
createRouter,
createWebHistory,
@ -9,6 +10,7 @@ import {
} from 'vue-router'
import useStore from '@/stores'
import { routes } from '@/router/routes'
NProgress.configure({ showSpinner: false, speed: 500, minimum: 0.3 })
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: routes
@ -17,6 +19,7 @@ const router = createRouter({
// 路由前置拦截器
router.beforeEach(
async (to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext) => {
NProgress.start()
if (to.name === '404') {
next()
return
@ -48,6 +51,9 @@ router.beforeEach(
}
}
)
router.afterEach(() => {
NProgress.done()
})
export const getChildRouteListByPathAndName = (path: any, name?: RouteRecordName | any) => {
return getChildRouteList(routes, path, name)

View File

@ -11,7 +11,9 @@
margin: 0;
padding: 0;
}
[v-cloak] {
display: none !important;
}
html {
height: 100%;
box-sizing: border-box;

View File

@ -96,7 +96,7 @@
<el-input-number
v-model="form.dataset_setting.top_n"
:min="1"
:max="100"
:max="10000"
:value-on-clear="1"
controls-position="right"
class="w-full"

View File

@ -170,7 +170,7 @@
<el-input-number
v-model="cloneForm.top_number"
:min="1"
:max="100"
:max="10000"
controls-position="right"
class="w-full"
/>

View File

@ -1,5 +1,5 @@
<template>
<login-layout v-if="user.isEnterprise() ? user.themeInfo : true" v-loading="loading">
<login-layout v-if="!loading" v-loading="loading">
<LoginContainer :subTitle="user.themeInfo?.slogan || $t('views.system.theme.defaultSlogan')">
<h2 class="mb-24" v-if="!showQrCodeTab">{{ loginMode || $t('views.login.title') }}</h2>
<div v-if="!showQrCodeTab">
@ -225,10 +225,10 @@ const login = () => {
})
}
onMounted(() => {
onBeforeMount(() => {
loading.value = true
user.asyncGetProfile().then((res) => {
if (user.isEnterprise()) {
loading.value = true
user
.getAuthType()
.then((res) => {
@ -261,6 +261,8 @@ onMounted(() => {
}
})
.finally(() => (loading.value = false))
} else {
loading.value = false
}
})
})

View File

@ -49,7 +49,7 @@
<el-input-number
v-model="form.top_n"
:min="1"
:max="100"
:max="10000"
:value-on-clear="1"
controls-position="right"
class="w-full"