From e55f00ff7ed42ad5a196be554eecad511a0ba45d Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Fri, 16 Dec 2016 15:00:20 +0800 Subject: [PATCH] update DatePicker --- src/styles/components/date-picker.less | 10 +++++++++- test/routers/date.vue | 13 +++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/styles/components/date-picker.less b/src/styles/components/date-picker.less index 6cbccd1..f8da8fa 100644 --- a/src/styles/components/date-picker.less +++ b/src/styles/components/date-picker.less @@ -183,11 +183,19 @@ position: absolute; top: 0; bottom: 0; - background: @border-color-split; + background: @table-thead-bg; + border-right: 1px solid @border-color-split; border-radius: @border-radius-small 0 0 @border-radius-small; + overflow: auto; } &-shortcut{ + padding: @btn-padding-large; + transition: all @transition-time @ease-in-out; + cursor: pointer; + &:hover{ + background: @border-color-split; + } } &-body{ float: left; diff --git a/test/routers/date.vue b/test/routers/date.vue index 36730dc..93fe13c 100644 --- a/test/routers/date.vue +++ b/test/routers/date.vue @@ -27,7 +27,7 @@ data () { return { // value: new Date(), - value: '', + value: '2016-12-25', options: { disabledDate(time) { // console.log(time) @@ -39,9 +39,10 @@ { text: '今天', value () { - return new Date(); +// return new Date(); + return '1/2/19' }, - onClick () { + onClick (picker) { console.log('点击了今天'); } }, @@ -63,9 +64,9 @@ date.setTime(date.getTime() - 3600 * 1000 * 24 * 7); return date; }, -// onClick () { -// console.log('点击了一周前'); -// } + onClick () { + console.log('点击了一周前'); + } } ] }, -- libgit2 0.21.4