From 62c7f997806322809861d3e9675b66487fef03f6 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Fri, 30 Dec 2016 11:15:13 +0800 Subject: [PATCH] update DateTimePicker --- src/components/date-picker/panel/time.vue | 2 +- src/styles/components/time-picker.less | 31 ++++++++++++++++++++++++++++--- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/components/date-picker/panel/time.vue b/src/components/date-picker/panel/time.vue index d35010c..fb37a36 100644 --- a/src/components/date-picker/panel/time.vue +++ b/src/components/date-picker/panel/time.vue @@ -39,7 +39,7 @@ props: { date: { default () { - return initTimeDate() + return initTimeDate(); } }, value: { diff --git a/src/styles/components/time-picker.less b/src/styles/components/time-picker.less index fb269e7..812534d 100644 --- a/src/styles/components/time-picker.less +++ b/src/styles/components/time-picker.less @@ -1,6 +1,10 @@ @time-picker-prefix-cls: ~"@{css-prefix}time-picker"; -@time-picker-cells-width: 112px; -@time-picker-cells-width-with-seconds: @time-picker-cells-width + 56px; +@time-picker-cells-width-base: 56px; +@time-picker-cells-width-with-date-base: 72px; +@time-picker-cells-width: @time-picker-cells-width-base * 2; +@time-picker-cells-width-with-seconds: @time-picker-cells-width-base *3; +@time-picker-cells-width-with-date: @time-picker-cells-width-with-date-base * 2; +@time-picker-cells-width-with-date-with-seconds: @time-picker-cells-width-with-date-base * 3; .@{time-picker-prefix-cls} { &-cells{ @@ -10,7 +14,7 @@ } &-list{ - width: 56px; + width: @time-picker-cells-width-base; float: left; position: relative; max-height: 144px; @@ -119,4 +123,25 @@ } } } +} + +.@{picker-prefix-cls}-panel-content{ + .@{picker-prefix-cls}-panel-content{ + .@{time-picker-prefix-cls}{ + &-cells{ + min-width: @time-picker-cells-width-with-date; + &-with-seconds{ + min-width: @time-picker-cells-width-with-date-with-seconds; + } + &-list { + width: @time-picker-cells-width-with-date-base; + ul{ + li{ + padding: 0 0 0 28px; + } + } + } + } + } + } } \ No newline at end of file -- libgit2 0.21.4