mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
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:
parent
dd84da4add
commit
ee7cc8058f
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none !important;
|
||||
}
|
||||
html {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@
|
|||
<el-input-number
|
||||
v-model="cloneForm.top_number"
|
||||
:min="1"
|
||||
:max="100"
|
||||
:max="10000"
|
||||
controls-position="right"
|
||||
class="w-full"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue