⬇️(vue-i18n): 回退版本
This commit is contained in:
parent
e579bf774f
commit
261853cf00
@ -41,7 +41,7 @@
|
||||
"@umijs/ssr-darkreader": "^4.9.45",
|
||||
"dayjs": "^1.11.0",
|
||||
"evtd": "^0.2.3",
|
||||
"vue-i18n": "^9.2.2",
|
||||
"vue-i18n": "^9.1.10",
|
||||
"@ctrl/tinycolor": "^3.4.1"
|
||||
},
|
||||
"files": [
|
||||
|
@ -14,10 +14,11 @@
|
||||
>
|
||||
<div class="laydate-set-ym">
|
||||
<span @click="datePicker.showPanel.value = 'year'"
|
||||
>{{ datePicker.currentYear.value }} {{ t('datePicker.year') }}</span
|
||||
>{{ datePicker.currentYear.value }} {{ t("datePicker.year") }}</span
|
||||
>
|
||||
<span @click="datePicker.showPanel.value = 'month'"
|
||||
>{{ datePicker.currentMonth.value + 1 }} {{ t('datePicker.month') }}</span
|
||||
>{{ datePicker.currentMonth.value + 1 }}
|
||||
{{ t("datePicker.month") }}</span
|
||||
>
|
||||
</div>
|
||||
<i
|
||||
@ -42,7 +43,7 @@
|
||||
v-if="datePicker.type === 'datetime'"
|
||||
@click="datePicker.showPanel.value = 'time'"
|
||||
class="laydate-btns-time"
|
||||
>{{ t('datePicker.selectTime')}}</span
|
||||
>{{ t("datePicker.selectTime") }}</span
|
||||
>
|
||||
</PanelFoot>
|
||||
</div>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<div class="laydate-set-ym">
|
||||
<lay-dropdown ref="dropdownYearPanelRefLeft">
|
||||
<span class="laydate-range-time"
|
||||
>{{ startTime.year || "--" }} {{ t('datePicker.year') }}</span
|
||||
>{{ startTime.year || "--" }} {{ t("datePicker.year") }}</span
|
||||
>
|
||||
<template #content>
|
||||
<YearPanel
|
||||
@ -31,7 +31,7 @@
|
||||
</lay-dropdown>
|
||||
<lay-dropdown ref="dropdownMonthPanelRefLeft">
|
||||
<span class="laydate-range-time"
|
||||
>{{ startTime.month + 1 }} {{ t('datePicker.month') }}</span
|
||||
>{{ startTime.month + 1 }} {{ t("datePicker.month") }}</span
|
||||
>
|
||||
<template #content>
|
||||
<MonthPanel
|
||||
@ -75,7 +75,9 @@
|
||||
<div class="layui-laydate-header">
|
||||
<div class="laydate-set-ym">
|
||||
<lay-dropdown ref="dropdownYearPanelRefRight">
|
||||
<span class="laydate-range-time">{{ startTime.year }} {{ t('datePicker.year') }}</span>
|
||||
<span class="laydate-range-time"
|
||||
>{{ startTime.year }} {{ t("datePicker.year") }}</span
|
||||
>
|
||||
<template #content>
|
||||
<YearPanel
|
||||
class="time-panel"
|
||||
@ -90,7 +92,8 @@
|
||||
startTime.month + 2 > 12
|
||||
? startTime.month - 10
|
||||
: startTime.month + 2
|
||||
}} {{ t('datePicker.month') }}</span
|
||||
}}
|
||||
{{ t("datePicker.month") }}</span
|
||||
>
|
||||
<template #content>
|
||||
<MonthPanel
|
||||
@ -199,7 +202,7 @@ const emits = defineEmits([
|
||||
]);
|
||||
const datePicker: provideType = inject("datePicker") as provideType;
|
||||
|
||||
const { t } = useI18n();
|
||||
const { t } = useI18n();
|
||||
|
||||
const prevDateList = ref<any>([]);
|
||||
const nextDateList = ref<any>([]);
|
||||
|
@ -4,7 +4,9 @@
|
||||
<div class="layui-laydate-header">
|
||||
<div class="laydate-set-ym">
|
||||
<span @click="datePicker.showPanel.value = 'month'">{{
|
||||
typeof Month !== "string" ? Month + 1 + t('datePicker.month') : t('datePicker.selectMonth')
|
||||
typeof Month !== "string"
|
||||
? Month + 1 + t("datePicker.month")
|
||||
: t("datePicker.selectMonth")
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -26,7 +28,7 @@
|
||||
v-if="datePicker.type === 'yearmonth'"
|
||||
@click="datePicker.showPanel.value = 'year'"
|
||||
class="laydate-btns-time"
|
||||
>{{ t('datePicker.selectYear') }}</span
|
||||
>{{ t("datePicker.selectYear") }}</span
|
||||
>
|
||||
</PanelFoot>
|
||||
</div>
|
||||
|
@ -11,7 +11,7 @@
|
||||
<div class="laydate-set-ym">
|
||||
<lay-dropdown ref="dropdownYearPanelRefLeft">
|
||||
<span class="laydate-range-time"
|
||||
>{{ startTime.year || "--" }} {{ t('datePicker.year') }}</span
|
||||
>{{ startTime.year || "--" }} {{ t("datePicker.year") }}</span
|
||||
>
|
||||
<template #content>
|
||||
<YearPanel
|
||||
@ -49,7 +49,9 @@
|
||||
<div class="layui-laydate-header">
|
||||
<div class="laydate-set-ym">
|
||||
<lay-dropdown ref="dropdownYearPanelRefRight">
|
||||
<span class="laydate-range-time">{{ startTime.year + 1 }} {{ t('datePicker.year') }}</span>
|
||||
<span class="laydate-range-time"
|
||||
>{{ startTime.year + 1 }} {{ t("datePicker.year") }}</span
|
||||
>
|
||||
<template #content>
|
||||
<YearPanel
|
||||
class="time-panel"
|
||||
|
@ -2,15 +2,15 @@
|
||||
<div class="layui-laydate-footer">
|
||||
<slot></slot>
|
||||
<div class="laydate-footer-btns">
|
||||
<span lay-type="clear" class="laydate-btns-clear" @click="handelClear"
|
||||
>{{ t('datePicker.clear')}}</span
|
||||
>
|
||||
<span lay-type="now" class="laydate-btns-now" @click="handelNow"
|
||||
>{{ t('datePicker.now')}}</span
|
||||
>
|
||||
<span lay-type="confirm" class="laydate-btns-confirm" @click="handelOk"
|
||||
>{{ t('datePicker.confirm')}}</span
|
||||
>
|
||||
<span lay-type="clear" class="laydate-btns-clear" @click="handelClear">{{
|
||||
t("datePicker.clear")
|
||||
}}</span>
|
||||
<span lay-type="now" class="laydate-btns-now" @click="handelNow">{{
|
||||
t("datePicker.now")
|
||||
}}</span>
|
||||
<span lay-type="confirm" class="laydate-btns-confirm" @click="handelOk">{{
|
||||
t("datePicker.confirm")
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -20,8 +20,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from '../../../language';
|
||||
|
||||
import { useI18n } from "../../../language";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
|
@ -3,7 +3,9 @@
|
||||
<div class="layui-laydate-main laydate-main-list-0 laydate-time-show">
|
||||
<div class="layui-laydate-header">
|
||||
<div class="laydate-set-ym">
|
||||
<span class="laydate-time-text">{{t('datePicker.selectTime')}}</span>
|
||||
<span class="laydate-time-text">{{
|
||||
t("datePicker.selectTime")
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-laydate-content" style="height: 210px">
|
||||
@ -35,7 +37,7 @@
|
||||
v-if="datePicker.type === 'datetime' && !datePicker.range"
|
||||
@click="datePicker.showPanel.value = 'datetime'"
|
||||
class="laydate-btns-time"
|
||||
>{{t('datePicker.selectDate')}}</span
|
||||
>{{ t("datePicker.selectDate") }}</span
|
||||
>
|
||||
<template v-else-if="!isNaN(hms.hh) && !isNaN(hms.mm) && !isNaN(hms.ss)">
|
||||
{{
|
||||
|
@ -3,7 +3,9 @@
|
||||
<div class="layui-laydate-main laydate-main-list-0 laydate-ym-show">
|
||||
<div class="layui-laydate-header">
|
||||
<div class="laydate-set-ym">
|
||||
<span class="laydate-time-text">{{t('datePicker.selectYear')}}</span>
|
||||
<span class="laydate-time-text">{{
|
||||
t("datePicker.selectYear")
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -28,7 +30,7 @@
|
||||
v-if="datePicker.type === 'yearmonth'"
|
||||
@click="datePicker.showPanel.value = 'month'"
|
||||
class="laydate-btns-time"
|
||||
>{{t('datePicker.selectMonth')}}</span
|
||||
>{{ t("datePicker.selectMonth") }}</span
|
||||
>
|
||||
<template v-else-if="Year > 0">{{ Year }}</template>
|
||||
</PanelFoot>
|
||||
|
@ -15,13 +15,14 @@ export interface EmptyProps {
|
||||
image?: string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<EmptyProps>(), {
|
||||
});
|
||||
const props = withDefaults(defineProps<EmptyProps>(), {});
|
||||
|
||||
const { t } = useI18n();
|
||||
const slots = useSlots();
|
||||
|
||||
const description = computed(() => props.description ? props.description : t('empty.description'))
|
||||
const description = computed(() =>
|
||||
props.description ? props.description : t("empty.description")
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -138,7 +138,8 @@ watch(
|
||||
<template>
|
||||
<div class="layui-laypage layui-laypage-default">
|
||||
<span v-if="showCount" class="layui-laypage-count"
|
||||
>{{ t("page.total") }} {{ total }} {{ t("page.item") }} {{ maxPage }} {{ t("page.page") }}</span
|
||||
>{{ t("page.total") }} {{ total }} {{ t("page.item") }} {{ maxPage }}
|
||||
{{ t("page.page") }}</span
|
||||
>
|
||||
<a
|
||||
href="javascript:;"
|
||||
@ -200,7 +201,7 @@ watch(
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
</a>
|
||||
<span v-if="props.showSkip" class="layui-laypage-skip">
|
||||
{{ t('page.goTo') }}
|
||||
{{ t("page.goTo") }}
|
||||
<input
|
||||
v-model="currentPageShow"
|
||||
@keypress.enter="jumpPage()"
|
||||
@ -213,7 +214,7 @@ watch(
|
||||
@click="jumpPage()"
|
||||
:disabled="currentPageShow > maxPage || currentPageShow == currentPage"
|
||||
>
|
||||
{{ t('page.confirm') }}
|
||||
{{ t("page.confirm") }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -9,7 +9,7 @@ export default {
|
||||
confirm: "confirm",
|
||||
page: "page",
|
||||
item: "item",
|
||||
total: "Total"
|
||||
total: "Total",
|
||||
},
|
||||
datePicker: {
|
||||
year: "year",
|
||||
@ -28,9 +28,9 @@ export default {
|
||||
clear: "clear",
|
||||
confirm: "confirm",
|
||||
cancel: "cancel",
|
||||
now: "now"
|
||||
now: "now",
|
||||
},
|
||||
empty: {
|
||||
description: "No data"
|
||||
}
|
||||
description: "No data",
|
||||
},
|
||||
};
|
||||
|
@ -9,7 +9,7 @@ export default {
|
||||
confirm: "确认",
|
||||
page: "页",
|
||||
item: "条",
|
||||
total: "共"
|
||||
total: "共",
|
||||
},
|
||||
datePicker: {
|
||||
year: "年",
|
||||
@ -28,9 +28,9 @@ export default {
|
||||
clear: "清空",
|
||||
confirm: "确认",
|
||||
cancel: "取消",
|
||||
now: "现在"
|
||||
now: "现在",
|
||||
},
|
||||
empty: {
|
||||
description: "无数据"
|
||||
}
|
||||
description: "无数据",
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user