fix: 解决应用安装快速跳转失败的问题 (#4235)

This commit is contained in:
zhengkunwang 2024-03-19 15:36:06 +08:00 committed by GitHub
parent d916f2ba6f
commit f6777d51b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 6 deletions

View File

@ -14,6 +14,6 @@ import { useRoute } from 'vue-router';
import { computed } from 'vue';
const key = computed(() => {
return useRoute().path + Math.random();
return useRoute()?.path + Math.random();
});
</script>

View File

@ -37,7 +37,7 @@
:label="service.label"
></el-option>
</el-select>
<span v-if="p.type === 'service' && p.services.length === 0">
<span v-if="p.type === 'service' && p.services.length === 0" class="ml-1.5">
<el-link type="primary" :underline="false" @click="toPage(p.key)">
{{ $t('app.toInstall') }}
</el-link>
@ -108,7 +108,6 @@ import { GetAppService } from '@/api/modules/app';
import { Rules } from '@/global/form-rules';
import { App } from '@/api/interface/app';
import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { getDBName } from '@/utils/util';
const router = useRouter();
@ -248,7 +247,7 @@ const changeService = (value: string, services: App.AppService[]) => {
};
const getLabel = (row: ParamObj): string => {
const language = useI18n().locale.value;
const language = localStorage.getItem('lang') || 'zh';
if (language == 'zh' || language == 'tw') {
return row.labelZh;
} else {

View File

@ -102,7 +102,7 @@
:label="$t('website.appInstalled')"
prop="appInstallId"
>
<el-select v-model="website.appInstallId">
<el-select v-model="website.appInstallId" class="p-w-200">
<el-option
v-for="(appInstall, index) in appInstalls"
:key="index"
@ -115,7 +115,11 @@
<el-form-item :label="$t('app.app')" prop="appinstall.appId">
<el-row :gutter="20">
<el-col :span="12">
<el-select v-model="website.appinstall.appId" @change="changeApp()">
<el-select
v-model="website.appinstall.appId"
@change="changeApp()"
class="p-w-200"
>
<el-option
v-for="(app, index) in apps"
:key="index"
@ -128,6 +132,7 @@
<el-select
v-model="website.appinstall.version"
@change="getAppDetail(website.appinstall.version)"
class="p-w-200"
>
<el-option
v-for="(version, index) in appVersions"