fix:修复日历视图设置高度不生效 (#3592)
This commit is contained in:
parent
93f5a61ae2
commit
06a3daee6c
|
@ -5,6 +5,7 @@
|
||||||
.@{calendar-view-prefix-cls} {
|
.@{calendar-view-prefix-cls} {
|
||||||
@apply w-full;
|
@apply w-full;
|
||||||
@apply h-auto;
|
@apply h-auto;
|
||||||
|
@apply overflow-auto;
|
||||||
|
|
||||||
&__header {
|
&__header {
|
||||||
@apply flex;
|
@apply flex;
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div data-tag="tiny-calendar-view" class="w-full h-auto">
|
<div
|
||||||
|
data-tag="tiny-calendar-view"
|
||||||
|
class="w-full h-auto overflow-auto"
|
||||||
|
:style="{ 'height': height ? `${parseInt(height)}px` : 'auto' }"
|
||||||
|
>
|
||||||
<tiny-tooltip ref="tooltip" popper-class="absolute max-w-[theme(spacing.80)]" effect="light" placement="right">
|
<tiny-tooltip ref="tooltip" popper-class="absolute max-w-[theme(spacing.80)]" effect="light" placement="right">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="p-2 max-h-[80vh] overflow-auto">
|
<div class="p-2 max-h-[80vh] overflow-auto">
|
||||||
|
@ -171,7 +175,9 @@
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="relative mr-2.5 text-base"
|
class="relative mr-2.5 text-base"
|
||||||
:class="[dateIsToday(date.value) || computedSelectDay(date) ? 'text-color-brand' : 'text-color-text-primary']"
|
:class="[
|
||||||
|
dateIsToday(date.value) || computedSelectDay(date) ? 'text-color-brand' : 'text-color-text-primary'
|
||||||
|
]"
|
||||||
>
|
>
|
||||||
<span>{{ date.value.split('-')[2] }}</span>
|
<span>{{ date.value.split('-')[2] }}</span>
|
||||||
<span
|
<span
|
||||||
|
@ -182,7 +188,11 @@
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="text-sm"
|
class="text-sm"
|
||||||
:class="[dateIsToday(date.value) || computedSelectDay(date) ? 'text-color-brand' : 'text-color-text-placeholder']"
|
:class="[
|
||||||
|
dateIsToday(date.value) || computedSelectDay(date)
|
||||||
|
? 'text-color-brand'
|
||||||
|
: 'text-color-text-placeholder'
|
||||||
|
]"
|
||||||
>{{ dateIsToday(date.value) ? t('ui.datepicker.today') : t(`ui.calendarView.weekDays.${index}`) }}</span
|
>{{ dateIsToday(date.value) ? t('ui.datepicker.today') : t(`ui.calendarView.weekDays.${index}`) }}</span
|
||||||
>
|
>
|
||||||
</slot>
|
</slot>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="tiny-calendar-view" :style="{ 'height': typeof height === 'number' ? height + 'px' : height }">
|
<div class="tiny-calendar-view" :style="{ 'height': height ? `${parseInt(height)}px` : 'auto'}">
|
||||||
<div class="tiny-calendar-view__header">
|
<div class="tiny-calendar-view__header">
|
||||||
<div>
|
<div>
|
||||||
<tiny-button v-if="showBackToday" @click="toToday">{{ t('ui.calendarView.backToday') }}</tiny-button>
|
<tiny-button v-if="showBackToday" @click="toToday">{{ t('ui.calendarView.backToday') }}</tiny-button>
|
||||||
|
|
Loading…
Reference in New Issue