Merge branch 'master' into my-feature-partial
This commit is contained in:
@@ -5,7 +5,6 @@ import { useI18n } from '../composables/useI18n'
|
||||
|
||||
const { t} = useI18n()
|
||||
|
||||
|
||||
interface Props {
|
||||
modelValue?: string | [string, string]
|
||||
type?: 'date' | 'daterange'
|
||||
@@ -72,9 +71,6 @@ const formatDisplayDate = (dateStr: string) => {
|
||||
const date = new Date(dateStr)
|
||||
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 显示值
|
||||
const displayValue = computed(() => {
|
||||
if (props.type === 'daterange') {
|
||||
@@ -471,7 +467,6 @@ const yearList = computed(() => {
|
||||
return years
|
||||
})
|
||||
|
||||
/*
|
||||
// 月份名称
|
||||
const monthNames = [
|
||||
'一月',
|
||||
@@ -488,7 +483,6 @@ const monthNames = [
|
||||
'十二月',
|
||||
]
|
||||
const weekDays = ['日', '一', '二', '三', '四', '五', '六']
|
||||
*/
|
||||
|
||||
// 生命周期
|
||||
onMounted(() => {
|
||||
@@ -745,7 +739,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">
|
||||
>>
|
||||
@@ -753,7 +747,7 @@ const panelStyle = computed(() => {
|
||||
</div>
|
||||
<div class="el-month-picker__content">
|
||||
<div
|
||||
v-for="(monthName, index) in t.monthNames"
|
||||
v-for="(monthName, index) in monthNames"
|
||||
:key="index"
|
||||
class="el-month-picker__item"
|
||||
:class="{ 'is-current': index === currentMonth }"
|
||||
@@ -775,10 +769,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)">
|
||||
{{ t.monthNames[currentMonth] }}
|
||||
{{ monthNames[currentMonth] }}
|
||||
</span>
|
||||
</span>
|
||||
<button type="button" class="el-picker-panel__icon-btn" @click="nextMonth">
|
||||
@@ -792,7 +786,7 @@ const panelStyle = computed(() => {
|
||||
<div class="el-date-picker__content">
|
||||
<!-- 星期标题 -->
|
||||
<div class="el-date-table__header">
|
||||
<div v-for="day in t.weekDays" :key="day" class="el-date-table__header-cell">
|
||||
<div v-for="day in weekDays" :key="day" class="el-date-table__header-cell">
|
||||
{{ day }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user