fix: 补充缺失代码导致的打包异常
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
<script lang="ts" setup>
|
||||
import { GlobalFooter } from 'antdv-pro-layout';
|
||||
import { Modal, message } from 'ant-design-vue/lib';
|
||||
import { onMounted, reactive, toRaw } from 'vue';
|
||||
import { computed, onMounted, reactive, toRaw } from 'vue';
|
||||
import { register } from '@/api/login';
|
||||
import { regExpPasswd, regExpUserName } from '@/utils/regular-utils';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
const { t } = useI18n();
|
||||
import { parseUrlPath } from '@/plugins/file-static-url';
|
||||
const { t, currentLocale } = useI18n();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const appStore = useAppStore();
|
||||
@@ -70,6 +71,22 @@ function fnFinish() {
|
||||
});
|
||||
}
|
||||
|
||||
// LOGO地址
|
||||
const logoUrl = computed(() => {
|
||||
let url =
|
||||
appStore.logoType === 'brand'
|
||||
? parseUrlPath(appStore.filePathBrand)
|
||||
: parseUrlPath(appStore.filePathIcon);
|
||||
|
||||
if (url.indexOf('{language}') === -1) {
|
||||
return url;
|
||||
}
|
||||
// 语言参数替换
|
||||
const local = currentLocale.value;
|
||||
const lang = local.split('_')[0];
|
||||
return url.replace('{language}', lang);
|
||||
});
|
||||
|
||||
/**
|
||||
* 国际化翻译转换
|
||||
*/
|
||||
@@ -92,11 +109,11 @@ onMounted(() => {
|
||||
<div class="header">
|
||||
<a href="/" target="_self">
|
||||
<template v-if="appStore.logoType === 'icon'">
|
||||
<img :src="appStore.getLOGOIcon" class="logo" alt="logo" />
|
||||
<img :src="logoUrl" class="logo" alt="logo" />
|
||||
<span class="title">{{ appStore.appName }}</span>
|
||||
</template>
|
||||
<template v-if="appStore.logoType === 'brand'">
|
||||
<img :src="appStore.getLOGOBrand" class="logo" alt="logo" />
|
||||
<img :src="logoUrl" class="logo" alt="logo" />
|
||||
</template>
|
||||
</a>
|
||||
</div>
|
||||
@@ -205,7 +222,6 @@ onMounted(() => {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
padding: 110px 0 144px;
|
||||
background-image: url(../assets/background.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center 110px;
|
||||
background-size: 100%;
|
||||
|
||||
Reference in New Issue
Block a user