mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): globalSearch add i18n
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { $t } from '@/locales';
|
||||
|
||||
defineOptions({ name: 'SearchFooter' });
|
||||
</script>
|
||||
|
||||
@ -6,16 +8,16 @@ defineOptions({ name: 'SearchFooter' });
|
||||
<div class="h-44px flex-y-center px-24px">
|
||||
<span class="mr-14px flex-y-center">
|
||||
<icon-mdi-keyboard-return class="icon mr-6px p-2px text-20px" />
|
||||
<span>确认</span>
|
||||
<span>{{ $t('common.confirm') }}</span>
|
||||
</span>
|
||||
<span class="mr-14px flex-y-center">
|
||||
<icon-mdi-arrow-up-thin class="icon mr-5px p-2px text-20px" />
|
||||
<icon-mdi-arrow-down-thin class="icon mr-6px p-2px text-20px" />
|
||||
<span>切换</span>
|
||||
<span>{{ $t('common.switch') }}</span>
|
||||
</span>
|
||||
<span class="flex-y-center">
|
||||
<icon-mdi-keyboard-esc class="icon mr-6px p-2px text-20px" />
|
||||
<span>关闭</span>
|
||||
<span>{{ $t('common.close') }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -94,16 +94,16 @@ onKeyStroke('ArrowDown', handleDown);
|
||||
@after-leave="handleClose"
|
||||
>
|
||||
<NInputGroup>
|
||||
<NInput v-model:value="keyword" clearable placeholder="请输入关键词搜索" @input="handleSearch">
|
||||
<NInput v-model:value="keyword" clearable :placeholder="$t('common.keywordSearch')" @input="handleSearch">
|
||||
<template #prefix>
|
||||
<icon-uil-search class="text-15px text-#c2c2c2" />
|
||||
</template>
|
||||
</NInput>
|
||||
<NButton v-if="isMobile" type="primary" ghost @click="handleClose">取消</NButton>
|
||||
<NButton v-if="isMobile" type="primary" ghost @click="handleClose">{{ $t('common.cancel') }}</NButton>
|
||||
</NInputGroup>
|
||||
|
||||
<div class="mt-20px">
|
||||
<NEmpty v-if="resultOptions.length === 0" description="暂无搜索结果" />
|
||||
<NEmpty v-if="resultOptions.length === 0" :description="$t('common.noData')" />
|
||||
<SearchResult v-else v-model:path="activePath" :options="resultOptions" @enter="handleEnter" />
|
||||
</div>
|
||||
<template #footer>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { useBoolean } from '@sa/hooks';
|
||||
import { $t } from '@/locales';
|
||||
import SearchModal from './components/search-modal.vue';
|
||||
|
||||
defineOptions({ name: 'GlobalSearch' });
|
||||
@ -11,7 +12,7 @@ function handleSearch() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ButtonIcon tooltip-content="搜索" @click="handleSearch">
|
||||
<ButtonIcon :tooltip-content="$t('common.search')" @click="handleSearch">
|
||||
<icon-uil-search class="text-20px" />
|
||||
</ButtonIcon>
|
||||
<SearchModal v-model:show="show" />
|
||||
|
Reference in New Issue
Block a user