mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-03 13:44:47 +08:00
perf: 优化国际化,路由不再传i18n字段,平台自动读取根目录locales文件夹下文件进行国际化匹配
This commit is contained in:
@@ -18,7 +18,6 @@ const { t } = useI18n();
|
||||
interface treeNode extends TreeNode {
|
||||
meta: {
|
||||
title: string;
|
||||
i18n: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -41,7 +40,7 @@ const onQueryChanged = (query: string) => {
|
||||
};
|
||||
|
||||
const filterMethod = (query: string, node: treeNode) => {
|
||||
return transformI18n(node.meta.title, node.meta.i18n)!.indexOf(query) !== -1;
|
||||
return transformI18n(node.meta.title)!.indexOf(query) !== -1;
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -8,6 +8,6 @@ import { Amap } from "/@/components/ReMap";
|
||||
|
||||
<style scoped>
|
||||
.main-content {
|
||||
margin: 0 !important;
|
||||
margin: 2px 0 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -35,7 +35,6 @@ function toDetail(index: number) {
|
||||
meta: {
|
||||
title: { zh: `No.${index} - 详情信息`, en: `No.${index} - DetailInfo` },
|
||||
showLink: false,
|
||||
i18n: false,
|
||||
dynamicLevel: 3
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user