mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
perf: 框架核心代码国际化全量覆盖(仅需处理业务代码国际化即可)
This commit is contained in:
parent
d1d2bcaa11
commit
05ec64ea8d
@ -11,6 +11,18 @@ buttons:
|
|||||||
pureCloseAllTabs: Close AllTabs
|
pureCloseAllTabs: Close AllTabs
|
||||||
pureContentFullScreen: Content FullScreen
|
pureContentFullScreen: Content FullScreen
|
||||||
pureContentExitFullScreen: Content ExitFullScreen
|
pureContentExitFullScreen: Content ExitFullScreen
|
||||||
|
pureClickCollapse: Collapse
|
||||||
|
pureClickExpand: Expand
|
||||||
|
pureConfirm: Confirm
|
||||||
|
pureSwitch: Switch
|
||||||
|
pureClose: Close
|
||||||
|
search:
|
||||||
|
pureTotal: Total
|
||||||
|
pureHistory: History
|
||||||
|
pureCollect: Collect
|
||||||
|
pureDragSort: (Drag Sort)
|
||||||
|
pureEmpty: Empty
|
||||||
|
purePlaceholder: Search Menu
|
||||||
menus:
|
menus:
|
||||||
pureHome: Home
|
pureHome: Home
|
||||||
pureLogin: Login
|
pureLogin: Login
|
||||||
|
@ -11,6 +11,18 @@ buttons:
|
|||||||
pureCloseAllTabs: 关闭全部标签页
|
pureCloseAllTabs: 关闭全部标签页
|
||||||
pureContentFullScreen: 内容区全屏
|
pureContentFullScreen: 内容区全屏
|
||||||
pureContentExitFullScreen: 内容区退出全屏
|
pureContentExitFullScreen: 内容区退出全屏
|
||||||
|
pureClickCollapse: 点击折叠
|
||||||
|
pureClickExpand: 点击展开
|
||||||
|
pureConfirm: 确认
|
||||||
|
pureSwitch: 切换
|
||||||
|
pureClose: 关闭
|
||||||
|
search:
|
||||||
|
pureTotal: 共
|
||||||
|
pureHistory: 搜索历史
|
||||||
|
pureCollect: 收藏
|
||||||
|
pureDragSort: (可拖拽排序)
|
||||||
|
pureEmpty: 暂无搜索结果
|
||||||
|
purePlaceholder: 搜索菜单(支持拼音搜索)
|
||||||
menus:
|
menus:
|
||||||
pureHome: 首页
|
pureHome: 首页
|
||||||
pureLogin: 登录
|
pureLogin: 登录
|
||||||
@ -176,4 +188,4 @@ login:
|
|||||||
purePassWordRuleReg: 密码格式应为8-18位数字、字母、符号的任意两种组合
|
purePassWordRuleReg: 密码格式应为8-18位数字、字母、符号的任意两种组合
|
||||||
purePassWordSureReg: 请输入确认密码
|
purePassWordSureReg: 请输入确认密码
|
||||||
purePassWordDifferentReg: 两次密码不一致!
|
purePassWordDifferentReg: 两次密码不一致!
|
||||||
purePassWordUpdateReg: 修改密码成功
|
purePassWordUpdateReg: 修改密码成功
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
|
import { transformI18n, $t } from "@/plugins/i18n";
|
||||||
import mdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
|
import mdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
|
||||||
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||||
import ArrowUpLine from "@iconify-icons/ri/arrow-up-line";
|
import ArrowUpLine from "@iconify-icons/ri/arrow-up-line";
|
||||||
@ -16,22 +17,22 @@ const { device } = useNav();
|
|||||||
<div class="search-footer text-[#333] dark:text-white">
|
<div class="search-footer text-[#333] dark:text-white">
|
||||||
<span class="search-footer-item">
|
<span class="search-footer-item">
|
||||||
<enterOutlined class="icon" />
|
<enterOutlined class="icon" />
|
||||||
确认
|
{{ transformI18n($t("buttons.pureConfirm")) }}
|
||||||
</span>
|
</span>
|
||||||
<span class="search-footer-item">
|
<span class="search-footer-item">
|
||||||
<IconifyIconOffline :icon="ArrowUpLine" class="icon" />
|
<IconifyIconOffline :icon="ArrowUpLine" class="icon" />
|
||||||
<IconifyIconOffline :icon="ArrowDownLine" class="icon" />
|
<IconifyIconOffline :icon="ArrowDownLine" class="icon" />
|
||||||
切换
|
{{ transformI18n($t("buttons.pureSwitch")) }}
|
||||||
</span>
|
</span>
|
||||||
<span class="search-footer-item">
|
<span class="search-footer-item">
|
||||||
<mdiKeyboardEsc class="icon" />
|
<mdiKeyboardEsc class="icon" />
|
||||||
关闭
|
{{ transformI18n($t("buttons.pureClose")) }}
|
||||||
</span>
|
</span>
|
||||||
<p
|
<p
|
||||||
v-if="device !== 'mobile' && props.total > 0"
|
v-if="device !== 'mobile' && props.total > 0"
|
||||||
class="search-footer-total"
|
class="search-footer-total"
|
||||||
>
|
>
|
||||||
共{{ props.total }}项
|
{{ `${transformI18n($t("search.pureTotal"))} ${props.total}` }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Sortable from "sortablejs";
|
import Sortable from "sortablejs";
|
||||||
|
import { transformI18n, $t } from "@/plugins/i18n";
|
||||||
import SearchHistoryItem from "./SearchHistoryItem.vue";
|
import SearchHistoryItem from "./SearchHistoryItem.vue";
|
||||||
import type { optionsItem, dragItem, Props } from "../types";
|
import type { optionsItem, dragItem, Props } from "../types";
|
||||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||||
@ -141,7 +142,9 @@ defineExpose({ handleScroll });
|
|||||||
<template>
|
<template>
|
||||||
<div ref="historyRef" class="history">
|
<div ref="historyRef" class="history">
|
||||||
<template v-if="historyList.length">
|
<template v-if="historyList.length">
|
||||||
<div :style="titleStyle">搜索历史</div>
|
<div :style="titleStyle">
|
||||||
|
{{ transformI18n($t("search.pureHistory")) }}
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in historyList"
|
v-for="(item, index) in historyList"
|
||||||
:key="item.path"
|
:key="item.path"
|
||||||
@ -160,7 +163,9 @@ defineExpose({ handleScroll });
|
|||||||
</template>
|
</template>
|
||||||
<template v-if="collectList.length">
|
<template v-if="collectList.length">
|
||||||
<div :style="titleStyle">
|
<div :style="titleStyle">
|
||||||
收藏{{ collectList.length > 1 ? "(可拖拽排序)" : "" }}
|
{{
|
||||||
|
`${transformI18n($t("search.pureCollect"))}${collectList.length > 1 ? transformI18n($t("search.pureDragSort")) : ""}`
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="collect-container">
|
<div class="collect-container">
|
||||||
<div
|
<div
|
||||||
|
@ -6,8 +6,8 @@ import { useRouter } from "vue-router";
|
|||||||
import SearchResult from "./SearchResult.vue";
|
import SearchResult from "./SearchResult.vue";
|
||||||
import SearchFooter from "./SearchFooter.vue";
|
import SearchFooter from "./SearchFooter.vue";
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
import { transformI18n } from "@/plugins/i18n";
|
|
||||||
import SearchHistory from "./SearchHistory.vue";
|
import SearchHistory from "./SearchHistory.vue";
|
||||||
|
import { transformI18n, $t } from "@/plugins/i18n";
|
||||||
import type { optionsItem, dragItem } from "../types";
|
import type { optionsItem, dragItem } from "../types";
|
||||||
import { ref, computed, shallowRef, watch } from "vue";
|
import { ref, computed, shallowRef, watch } from "vue";
|
||||||
import { useDebounceFn, onKeyStroke } from "@vueuse/core";
|
import { useDebounceFn, onKeyStroke } from "@vueuse/core";
|
||||||
@ -293,7 +293,7 @@ onKeyStroke("ArrowDown", handleDown);
|
|||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
size="large"
|
size="large"
|
||||||
clearable
|
clearable
|
||||||
placeholder="搜索菜单(中文模式下支持拼音搜索)"
|
:placeholder="transformI18n($t('search.purePlaceholder'))"
|
||||||
@input="handleSearch"
|
@input="handleSearch"
|
||||||
>
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
@ -305,7 +305,10 @@ onKeyStroke("ArrowDown", handleDown);
|
|||||||
</el-input>
|
</el-input>
|
||||||
<div class="search-content">
|
<div class="search-content">
|
||||||
<el-scrollbar ref="scrollbarRef" max-height="calc(90vh - 140px)">
|
<el-scrollbar ref="scrollbarRef" max-height="calc(90vh - 140px)">
|
||||||
<el-empty v-if="showEmpty" description="暂无搜索结果" />
|
<el-empty
|
||||||
|
v-if="showEmpty"
|
||||||
|
:description="transformI18n($t('search.pureEmpty'))"
|
||||||
|
/>
|
||||||
<SearchHistory
|
<SearchHistory
|
||||||
v-if="showSearchHistory"
|
v-if="showSearchHistory"
|
||||||
ref="historyRef"
|
ref="historyRef"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
import { useGlobal } from "@pureadmin/utils";
|
import { useGlobal } from "@pureadmin/utils";
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
|
import { transformI18n, $t } from "@/plugins/i18n";
|
||||||
|
|
||||||
import ArrowLeft from "@iconify-icons/ri/arrow-left-double-fill";
|
import ArrowLeft from "@iconify-icons/ri/arrow-left-double-fill";
|
||||||
|
|
||||||
@ -34,7 +35,11 @@ const toggleClick = () => {
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
v-tippy="{
|
v-tippy="{
|
||||||
content: props.isActive ? '点击折叠' : '点击展开',
|
content: transformI18n(
|
||||||
|
props.isActive
|
||||||
|
? $t('buttons.pureClickCollapse')
|
||||||
|
: $t('buttons.pureClickExpand')
|
||||||
|
),
|
||||||
theme: tooltipEffect,
|
theme: tooltipEffect,
|
||||||
hideOnClick: 'toggle',
|
hideOnClick: 'toggle',
|
||||||
placement: 'right'
|
placement: 'right'
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
import { useGlobal } from "@pureadmin/utils";
|
import { useGlobal } from "@pureadmin/utils";
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
|
import { transformI18n, $t } from "@/plugins/i18n";
|
||||||
|
|
||||||
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
||||||
|
|
||||||
@ -44,7 +45,11 @@ const toggleClick = () => {
|
|||||||
<div class="left-collapse">
|
<div class="left-collapse">
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
v-tippy="{
|
v-tippy="{
|
||||||
content: props.isActive ? '点击折叠' : '点击展开',
|
content: transformI18n(
|
||||||
|
props.isActive
|
||||||
|
? $t('buttons.pureClickCollapse')
|
||||||
|
: $t('buttons.pureClickExpand')
|
||||||
|
),
|
||||||
theme: tooltipEffect,
|
theme: tooltipEffect,
|
||||||
hideOnClick: 'toggle',
|
hideOnClick: 'toggle',
|
||||||
placement: 'right'
|
placement: 'right'
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { transformI18n, $t } from "@/plugins/i18n";
|
||||||
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
||||||
import MenuUnfold from "@iconify-icons/ri/menu-unfold-fill";
|
import MenuUnfold from "@iconify-icons/ri/menu-unfold-fill";
|
||||||
|
|
||||||
@ -22,7 +23,13 @@ const toggleClick = () => {
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="px-3 mr-1 navbar-bg-hover"
|
class="px-3 mr-1 navbar-bg-hover"
|
||||||
:title="props.isActive ? '点击折叠' : '点击展开'"
|
:title="
|
||||||
|
transformI18n(
|
||||||
|
props.isActive
|
||||||
|
? $t('buttons.pureClickCollapse')
|
||||||
|
: $t('buttons.pureClickExpand')
|
||||||
|
)
|
||||||
|
"
|
||||||
@click="toggleClick"
|
@click="toggleClick"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
|
Loading…
x
Reference in New Issue
Block a user