From f8f15fae6c5d509f55804df7aa0caa02ac04f93b Mon Sep 17 00:00:00 2001 From: zhangjunjie Date: Wed, 4 Sep 2019 10:03:13 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E5=B8=A6=E6=97=B6=E9=97=B4=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=97=B6=20input=20=E5=AE=BD=E5=BA=A6=E8=B0=83?= =?UTF-8?q?=E6=95=B4;=20=E5=8C=BA=E5=88=86=E9=80=89=E6=8B=A9=E5=99=A8?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=B8=A6=E6=97=B6=E9=97=B4=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E8=80=8C=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=90=8C=E7=9A=84=E5=9B=BE?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/date-picker/BasePicker.js | 9 +++++---- components/date-picker/style/index.scss | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/components/date-picker/BasePicker.js b/components/date-picker/BasePicker.js index ae183cb54..4a136c07f 100644 --- a/components/date-picker/BasePicker.js +++ b/components/date-picker/BasePicker.js @@ -264,11 +264,11 @@ class BasePicker extends Component { } _icon () { const {isFocus} = this.state - const { clearable } = this.props + const { clearable, type, showTime } = this.props const iconCls = classNames( 'hi-datepicker__input-icon', 'hi-icon', - (isFocus && clearable) ? 'icon-close-circle clear' : 'icon-date' + (isFocus && clearable) ? 'icon-close-circle clear' : ((showTime || type === 'timeperiod') ? 'icon-time' : 'icon-date') ) return (isFocus && clearable) ? @@ -282,12 +282,13 @@ class BasePicker extends Component { const { localeDatas, disabled, - showTime + showTime, + type } = this.props const _cls = classNames( 'hi-datepicker__input', 'hi-datepicker__input--range', - showTime && 'hi-datepicker__input--range-time', + (showTime || type === 'timeperiod') && 'hi-datepicker__input--range-time', disabled && 'hi-datepicker__input--disabled' ) return ( diff --git a/components/date-picker/style/index.scss b/components/date-picker/style/index.scss index 546079f20..6824e2844 100644 --- a/components/date-picker/style/index.scss +++ b/components/date-picker/style/index.scss @@ -32,6 +32,10 @@ $basic-color: #4284f5 !default; &--range { width: 320px; + &-time { + width: 400px; + } + input { flex: 0 1 40%; text-align: center;