Scrollbar: fix style (#2948)

pull/2961/head
cinwell.li 2017-02-22 15:17:22 +08:00 committed by baiyaaaaa
parent c4367604ab
commit 8ea9e71575
2 changed files with 9 additions and 2 deletions

View File

@ -45,12 +45,15 @@ export default {
if (gutter) {
const gutterWith = `-${gutter}px`;
const gutterStyle = `margin-bottom: ${gutterWith}; margin-right: ${gutterWith};`;
if (Array.isArray(this.wrapStyle)) {
style = util.toObject(this.wrapStyle);
style.marginRight = style.marginBottom = gutterWith;
} else if (typeof this.wrapStyle === 'string') {
style += `margin-bottom: ${gutterWith}; margin-right: ${gutterWith};`;
style += gutterStyle;
} else {
style = gutterStyle;
}
}
const view = h(this.tag, {
@ -63,7 +66,7 @@ export default {
ref="wrap"
style={ style }
onScroll={ this.handleScroll }
class={ [this.wrapClass, 'el-scrollbar__wrap el-scrollbar__wrap--hidden-default'] }>
class={ [this.wrapClass, 'el-scrollbar__wrap', gutter ? '' : 'el-scrollbar__wrap--hidden-default'] }>
{ [view] }
</div>
);

View File

@ -5,6 +5,10 @@
&.has-seconds {
.el-time-spinner__wrapper {
width: 33%;
.el-scrollbar__wrap:not(.el-scrollbar__wrap--hidden-default) {
padding-bottom: 15px;
}
}
.el-time-spinner__wrapper:nth-child(2) {