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>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
<img v-else src="@/assets/logo/MaxKB-logo.svg" :height="height" />
|
<img src="@/assets/logo/MaxKB-logo.svg" :height="height" />
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -75,7 +75,7 @@ const isDefaultTheme = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const fileURL = computed(() => {
|
const fileURL = computed(() => {
|
||||||
if (user.themeInfo?.loginLogo) {
|
if (user.themeInfo) {
|
||||||
if (typeof user.themeInfo?.loginLogo === 'string') {
|
if (typeof user.themeInfo?.loginLogo === 'string') {
|
||||||
return user.themeInfo?.loginLogo
|
return user.themeInfo?.loginLogo
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { hasPermission } from '@/utils/permission/index'
|
import { hasPermission } from '@/utils/permission/index'
|
||||||
|
import NProgress from 'nprogress'
|
||||||
import {
|
import {
|
||||||
createRouter,
|
createRouter,
|
||||||
createWebHistory,
|
createWebHistory,
|
||||||
@ -9,6 +10,7 @@ import {
|
|||||||
} from 'vue-router'
|
} from 'vue-router'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
import { routes } from '@/router/routes'
|
import { routes } from '@/router/routes'
|
||||||
|
NProgress.configure({ showSpinner: false, speed: 500, minimum: 0.3 })
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(import.meta.env.BASE_URL),
|
history: createWebHistory(import.meta.env.BASE_URL),
|
||||||
routes: routes
|
routes: routes
|
||||||
@ -17,6 +19,7 @@ const router = createRouter({
|
|||||||
// 路由前置拦截器
|
// 路由前置拦截器
|
||||||
router.beforeEach(
|
router.beforeEach(
|
||||||
async (to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext) => {
|
async (to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext) => {
|
||||||
|
NProgress.start()
|
||||||
if (to.name === '404') {
|
if (to.name === '404') {
|
||||||
next()
|
next()
|
||||||
return
|
return
|
||||||
@ -48,6 +51,9 @@ router.beforeEach(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
router.afterEach(() => {
|
||||||
|
NProgress.done()
|
||||||
|
})
|
||||||
|
|
||||||
export const getChildRouteListByPathAndName = (path: any, name?: RouteRecordName | any) => {
|
export const getChildRouteListByPathAndName = (path: any, name?: RouteRecordName | any) => {
|
||||||
return getChildRouteList(routes, path, name)
|
return getChildRouteList(routes, path, name)
|
||||||
|
|||||||
@ -11,7 +11,9 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
[v-cloak] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
html {
|
html {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
@ -96,7 +96,7 @@
|
|||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.dataset_setting.top_n"
|
v-model="form.dataset_setting.top_n"
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="100"
|
:max="10000"
|
||||||
:value-on-clear="1"
|
:value-on-clear="1"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
|
|||||||
@ -170,7 +170,7 @@
|
|||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="cloneForm.top_number"
|
v-model="cloneForm.top_number"
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="100"
|
:max="10000"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<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')">
|
<LoginContainer :subTitle="user.themeInfo?.slogan || $t('views.system.theme.defaultSlogan')">
|
||||||
<h2 class="mb-24" v-if="!showQrCodeTab">{{ loginMode || $t('views.login.title') }}</h2>
|
<h2 class="mb-24" v-if="!showQrCodeTab">{{ loginMode || $t('views.login.title') }}</h2>
|
||||||
<div v-if="!showQrCodeTab">
|
<div v-if="!showQrCodeTab">
|
||||||
@ -225,10 +225,10 @@ const login = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onBeforeMount(() => {
|
||||||
|
loading.value = true
|
||||||
user.asyncGetProfile().then((res) => {
|
user.asyncGetProfile().then((res) => {
|
||||||
if (user.isEnterprise()) {
|
if (user.isEnterprise()) {
|
||||||
loading.value = true
|
|
||||||
user
|
user
|
||||||
.getAuthType()
|
.getAuthType()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@ -261,6 +261,8 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => (loading.value = false))
|
.finally(() => (loading.value = false))
|
||||||
|
} else {
|
||||||
|
loading.value = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.top_n"
|
v-model="form.top_n"
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="100"
|
:max="10000"
|
||||||
:value-on-clear="1"
|
:value-on-clear="1"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user