update TimePicker css

update TimePicker css
This commit is contained in:
梁灏 2017-01-03 11:52:22 +08:00
parent 420ef34349
commit 7c4c9d9ce9
3 changed files with 11 additions and 74 deletions

View file

@ -175,12 +175,10 @@
},
updateScroll () {
const times = ['hours', 'minutes', 'seconds'];
times.forEach(type => this.$els[type].style.overflow = 'hidden');
this.$nextTick(() => {
times.forEach(type => {
this.$els[type].scrollTop = 24 * this.getScrollIndex(type, this[type]);
});
this.$nextTick(() => times.forEach(type => this.$els[type].style.overflow = 'auto'));
});
},
formatTime (text) {

View file

@ -15,11 +15,15 @@
&-list{
width: @time-picker-cells-width-base;
float: left;
position: relative;
max-height: 144px;
overflow-y: auto;
float: left;
overflow: hidden;
border-left: 1px solid @border-color-split;
position: relative;
&:hover{
overflow-y: auto;
}
&:first-child{
border-left: none;
border-radius: @btn-border-radius 0 0 @btn-border-radius;
@ -38,7 +42,7 @@
line-height: 24px;
margin: 0;
padding: 0 0 0 16px;
box-sizing: border-box;
box-sizing: content-box;
text-align: left;
user-select: none;
cursor: pointer;