Merge branch 'dev' into next
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { createNamespace } from '../../utils';
|
||||
import { createNamespace, addUnit } from '../../utils';
|
||||
import { setScrollTop } from '../../utils/dom/scroll';
|
||||
import {
|
||||
t,
|
||||
@@ -44,6 +44,12 @@ export default createComponent({
|
||||
return formatMonthTitle(this.date);
|
||||
},
|
||||
|
||||
rowHeightWithUnit() {
|
||||
if (this.rowHeight !== ROW_HEIGHT) {
|
||||
return addUnit(this.rowHeight);
|
||||
}
|
||||
},
|
||||
|
||||
offset() {
|
||||
const { firstDayOfWeek } = this;
|
||||
|
||||
@@ -209,16 +215,14 @@ export default createComponent({
|
||||
},
|
||||
|
||||
getDayStyle(type, index) {
|
||||
const style = {};
|
||||
const style = {
|
||||
height: this.rowHeightWithUnit,
|
||||
};
|
||||
|
||||
if (index === 0) {
|
||||
style.marginLeft = `${(100 * this.offset) / 7}%`;
|
||||
}
|
||||
|
||||
if (this.rowHeight !== ROW_HEIGHT) {
|
||||
style.height = `${this.rowHeight}px`;
|
||||
}
|
||||
|
||||
if (this.color) {
|
||||
if (
|
||||
type === 'start' ||
|
||||
@@ -287,7 +291,14 @@ export default createComponent({
|
||||
tabindex={-1}
|
||||
onClick={onClick}
|
||||
>
|
||||
<div class={bem('selected-day')} style={{ background: this.color }}>
|
||||
<div
|
||||
class={bem('selected-day')}
|
||||
style={{
|
||||
width: this.rowHeightWithUnit,
|
||||
height: this.rowHeightWithUnit,
|
||||
background: this.color,
|
||||
}}
|
||||
>
|
||||
{TopInfo}
|
||||
{item.text}
|
||||
{BottomInfo}
|
||||
|
||||
Reference in New Issue
Block a user