code refactor

This commit is contained in:
MaysWind
2023-07-16 23:05:11 +08:00
parent ed4040f2ec
commit 25f83a98e3
6 changed files with 30 additions and 8 deletions
@@ -28,10 +28,10 @@
:preset-ranges="presetRanges"
v-model="dateRange">
<template #month="{ text }">
{{ $t(`datetime.${text}.short`) }}
{{ getMonthShortName(text) }}
</template>
<template #month-overlay-value="{ text }">
{{ $t(`datetime.${text}.short`) }}
{{ getMonthShortName(text) }}
</template>
</vue-date-picker>
</v-card-text>
@@ -188,6 +188,9 @@ export default {
},
cancel() {
this.$emit('update:show', false);
},
getMonthShortName(month) {
return this.$locale.getMonthShortName(month);
}
}
}