refactor: 移除其他i18n相关

履行文件的命名规范;
This commit is contained in:
悠静萝莉 2024-09-03 02:14:06 +08:00
parent 9bba935676
commit 5b8f322310
No known key found for this signature in database
GPG Key ID: 4EDF1CA1CEA8EBCC
15 changed files with 103 additions and 148 deletions

View File

@ -1,12 +1,9 @@
<template> <template>
<t-config-provider :global-config="getComponentsLocale"> <router-view :class="[mode]" />
<router-view :key="locale" :class="[mode]" />
</t-config-provider>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue'; import { computed } from 'vue';
import { useLocale } from '@/locales/useLocale';
import { useSettingStore } from '@/store'; import { useSettingStore } from '@/store';
const store = useSettingStore(); const store = useSettingStore();
@ -14,8 +11,6 @@ const store = useSettingStore();
const mode = computed(() => { const mode = computed(() => {
return store.displayMode; return store.displayMode;
}); });
const { getComponentsLocale, locale } = useLocale();
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
#nprogress .bar { #nprogress .bar {

View File

@ -2,7 +2,7 @@ import type { MenuListResult } from '@/api/model/permissionModel';
import { request } from '@/utils/request'; import { request } from '@/utils/request';
const Api = { const Api = {
MenuList: '/get-menu-list-i18n', MenuList: '/get-menu-list',
}; };
export function getMenuList() { export function getMenuList() {

View File

@ -5,45 +5,45 @@
<t-col :span="10"> <t-col :span="10">
<t-row :gutter="[24, 24]"> <t-row :gutter="[24, 24]">
<t-col :span="4"> <t-col :span="4">
<t-form-item :label="$t('components.commonTable.contractName')" name="name"> <t-form-item label="合同名称" name="name">
<t-input <t-input
v-model="formData.name" v-model="formData.name"
class="form-item-content" class="form-item-content"
type="search" type="search"
:placeholder="$t('components.commonTable.contractNamePlaceholder')" placeholder="请输入合同名称"
:style="{ minWidth: '134px' }" :style="{ minWidth: '134px' }"
/> />
</t-form-item> </t-form-item>
</t-col> </t-col>
<t-col :span="4"> <t-col :span="4">
<t-form-item :label="$t('components.commonTable.contractStatus')" name="status"> <t-form-item label="合同状态" name="status">
<t-select <t-select
v-model="formData.status" v-model="formData.status"
class="form-item-content" class="form-item-content"
:options="CONTRACT_STATUS_OPTIONS" :options="CONTRACT_STATUS_OPTIONS"
:placeholder="$t('components.commonTable.contractStatusPlaceholder')" placeholder="请选择合同状态"
clearable clearable
/> />
</t-form-item> </t-form-item>
</t-col> </t-col>
<t-col :span="4"> <t-col :span="4">
<t-form-item :label="$t('components.commonTable.contractNum')" name="no"> <t-form-item label="合同编号" name="no">
<t-input <t-input
v-model="formData.no" v-model="formData.no"
class="form-item-content" class="form-item-content"
:placeholder="$t('components.commonTable.contractNumPlaceholder')" placeholder="请输入合同编号"
:style="{ minWidth: '134px' }" :style="{ minWidth: '134px' }"
/> />
</t-form-item> </t-form-item>
</t-col> </t-col>
<t-col :span="4"> <t-col :span="4">
<t-form-item :label="$t('components.commonTable.contractType')" name="type"> <t-form-item label="合同类型" name="type">
<t-select <t-select
v-model="formData.type" v-model="formData.type"
style="display: inline-block" style="display: inline-block"
class="form-item-content" class="form-item-content"
:options="CONTRACT_TYPE_OPTIONS" :options="CONTRACT_TYPE_OPTIONS"
:placeholder="$t('components.commonTable.contractTypePlaceholder')" placeholder="请选择合同类型"
clearable clearable
/> />
</t-form-item> </t-form-item>
@ -52,10 +52,8 @@
</t-col> </t-col>
<t-col :span="2" class="operation-container"> <t-col :span="2" class="operation-container">
<t-button theme="primary" type="submit" :style="{ marginLeft: 'var(--td-comp-margin-s)' }"> <t-button theme="primary" type="submit" :style="{ marginLeft: 'var(--td-comp-margin-s)' }"> 查询 </t-button>
{{ $t('components.commonTable.query') }} <t-button type="reset" variant="base" theme="default"> 重置 </t-button>
</t-button>
<t-button type="reset" variant="base" theme="default"> {{ $t('components.commonTable.reset') }} </t-button>
</t-col> </t-col>
</t-row> </t-row>
</t-form> </t-form>
@ -74,41 +72,29 @@
@change="rehandleChange" @change="rehandleChange"
> >
<template #status="{ row }"> <template #status="{ row }">
<t-tag v-if="row.status === CONTRACT_STATUS.FAIL" theme="danger" variant="light"> <t-tag v-if="row.status === CONTRACT_STATUS.FAIL" theme="danger" variant="light"> 审核失败 </t-tag>
{{ $t('components.commonTable.contractStatusEnum.fail') }} <t-tag v-if="row.status === CONTRACT_STATUS.AUDIT_PENDING" theme="warning" variant="light"> 待审核 </t-tag>
</t-tag> <t-tag v-if="row.status === CONTRACT_STATUS.EXEC_PENDING" theme="warning" variant="light"> 待履行 </t-tag>
<t-tag v-if="row.status === CONTRACT_STATUS.AUDIT_PENDING" theme="warning" variant="light"> <t-tag v-if="row.status === CONTRACT_STATUS.EXECUTING" theme="success" variant="light"> 履行中 </t-tag>
{{ $t('components.commonTable.contractStatusEnum.audit') }} <t-tag v-if="row.status === CONTRACT_STATUS.FINISH" theme="success" variant="light"> 已完成 </t-tag>
</t-tag>
<t-tag v-if="row.status === CONTRACT_STATUS.EXEC_PENDING" theme="warning" variant="light">
{{ $t('components.commonTable.contractStatusEnum.pending') }}
</t-tag>
<t-tag v-if="row.status === CONTRACT_STATUS.EXECUTING" theme="success" variant="light">
{{ $t('components.commonTable.contractStatusEnum.executing') }}
</t-tag>
<t-tag v-if="row.status === CONTRACT_STATUS.FINISH" theme="success" variant="light">
{{ $t('components.commonTable.contractStatusEnum.finish') }}
</t-tag>
</template> </template>
<template #contractType="{ row }"> <template #contractType="{ row }">
<p v-if="row.contractType === CONTRACT_TYPES.MAIN">{{ $t('pages.listBase.contractStatusEnum.fail') }}</p> <p v-if="row.contractType === CONTRACT_TYPES.MAIN">审核失败</p>
<p v-if="row.contractType === CONTRACT_TYPES.SUB">{{ $t('pages.listBase.contractStatusEnum.audit') }}</p> <p v-if="row.contractType === CONTRACT_TYPES.SUB">待审核</p>
<p v-if="row.contractType === CONTRACT_TYPES.SUPPLEMENT"> <p v-if="row.contractType === CONTRACT_TYPES.SUPPLEMENT">待履行</p>
{{ $t('pages.listBase.contractStatusEnum.pending') }}
</p>
</template> </template>
<template #paymentType="{ row }"> <template #paymentType="{ row }">
<div v-if="row.paymentType === CONTRACT_PAYMENT_TYPES.PAYMENT" class="payment-col"> <p v-if="row.paymentType === CONTRACT_PAYMENT_TYPES.PAYMENT" class="payment-col">
{{ $t('pages.listBase.pay') }}<trend class="dashboard-item-trend" type="up" /> 付款<trend class="dashboard-item-trend" type="up" />
</div> </p>
<div v-if="row.paymentType === CONTRACT_PAYMENT_TYPES.RECEIPT" class="payment-col"> <p v-if="row.paymentType === CONTRACT_PAYMENT_TYPES.RECEIPT" class="payment-col">
{{ $t('pages.listBase.receive') }}<trend class="dashboard-item-trend" type="down" /> 收款<trend class="dashboard-item-trend" type="down" />
</div> </p>
</template> </template>
<template #op="slotProps"> <template #op="slotProps">
<t-space> <t-space>
<t-link theme="primary" @click="handleClickDetail()"> {{ $t('pages.listBase.detail') }}</t-link> <t-link theme="primary" @click="handleClickDetail()">管理</t-link>
<t-link theme="danger" @click="handleClickDelete(slotProps)"> {{ $t('pages.listBase.delete') }}</t-link> <t-link theme="danger" @click="handleClickDelete(slotProps)">删除</t-link>
</t-space> </t-space>
</template> </template>
</t-table> </t-table>
@ -130,8 +116,13 @@ import { useRouter } from 'vue-router';
import { getList } from '@/api/list'; import { getList } from '@/api/list';
import Trend from '@/components/trend/index.vue'; import Trend from '@/components/trend/index.vue';
import { prefix } from '@/config/global'; import { prefix } from '@/config/global';
import { CONTRACT_PAYMENT_TYPES, CONTRACT_STATUS, CONTRACT_TYPES } from '@/constants'; import {
import { t } from '@/locales'; CONTRACT_PAYMENT_TYPES,
CONTRACT_STATUS,
CONTRACT_STATUS_OPTIONS,
CONTRACT_TYPE_OPTIONS,
CONTRACT_TYPES,
} from '@/constants';
import { useSettingStore } from '@/store'; import { useSettingStore } from '@/store';
interface FormData { interface FormData {
@ -144,49 +135,36 @@ interface FormData {
const store = useSettingStore(); const store = useSettingStore();
const router = useRouter(); const router = useRouter();
const CONTRACT_STATUS_OPTIONS = [
{ value: CONTRACT_STATUS.FAIL, label: t('components.commonTable.contractStatusEnum.fail') },
{ value: CONTRACT_STATUS.AUDIT_PENDING, label: t('components.commonTable.contractStatusEnum.audit') },
{ value: CONTRACT_STATUS.EXEC_PENDING, label: t('components.commonTable.contractStatusEnum.pending') },
{ value: CONTRACT_STATUS.EXECUTING, label: t('components.commonTable.contractStatusEnum.executing') },
{ value: CONTRACT_STATUS.FINISH, label: t('components.commonTable.contractStatusEnum.finish') },
];
const CONTRACT_TYPE_OPTIONS = [
{ value: CONTRACT_TYPES.MAIN, label: t('components.commonTable.contractTypeEnum.main') },
{ value: CONTRACT_TYPES.SUB, label: t('components.commonTable.contractTypeEnum.sub') },
{ value: CONTRACT_TYPES.SUPPLEMENT, label: t('components.commonTable.contractTypeEnum.supplement') },
];
const COLUMNS: PrimaryTableCol[] = [ const COLUMNS: PrimaryTableCol[] = [
{ {
title: t('components.commonTable.contractName'), title: '合同名称',
fixed: 'left', fixed: 'left',
width: 280, width: 280,
ellipsis: true, ellipsis: true,
align: 'left', align: 'left',
colKey: 'name', colKey: 'name',
}, },
{ title: t('components.commonTable.contractStatus'), colKey: 'status', width: 160 }, { title: '合同状态', colKey: 'status', width: 160 },
{ {
title: t('components.commonTable.contractNum'), title: '合同编号',
width: 160, width: 160,
ellipsis: true, ellipsis: true,
colKey: 'no', colKey: 'no',
}, },
{ {
title: t('components.commonTable.contractType'), title: '合同类型',
width: 160, width: 160,
ellipsis: true, ellipsis: true,
colKey: 'contractType', colKey: 'contractType',
}, },
{ {
title: t('components.commonTable.contractPayType'), title: '合同收付类型',
width: 160, width: 160,
ellipsis: true, ellipsis: true,
colKey: 'paymentType', colKey: 'paymentType',
}, },
{ {
title: t('components.commonTable.contractAmount'), title: '合同金额 (元)',
width: 160, width: 160,
ellipsis: true, ellipsis: true,
colKey: 'amount', colKey: 'amount',
@ -196,7 +174,7 @@ const COLUMNS: PrimaryTableCol[] = [
fixed: 'right', fixed: 'right',
width: 160, width: 160,
colKey: 'op', colKey: 'op',
title: t('components.commonTable.operation'), title: '操作',
}, },
]; ];
@ -294,7 +272,7 @@ const headerAffixedTop = computed(
({ ({
offsetTop: store.isUseTabsRouter ? 48 : 0, offsetTop: store.isUseTabsRouter ? 48 : 0,
container: `.${prefix}-layout`, container: `.${prefix}-layout`,
}) as any, // TO BE FIXED }) as any, // todo
); );
</script> </script>

View File

@ -13,7 +13,7 @@
</template> </template>
<template #status> <template #status>
<t-tag :theme="product.isSetup ? 'success' : 'default'" :disabled="!product.isSetup">{{ <t-tag :theme="product.isSetup ? 'success' : 'default'" :disabled="!product.isSetup">{{
product.isSetup ? $t('components.isSetup.on') : $t('components.isSetup.off') product.isSetup ? '已启用' : '已停用'
}}</t-tag> }}</t-tag>
</template> </template>
<template #content> <template #content>
@ -36,12 +36,12 @@
trigger="click" trigger="click"
:options="[ :options="[
{ {
content: $t('components.manage'), content: '管理',
value: 'manage', value: 'manage',
onClick: () => handleClickManage(product), onClick: () => handleClickManage(product),
}, },
{ {
content: $t('components.delete'), content: '删除',
value: 'delete', value: 'delete',
onClick: () => handleClickDelete(product), onClick: () => handleClickDelete(product),
}, },

View File

@ -7,6 +7,14 @@ export const CONTRACT_STATUS = {
FINISH: 4, FINISH: 4,
}; };
export const CONTRACT_STATUS_OPTIONS = [
{ value: CONTRACT_STATUS.FAIL, label: '审核失败' },
{ value: CONTRACT_STATUS.AUDIT_PENDING, label: '待审核' },
{ value: CONTRACT_STATUS.EXEC_PENDING, label: '待履行' },
{ value: CONTRACT_STATUS.EXECUTING, label: '审核成功' },
{ value: CONTRACT_STATUS.FINISH, label: '已完成' },
];
// 合同类型枚举 // 合同类型枚举
export const CONTRACT_TYPES = { export const CONTRACT_TYPES = {
MAIN: 0, MAIN: 0,
@ -14,6 +22,12 @@ export const CONTRACT_TYPES = {
SUPPLEMENT: 2, SUPPLEMENT: 2,
}; };
export const CONTRACT_TYPE_OPTIONS = [
{ value: CONTRACT_TYPES.MAIN, label: '主合同' },
{ value: CONTRACT_TYPES.SUB, label: '子合同' },
{ value: CONTRACT_TYPES.SUPPLEMENT, label: '补充合同' },
];
// 合同收付类型枚举 // 合同收付类型枚举
export const CONTRACT_PAYMENT_TYPES = { export const CONTRACT_PAYMENT_TYPES = {
PAYMENT: 0, PAYMENT: 0,

View File

@ -1,11 +1,10 @@
/* eslint-disable simple-import-sort/imports */ /* eslint-disable simple-import-sort/imports */
import TDesign from 'tdesign-vue-next';
import { createApp } from 'vue'; import { createApp } from 'vue';
import TDesign from 'tdesign-vue-next';
import App from './App.vue'; import App from './App.vue';
import router from './router'; import router from './router';
import { store } from './store'; import { store } from './store';
import i18n from './locales';
import 'tdesign-vue-next/es/style/index.css'; import 'tdesign-vue-next/es/style/index.css';
import '@/style/index.less'; import '@/style/index.less';
@ -16,6 +15,5 @@ const app = createApp(App);
app.use(TDesign); app.use(TDesign);
app.use(store); app.use(store);
app.use(router); app.use(router);
app.use(i18n);
app.mount('#app'); app.mount('#app');

View File

@ -72,7 +72,7 @@ import * as echarts from 'echarts/core';
import { CanvasRenderer } from 'echarts/renderers'; import { CanvasRenderer } from 'echarts/renderers';
import { computed, nextTick, onDeactivated, onMounted, watch } from 'vue'; import { computed, nextTick, onDeactivated, onMounted, watch } from 'vue';
import ProductCard from '@/components/product-card/index.vue'; import ProductCard from '@/components/ProductCard/index.vue';
import Trend from '@/components/trend/index.vue'; import Trend from '@/components/trend/index.vue';
import { useSettingStore } from '@/store'; import { useSettingStore } from '@/store';
import { changeChartsTheme } from '@/utils/color'; import { changeChartsTheme } from '@/utils/color';

View File

@ -73,8 +73,8 @@ import { MessagePlugin } from 'tdesign-vue-next';
import { computed, onMounted, ref } from 'vue'; import { computed, onMounted, ref } from 'vue';
import { getCardList } from '@/api/list'; import { getCardList } from '@/api/list';
import type { CardProductType } from '@/components/product-card/index.vue'; import type { CardProductType } from '@/components/ProductCard/index.vue';
import ProductCard from '@/components/product-card/index.vue'; import ProductCard from '@/components/ProductCard/index.vue';
import type { FormData } from './components/DialogForm.vue'; import type { FormData } from './components/DialogForm.vue';
import DialogForm from './components/DialogForm.vue'; import DialogForm from './components/DialogForm.vue';

View File

@ -7,5 +7,5 @@ export default {
}; };
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import CommonTable from '@/components/common-table/index.vue'; import CommonTable from '@/components/CommonTable/index.vue';
</script> </script>

View File

@ -27,7 +27,7 @@ import { SearchIcon } from 'tdesign-icons-vue-next';
import type { TreeNodeModel } from 'tdesign-vue-next'; import type { TreeNodeModel } from 'tdesign-vue-next';
import { ref } from 'vue'; import { ref } from 'vue';
import CommonTable from '@/components/common-table/index.vue'; import CommonTable from '@/components/CommonTable/index.vue';
import { TREE_DATA } from './constants'; import { TREE_DATA } from './constants';

View File

@ -6,39 +6,39 @@ export interface UserInfoListType {
export const USER_INFO_LIST: Array<UserInfoListType> = [ export const USER_INFO_LIST: Array<UserInfoListType> = [
{ {
title: 'pages.user.personalInfo.desc.mobile', title: '手机',
content: '+86 13923734567', content: '+86 13923734567',
}, },
{ {
title: 'pages.user.personalInfo.desc.phone', title: '座机',
content: '734567', content: '734567',
}, },
{ {
title: 'pages.user.personalInfo.desc.email', title: '办公室邮箱',
content: 'Account@qq.com', content: 'Account@qq.com',
}, },
{ {
title: 'pages.user.personalInfo.desc.seat', title: '座位',
content: 'T32F 012', content: 'T32F 012',
}, },
{ {
title: 'pages.user.personalInfo.desc.entity', title: '管理主体',
content: '腾讯集团', content: '腾讯集团',
}, },
{ {
title: 'pages.user.personalInfo.desc.leader', title: '直属上级',
content: 'Michael Wang', content: 'Michael Wang',
}, },
{ {
title: 'pages.user.personalInfo.desc.position', title: '职位',
content: '高级 UI 设计师', content: '高级 UI 设计师',
}, },
{ {
title: 'pages.user.personalInfo.desc.joinDay', title: '入职时间',
content: '2021-07-01', content: '2021-07-01',
}, },
{ {
title: 'pages.user.personalInfo.desc.group', title: '所属团队',
content: '腾讯/腾讯公司/某事业群/某产品部/某运营中心/商户服务组', content: '腾讯/腾讯公司/某事业群/某产品部/某运营中心/商户服务组',
span: 6, span: 6,
}, },

View File

@ -4,19 +4,19 @@
<div class="user-left-greeting"> <div class="user-left-greeting">
<div> <div>
HiImage HiImage
<span class="regular"> {{ $t('pages.user.markDay') }}</span> <span class="regular"> 下午好今天是你加入鹅厂的第 100 </span>
</div> </div>
<img src="@/assets/assets-tencent-logo.png" class="logo" /> <img src="@/assets/assets-tencent-logo.png" class="logo" />
</div> </div>
<t-card class="user-info-list" :title="$t('pages.user.personalInfo.title')" :bordered="false"> <t-card class="user-info-list" title="个人信息" :bordered="false">
<template #actions> <template #actions>
<t-button theme="default" shape="square" variant="text"> <t-button theme="default" shape="square" variant="text">
<t-icon name="ellipsis" /> <t-icon name="ellipsis" />
</t-button> </t-button>
</template> </template>
<t-descriptions :column="4" item-layout="vertical"> <t-descriptions :column="4" item-layout="vertical">
<t-descriptions-item v-for="(item, index) in USER_INFO_LIST" :key="index" :label="$t(item.title)"> <t-descriptions-item v-for="(item, index) in USER_INFO_LIST" :key="index" :label="item.title">
{{ item.content }} {{ item.content }}
</t-descriptions-item> </t-descriptions-item>
</t-descriptions> </t-descriptions>
@ -24,11 +24,11 @@
<t-card class="content-container" :bordered="false"> <t-card class="content-container" :bordered="false">
<t-tabs value="second"> <t-tabs value="second">
<t-tab-panel value="first" :label="$t('pages.user.contentList')"> <t-tab-panel value="first" label="内容列表">
<p>{{ $t('pages.user.contentList') }}</p> <p>内容列表</p>
</t-tab-panel> </t-tab-panel>
<t-tab-panel value="second" :label="$t('pages.user.contentList')"> <t-tab-panel value="second" label="内容列表">
<t-card :bordered="false" class="card-padding-no" :title="$t('pages.user.visitData')" describe="(次)"> <t-card :bordered="false" class="card-padding-no" title="主页访问数据" describe="(次)">
<template #actions> <template #actions>
<t-date-range-picker <t-date-range-picker
class="card-date-picker-container" class="card-date-picker-container"
@ -41,8 +41,8 @@
<div id="lineContainer" style="width: 100%; height: 328px" /> <div id="lineContainer" style="width: 100%; height: 328px" />
</t-card> </t-card>
</t-tab-panel> </t-tab-panel>
<t-tab-panel value="third" :label="$t('pages.user.contentList')"> <t-tab-panel value="third" label="内容列表">
<p>{{ $t('pages.user.contentList') }}</p> <p>内容列表</p>
</t-tab-panel> </t-tab-panel>
</t-tabs> </t-tabs>
</t-card> </t-card>
@ -52,10 +52,10 @@
<t-card class="user-intro" :bordered="false"> <t-card class="user-intro" :bordered="false">
<t-avatar size="80px">T</t-avatar> <t-avatar size="80px">T</t-avatar>
<div class="name">My Account</div> <div class="name">My Account</div>
<div class="position">{{ $t('pages.user.personalInfo.position') }}</div> <div class="position">XXG 港澳业务拓展组员工 直客销售</div>
</t-card> </t-card>
<t-card :title="$t('pages.user.teamMember')" class="user-team" :bordered="false"> <t-card title="团队成员" class="user-team" :bordered="false">
<template #actions> <template #actions>
<t-button theme="default" shape="square" variant="text"> <t-button theme="default" shape="square" variant="text">
<t-icon name="ellipsis" /> <t-icon name="ellipsis" />
@ -68,7 +68,7 @@
</t-list> </t-list>
</t-card> </t-card>
<t-card :title="$t('pages.user.serviceProduction')" class="product-container" :bordered="false"> <t-card title="服务产品" class="product-container" :bordered="false">
<template #actions> <template #actions>
<t-button theme="default" shape="square" variant="text"> <t-button theme="default" shape="square" variant="text">
<t-icon name="ellipsis" /> <t-icon name="ellipsis" />

View File

@ -10,10 +10,7 @@ export default [
redirect: '/dashboard/base', redirect: '/dashboard/base',
name: 'dashboard', name: 'dashboard',
meta: { meta: {
title: { title: '仪表盘',
zh_CN: '仪表盘',
en_US: 'Dashboard',
},
icon: shallowRef(DashboardIcon), icon: shallowRef(DashboardIcon),
orderNo: 0, orderNo: 0,
}, },
@ -23,10 +20,7 @@ export default [
name: 'DashboardBase', name: 'DashboardBase',
component: () => import('@/pages/dashboard/base/index.vue'), component: () => import('@/pages/dashboard/base/index.vue'),
meta: { meta: {
title: { title: '概览仪表盘',
zh_CN: '概览仪表盘',
en_US: 'Overview',
},
}, },
}, },
{ {
@ -34,10 +28,7 @@ export default [
name: 'DashboardDetail', name: 'DashboardDetail',
component: () => import('@/pages/dashboard/detail/index.vue'), component: () => import('@/pages/dashboard/detail/index.vue'),
meta: { meta: {
title: { title: '统计报表',
zh_CN: '统计报表',
en_US: 'Dashboard Detail',
},
}, },
}, },
], ],

View File

@ -6,76 +6,55 @@ export default [
name: 'result', name: 'result',
component: Layout, component: Layout,
redirect: '/result/success', redirect: '/result/success',
meta: { meta: { title: '结果页', icon: 'check-circle' },
title: {
zh_CN: '结果页',
en_US: 'Result',
},
icon: 'check-circle',
},
children: [ children: [
{ {
path: 'success', path: 'success',
name: 'ResultSuccess', name: 'ResultSuccess',
component: () => import('@/pages/result/success/index.vue'), component: () => import('@/pages/result/success/index.vue'),
meta: { meta: { title: '成功页' },
title: {
zh_CN: '成功页',
en_US: 'Success',
},
},
}, },
{ {
path: 'fail', path: 'fail',
name: 'ResultFail', name: 'ResultFail',
component: () => import('@/pages/result/fail/index.vue'), component: () => import('@/pages/result/fail/index.vue'),
meta: { meta: { title: '失败页' },
title: {
zh_CN: '失败页',
en_US: 'Fail',
},
},
}, },
{ {
path: 'network-error', path: 'network-error',
name: 'ResultNetworkError', name: 'ResultNetworkError',
component: () => import('@/pages/result/network-error/index.vue'), component: () => import('@/pages/result/network-error/index.vue'),
meta: { meta: { title: '网络异常' },
title: {
zh_CN: '网络异常',
en_US: 'Network Error',
},
},
}, },
{ {
path: '403', path: '403',
name: 'Result403', name: 'Result403',
component: () => import('@/pages/result/403/index.vue'), component: () => import('@/pages/result/403/index.vue'),
meta: { title: { zh_CN: '无权限', en_US: 'Forbidden' } }, meta: { title: '无权限' },
}, },
{ {
path: '404', path: '404',
name: 'Result404', name: 'Result404',
component: () => import('@/pages/result/404/index.vue'), component: () => import('@/pages/result/404/index.vue'),
meta: { title: { zh_CN: '访问页面不存在页', en_US: 'Not Found' } }, meta: { title: '访问页面不存在页' },
}, },
{ {
path: '500', path: '500',
name: 'Result500', name: 'Result500',
component: () => import('@/pages/result/500/index.vue'), component: () => import('@/pages/result/500/index.vue'),
meta: { title: { zh_CN: '服务器出错页', en_US: 'Server Error' } }, meta: { title: '服务器出错页' },
}, },
{ {
path: 'browser-incompatible', path: 'browser-incompatible',
name: 'ResultBrowserIncompatible', name: 'ResultBrowserIncompatible',
component: () => import('@/pages/result/browser-incompatible/index.vue'), component: () => import('@/pages/result/browser-incompatible/index.vue'),
meta: { title: { zh_CN: '浏览器不兼容页', en_US: 'BrowserIncompatible' } }, meta: { title: '浏览器不兼容页' },
}, },
{ {
path: 'maintenance', path: 'maintenance',
name: 'ResultMaintenance', name: 'ResultMaintenance',
component: () => import('@/pages/result/maintenance/index.vue'), component: () => import('@/pages/result/maintenance/index.vue'),
meta: { title: { zh_CN: '系统维护页', en_US: 'Maintenance' } }, meta: { title: '系统维护页' },
}, },
], ],
}, },

View File

@ -9,13 +9,13 @@ export default [
name: 'user', name: 'user',
component: Layout, component: Layout,
redirect: '/user/index', redirect: '/user/index',
meta: { title: { zh_CN: '个人中心', en_US: 'User Center' }, icon: 'user-circle' }, meta: { title: '个人页', icon: 'user-circle' },
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'UserIndex', name: 'UserIndex',
component: () => import('@/pages/user/index.vue'), component: () => import('@/pages/user/index.vue'),
meta: { title: { zh_CN: '个人中心', en_US: 'User Center' } }, meta: { title: '个人中心' },
}, },
], ],
}, },
@ -23,14 +23,14 @@ export default [
path: '/loginRedirect', path: '/loginRedirect',
name: 'loginRedirect', name: 'loginRedirect',
redirect: '/login', redirect: '/login',
meta: { title: { zh_CN: '登录页', en_US: 'Login' }, icon: shallowRef(LogoutIcon) }, meta: { title: '登录页', icon: shallowRef(LogoutIcon) },
component: () => import('@/layouts/blank.vue'), component: () => import('@/layouts/blank.vue'),
children: [ children: [
{ {
path: 'index', path: 'index',
redirect: '/login', redirect: '/login',
component: () => import('@/layouts/blank.vue'), component: () => import('@/layouts/blank.vue'),
meta: { title: { zh_CN: '登录页', en_US: 'Login' } }, meta: { title: '登录中心' },
}, },
], ],
}, },