From 0126da47782b90c98feeb9fef2e57e47ac5df9a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=87=95=E5=8D=9A=E6=96=87?= <349952469@qq.com>
Date: Wed, 6 Mar 2024 11:43:27 +0800
Subject: [PATCH] feat(projects): globalSearch add i18n
---
.../modules/global-search/components/search-footer.vue | 8 +++++---
.../modules/global-search/components/search-modal.vue | 6 +++---
src/layouts/modules/global-search/index.vue | 3 ++-
src/locales/langs/en-us.ts | 4 ++++
src/locales/langs/zh-cn.ts | 4 ++++
src/typings/app.d.ts | 4 ++++
6 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/src/layouts/modules/global-search/components/search-footer.vue b/src/layouts/modules/global-search/components/search-footer.vue
index 056c7bd28..ec5d810a3 100644
--- a/src/layouts/modules/global-search/components/search-footer.vue
+++ b/src/layouts/modules/global-search/components/search-footer.vue
@@ -1,4 +1,6 @@
@@ -6,16 +8,16 @@ defineOptions({ name: 'SearchFooter' });
- 确认
+ {{ $t('common.confirm') }}
- 切换
+ {{ $t('common.switch') }}
- 关闭
+ {{ $t('common.close') }}
diff --git a/src/layouts/modules/global-search/components/search-modal.vue b/src/layouts/modules/global-search/components/search-modal.vue
index c3cc546f2..7259f9350 100644
--- a/src/layouts/modules/global-search/components/search-modal.vue
+++ b/src/layouts/modules/global-search/components/search-modal.vue
@@ -94,16 +94,16 @@ onKeyStroke('ArrowDown', handleDown);
@after-leave="handleClose"
>
-
+
- 取消
+ {{ $t('common.cancel') }}
-
+
diff --git a/src/layouts/modules/global-search/index.vue b/src/layouts/modules/global-search/index.vue
index bb925582d..46d954aee 100644
--- a/src/layouts/modules/global-search/index.vue
+++ b/src/layouts/modules/global-search/index.vue
@@ -1,5 +1,6 @@
-
+
diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts
index 7f6afc3cf..3ffc7ebe3 100644
--- a/src/locales/langs/en-us.ts
+++ b/src/locales/langs/en-us.ts
@@ -9,6 +9,7 @@ const local: App.I18n.Schema = {
backToHome: 'Back to home',
batchDelete: 'Batch Delete',
cancel: 'Cancel',
+ close: 'Close',
check: 'Check',
columnSetting: 'Column Setting',
confirm: 'Confirm',
@@ -17,16 +18,19 @@ const local: App.I18n.Schema = {
confirmDelete: 'Are you sure you want to delete?',
edit: 'Edit',
index: 'Index',
+ keywordSearch: 'Please enter keyword',
logout: 'Logout',
logoutConfirm: 'Are you sure you want to log out?',
lookForward: 'Coming soon',
modify: 'Modify',
modifySuccess: 'Modify Success',
+ noData: 'No Data',
operate: 'Operate',
pleaseCheckValue: 'Please check whether the value is valid',
refresh: 'Refresh',
reset: 'Reset',
search: 'Search',
+ switch: 'Switch',
tip: 'Tip',
update: 'Update',
updateSuccess: 'Update Success',
diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts
index 9b670d049..d22501ebe 100644
--- a/src/locales/langs/zh-cn.ts
+++ b/src/locales/langs/zh-cn.ts
@@ -9,6 +9,7 @@ const local: App.I18n.Schema = {
backToHome: '返回首页',
batchDelete: '批量删除',
cancel: '取消',
+ close: '关闭',
check: '勾选',
columnSetting: '列设置',
confirm: '确认',
@@ -17,16 +18,19 @@ const local: App.I18n.Schema = {
confirmDelete: '确认删除吗?',
edit: '编辑',
index: '序号',
+ keywordSearch: '请输入关键词搜索',
logout: '退出登录',
logoutConfirm: '确认退出登录吗?',
lookForward: '敬请期待',
modify: '修改',
modifySuccess: '修改成功',
+ noData: '无数据',
operate: '操作',
pleaseCheckValue: '请检查输入的值是否合法',
refresh: '刷新',
reset: '重置',
search: '搜索',
+ switch: '切换',
tip: '提示',
update: '更新',
updateSuccess: '更新成功',
diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts
index d4ae3a479..6dcf1ce09 100644
--- a/src/typings/app.d.ts
+++ b/src/typings/app.d.ts
@@ -255,6 +255,7 @@ declare namespace App {
backToHome: string;
batchDelete: string;
cancel: string;
+ close: string;
check: string;
columnSetting: string;
confirm: string;
@@ -263,16 +264,19 @@ declare namespace App {
confirmDelete: string;
edit: string;
index: string;
+ keywordSearch: string;
logout: string;
logoutConfirm: string;
lookForward: string;
modify: string;
modifySuccess: string;
+ noData: string;
operate: string;
pleaseCheckValue: string;
refresh: string;
reset: string;
search: string;
+ switch: string;
tip: string;
update: string;
updateSuccess: string;