Merge - merge updates from gitmigor fork
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch, onMounted, onUnmounted } from 'vue'
|
||||
import { useI18n } from '../composables/useI18n'
|
||||
const { t } = useI18n()
|
||||
|
||||
interface Props {
|
||||
modelValue?: string | [string, string]
|
||||
@@ -97,7 +99,7 @@ watch(
|
||||
singleValue.value = (newValue as string) || ''
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
// 处理单日期输入变化(预留,当前版本不使用)
|
||||
@@ -464,6 +466,7 @@ const yearList = computed(() => {
|
||||
return years
|
||||
})
|
||||
|
||||
/*
|
||||
// 月份名称
|
||||
const monthNames = [
|
||||
'一月',
|
||||
@@ -480,6 +483,7 @@ const monthNames = [
|
||||
'十二月',
|
||||
]
|
||||
const weekDays = ['日', '一', '二', '三', '四', '五', '六']
|
||||
*/
|
||||
|
||||
// 生命周期
|
||||
onMounted(() => {
|
||||
@@ -736,7 +740,7 @@ const panelStyle = computed(() => {
|
||||
<<
|
||||
</button>
|
||||
<span class="el-month-picker__header-label" @click="showYearSelector($event)">
|
||||
{{ currentYear }}年
|
||||
{{ currentYear }}
|
||||
</span>
|
||||
<button type="button" class="el-picker-panel__icon-btn" @click="nextYear">
|
||||
>>
|
||||
@@ -744,7 +748,7 @@ const panelStyle = computed(() => {
|
||||
</div>
|
||||
<div class="el-month-picker__content">
|
||||
<div
|
||||
v-for="(monthName, index) in monthNames"
|
||||
v-for="(monthName, index) in t.monthNames"
|
||||
:key="index"
|
||||
class="el-month-picker__item"
|
||||
:class="{ 'is-current': index === currentMonth }"
|
||||
@@ -766,10 +770,10 @@ const panelStyle = computed(() => {
|
||||
</button>
|
||||
<span class="el-date-picker__header-label">
|
||||
<span class="el-date-picker__header-year" @click="showYearSelector($event)">
|
||||
{{ currentYear }}年
|
||||
{{ currentYear }}
|
||||
</span>
|
||||
<span class="el-date-picker__header-month" @click="showMonthSelector($event)">
|
||||
{{ monthNames[currentMonth] }}
|
||||
{{ t.monthNames[currentMonth] }}
|
||||
</span>
|
||||
</span>
|
||||
<button type="button" class="el-picker-panel__icon-btn" @click="nextMonth">
|
||||
@@ -783,7 +787,7 @@ const panelStyle = computed(() => {
|
||||
<div class="el-date-picker__content">
|
||||
<!-- 星期标题 -->
|
||||
<div class="el-date-table__header">
|
||||
<div v-for="day in weekDays" :key="day" class="el-date-table__header-cell">
|
||||
<div v-for="day in t.weekDays" :key="day" class="el-date-table__header-cell">
|
||||
{{ day }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user