Merge pull request #3629 from SergioCrisostomo/fix-week-number-width

Correct time layout when showing week numbers
This commit is contained in:
Aresn 2018-05-16 17:36:17 +08:00 committed by GitHub
commit 2bf3e04753
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View file

@ -6,7 +6,7 @@
v-for="shortcut in shortcuts"
@click="handleShortcutClick(shortcut)">{{ shortcut.text }}</div>
</div>
<div :class="[prefixCls + '-body']">
<div :class="panelBodyClasses">
<div :class="[prefixCls + '-content', prefixCls + '-content-left']" v-show="!isTime">
<div :class="[datePrefixCls + '-header']" v-show="currentView !== 'time'">
<span
@ -171,6 +171,15 @@
}
];
},
panelBodyClasses(){
return [
prefixCls + '-body',
{
[prefixCls + '-body-time']: this.showTime,
[prefixCls + '-body-date']: !this.showTime,
}
]
},
leftDatePanelLabel(){
return this.panelLabelConfig('left');
},

View file

@ -205,7 +205,7 @@
&-with-week-numbers{
.@{picker-prefix-cls}-panel{
&-body{
&-body-date {
min-width: (@date-picker-cells-width-with-weeknumbers + 20) * 2;
}
}
@ -294,4 +294,4 @@
cursor: @cursor-disabled;
}
}
}
}