Skip to content

Commit 718f999

Browse files
jevin98sleeprite
authored andcommitted
!458 chore(datePicker): 新增类型为datetime底部选择日期/时间 i18翻译
* chore(datePicker): 新增类型为datetime底部选择日期/时间 i18翻译
1 parent 322a544 commit 718f999

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/component/component/datePicker/component/DatePicker.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import type {
77
import { computed, ref, watch } from "vue";
88
import dayjs, { type Dayjs } from "dayjs";
99
10+
import { useI18n } from "../../../language";
1011
import { isFunction } from "../../../utils";
1112
1213
import { useBaseDatePicker } from "../hook/useBaseDatePicker";
@@ -28,6 +29,7 @@ const showDate = ref<Dayjs>(dayjs());
2829
const currentType = ref();
2930
3031
const { getDefaultValue } = useBaseDatePicker(props);
32+
const { t } = useI18n();
3133
3234
watch(
3335
() => props.modelValue,
@@ -209,7 +211,11 @@ const footerValue = () => {
209211
:class="{ 'type-time': currentType === 'time' }"
210212
@click="handleToggleTimePanel"
211213
>
212-
{{ currentType === "date" ? "选择时间" : "选择日期" }}
214+
{{
215+
currentType === "date"
216+
? t("datePicker.selectTime")
217+
: t("datePicker.selectDate")
218+
}}
213219
</LayButton>
214220
<template v-else>{{ footerValue() }}</template>
215221
</slot>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy