From e872756fc3c8dc943953bb86052530568aab2f5a Mon Sep 17 00:00:00 2001 From: Nur Muhammad Date: Thu, 18 Mar 2021 20:16:43 +0800 Subject: [PATCH] feat: add default icon for 'time' type (#583) --- src/date-picker.js | 4 +++- src/icon/icon-time.vue | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 src/icon/icon-time.vue diff --git a/src/date-picker.js b/src/date-picker.js index f8fda9ed..fa794500 100644 --- a/src/date-picker.js +++ b/src/date-picker.js @@ -4,6 +4,7 @@ import { pick, isObject, mergeDeep } from './util/base'; import { getLocale } from './locale'; import Popup from './popup'; import IconCalendar from './icon/icon-calendar'; +import IconTime from './icon/icon-time'; import IconClose from './icon/icon-close'; import CalendarPanel from './calendar/calendar-panel'; import CalendarRange from './calendar/calendar-range'; @@ -465,6 +466,7 @@ export default { events, } ); + const calendarIcon = this.type === 'time' ? : ; return (
{input} @@ -474,7 +476,7 @@ export default { ) : null} - {this.renderSlot('icon-calendar', )} + {this.renderSlot('icon-calendar', calendarIcon)}
); diff --git a/src/icon/icon-time.vue b/src/icon/icon-time.vue new file mode 100644 index 00000000..edaccfc5 --- /dev/null +++ b/src/icon/icon-time.vue @@ -0,0 +1,9 @@ +