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
|
||||
pureContentFullScreen: Content FullScreen
|
||||
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:
|
||||
pureHome: Home
|
||||
pureLogin: Login
|
||||
|
@ -11,6 +11,18 @@ buttons:
|
||||
pureCloseAllTabs: 关闭全部标签页
|
||||
pureContentFullScreen: 内容区全屏
|
||||
pureContentExitFullScreen: 内容区退出全屏
|
||||
pureClickCollapse: 点击折叠
|
||||
pureClickExpand: 点击展开
|
||||
pureConfirm: 确认
|
||||
pureSwitch: 切换
|
||||
pureClose: 关闭
|
||||
search:
|
||||
pureTotal: 共
|
||||
pureHistory: 搜索历史
|
||||
pureCollect: 收藏
|
||||
pureDragSort: (可拖拽排序)
|
||||
pureEmpty: 暂无搜索结果
|
||||
purePlaceholder: 搜索菜单(支持拼音搜索)
|
||||
menus:
|
||||
pureHome: 首页
|
||||
pureLogin: 登录
|
||||
|
@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import { transformI18n, $t } from "@/plugins/i18n";
|
||||
import mdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
|
||||
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||
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">
|
||||
<span class="search-footer-item">
|
||||
<enterOutlined class="icon" />
|
||||
确认
|
||||
{{ transformI18n($t("buttons.pureConfirm")) }}
|
||||
</span>
|
||||
<span class="search-footer-item">
|
||||
<IconifyIconOffline :icon="ArrowUpLine" class="icon" />
|
||||
<IconifyIconOffline :icon="ArrowDownLine" class="icon" />
|
||||
切换
|
||||
{{ transformI18n($t("buttons.pureSwitch")) }}
|
||||
</span>
|
||||
<span class="search-footer-item">
|
||||
<mdiKeyboardEsc class="icon" />
|
||||
关闭
|
||||
{{ transformI18n($t("buttons.pureClose")) }}
|
||||
</span>
|
||||
<p
|
||||
v-if="device !== 'mobile' && props.total > 0"
|
||||
class="search-footer-total"
|
||||
>
|
||||
共{{ props.total }}项
|
||||
{{ `${transformI18n($t("search.pureTotal"))} ${props.total}` }}
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import Sortable from "sortablejs";
|
||||
import { transformI18n, $t } from "@/plugins/i18n";
|
||||
import SearchHistoryItem from "./SearchHistoryItem.vue";
|
||||
import type { optionsItem, dragItem, Props } from "../types";
|
||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||
@ -141,7 +142,9 @@ defineExpose({ handleScroll });
|
||||
<template>
|
||||
<div ref="historyRef" class="history">
|
||||
<template v-if="historyList.length">
|
||||
<div :style="titleStyle">搜索历史</div>
|
||||
<div :style="titleStyle">
|
||||
{{ transformI18n($t("search.pureHistory")) }}
|
||||
</div>
|
||||
<div
|
||||
v-for="(item, index) in historyList"
|
||||
:key="item.path"
|
||||
@ -160,7 +163,9 @@ defineExpose({ handleScroll });
|
||||
</template>
|
||||
<template v-if="collectList.length">
|
||||
<div :style="titleStyle">
|
||||
收藏{{ collectList.length > 1 ? "(可拖拽排序)" : "" }}
|
||||
{{
|
||||
`${transformI18n($t("search.pureCollect"))}${collectList.length > 1 ? transformI18n($t("search.pureDragSort")) : ""}`
|
||||
}}
|
||||
</div>
|
||||
<div class="collect-container">
|
||||
<div
|
||||
|
@ -6,8 +6,8 @@ import { useRouter } from "vue-router";
|
||||
import SearchResult from "./SearchResult.vue";
|
||||
import SearchFooter from "./SearchFooter.vue";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import SearchHistory from "./SearchHistory.vue";
|
||||
import { transformI18n, $t } from "@/plugins/i18n";
|
||||
import type { optionsItem, dragItem } from "../types";
|
||||
import { ref, computed, shallowRef, watch } from "vue";
|
||||
import { useDebounceFn, onKeyStroke } from "@vueuse/core";
|
||||
@ -293,7 +293,7 @@ onKeyStroke("ArrowDown", handleDown);
|
||||
v-model="keyword"
|
||||
size="large"
|
||||
clearable
|
||||
placeholder="搜索菜单(中文模式下支持拼音搜索)"
|
||||
:placeholder="transformI18n($t('search.purePlaceholder'))"
|
||||
@input="handleSearch"
|
||||
>
|
||||
<template #prefix>
|
||||
@ -305,7 +305,10 @@ onKeyStroke("ArrowDown", handleDown);
|
||||
</el-input>
|
||||
<div class="search-content">
|
||||
<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
|
||||
v-if="showSearchHistory"
|
||||
ref="historyRef"
|
||||
|
@ -2,6 +2,7 @@
|
||||
import { computed } from "vue";
|
||||
import { useGlobal } from "@pureadmin/utils";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import { transformI18n, $t } from "@/plugins/i18n";
|
||||
|
||||
import ArrowLeft from "@iconify-icons/ri/arrow-left-double-fill";
|
||||
|
||||
@ -34,7 +35,11 @@ const toggleClick = () => {
|
||||
<template>
|
||||
<div
|
||||
v-tippy="{
|
||||
content: props.isActive ? '点击折叠' : '点击展开',
|
||||
content: transformI18n(
|
||||
props.isActive
|
||||
? $t('buttons.pureClickCollapse')
|
||||
: $t('buttons.pureClickExpand')
|
||||
),
|
||||
theme: tooltipEffect,
|
||||
hideOnClick: 'toggle',
|
||||
placement: 'right'
|
||||
|
@ -2,6 +2,7 @@
|
||||
import { computed } from "vue";
|
||||
import { useGlobal } from "@pureadmin/utils";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import { transformI18n, $t } from "@/plugins/i18n";
|
||||
|
||||
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
||||
|
||||
@ -44,7 +45,11 @@ const toggleClick = () => {
|
||||
<div class="left-collapse">
|
||||
<IconifyIconOffline
|
||||
v-tippy="{
|
||||
content: props.isActive ? '点击折叠' : '点击展开',
|
||||
content: transformI18n(
|
||||
props.isActive
|
||||
? $t('buttons.pureClickCollapse')
|
||||
: $t('buttons.pureClickExpand')
|
||||
),
|
||||
theme: tooltipEffect,
|
||||
hideOnClick: 'toggle',
|
||||
placement: 'right'
|
||||
|
@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { transformI18n, $t } from "@/plugins/i18n";
|
||||
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
||||
import MenuUnfold from "@iconify-icons/ri/menu-unfold-fill";
|
||||
|
||||
@ -22,7 +23,13 @@ const toggleClick = () => {
|
||||
<template>
|
||||
<div
|
||||
class="px-3 mr-1 navbar-bg-hover"
|
||||
:title="props.isActive ? '点击折叠' : '点击展开'"
|
||||
:title="
|
||||
transformI18n(
|
||||
props.isActive
|
||||
? $t('buttons.pureClickCollapse')
|
||||
: $t('buttons.pureClickExpand')
|
||||
)
|
||||
"
|
||||
@click="toggleClick"
|
||||
>
|
||||
<IconifyIconOffline
|
||||
|
Loading…
x
Reference in New Issue
Block a user