|
|
@@ -2,6 +2,8 @@
|
|
|
import { computed, ref, watch } from 'vue'
|
|
|
import { BANKS, HOT_BANK_CODES, type BankItem } from '~/constants/banks'
|
|
|
|
|
|
+const { t } = useI18n()
|
|
|
+
|
|
|
const props = withDefaults(defineProps<{
|
|
|
show: boolean
|
|
|
modelValue: string
|
|
|
@@ -9,11 +11,13 @@ const props = withDefaults(defineProps<{
|
|
|
title?: string
|
|
|
options?: BankItem[]
|
|
|
}>(), {
|
|
|
- title: '请选择银行',
|
|
|
+ title: '',
|
|
|
code: '',
|
|
|
options: () => BANKS,
|
|
|
})
|
|
|
|
|
|
+const sheetTitle = computed(() => props.title || t('wallet.withdraw.bankSelect.title'))
|
|
|
+
|
|
|
const emit = defineEmits<{
|
|
|
(e: 'update:show', value: boolean): void
|
|
|
(e: 'update:modelValue' | 'update:code', value: string): void
|
|
|
@@ -75,7 +79,7 @@ const handleSelect = (option: BankItem) => {
|
|
|
/>
|
|
|
</button>
|
|
|
<h3 class="withdraw-bank-select-sheet__title">
|
|
|
- {{ props.title }}
|
|
|
+ {{ sheetTitle }}
|
|
|
</h3>
|
|
|
<div class="withdraw-bank-select-sheet__header-right" />
|
|
|
</div>
|
|
|
@@ -86,7 +90,7 @@ const handleSelect = (option: BankItem) => {
|
|
|
class="withdraw-bank-select-sheet__search-input"
|
|
|
type="text"
|
|
|
autocomplete="off"
|
|
|
- placeholder="搜索银行"
|
|
|
+ :placeholder="t('wallet.withdraw.bankSelect.searchPlaceholder')"
|
|
|
>
|
|
|
</div>
|
|
|
|
|
|
@@ -117,7 +121,7 @@ const handleSelect = (option: BankItem) => {
|
|
|
class="withdraw-bank-select-sheet__section"
|
|
|
>
|
|
|
<div class="withdraw-bank-select-sheet__section-title">
|
|
|
- 热门银行
|
|
|
+ {{ t('wallet.withdraw.bankSelect.hotBanks') }}
|
|
|
</div>
|
|
|
<button
|
|
|
v-for="item in hotBanks"
|
|
|
@@ -140,7 +144,7 @@ const handleSelect = (option: BankItem) => {
|
|
|
|
|
|
<div class="withdraw-bank-select-sheet__section">
|
|
|
<div class="withdraw-bank-select-sheet__section-title">
|
|
|
- 全部银行
|
|
|
+ {{ t('wallet.withdraw.bankSelect.allBanks') }}
|
|
|
</div>
|
|
|
<button
|
|
|
v-for="item in allBanks"
|
|
|
@@ -166,7 +170,7 @@ const handleSelect = (option: BankItem) => {
|
|
|
v-if="filteredOptions.length === 0"
|
|
|
class="withdraw-bank-select-sheet__empty"
|
|
|
>
|
|
|
- 暂无匹配银行
|
|
|
+ {{ t('wallet.withdraw.bankSelect.empty') }}
|
|
|
</div>
|
|
|
</section>
|
|
|
</div>
|