From 36931442588617d7feb7dce0ef431df6332f505f Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Fri, 30 Dec 2016 13:56:34 +0800 Subject: [PATCH] update DateTimePicker --- src/components/date-picker/panel/date.vue | 15 ++++++++++++++- src/components/date-picker/panel/time.vue | 41 ++++++++++++++++++++++------------------- src/components/date-picker/picker.vue | 3 --- test/routers/date.vue | 6 +++--- 4 files changed, 39 insertions(+), 26 deletions(-) diff --git a/src/components/date-picker/panel/date.vue b/src/components/date-picker/panel/date.vue index d10e247..6235b5f 100644 --- a/src/components/date-picker/panel/date.vue +++ b/src/components/date-picker/panel/date.vue @@ -60,8 +60,8 @@ @on-pick="handleMonthPick" @on-pick-click="handlePickClick"> diff --git a/src/components/date-picker/panel/time.vue b/src/components/date-picker/panel/time.vue index 7277d1f..5ed1835 100644 --- a/src/components/date-picker/panel/time.vue +++ b/src/components/date-picker/panel/time.vue @@ -37,29 +37,32 @@ export default { mixins: [Mixin], components: { TimeSpinner, Confirm }, - props: { - date: { - default () { - return initTimeDate(); - } - }, - value: { - default: '' - }, - showDate: { - type: Boolean, - default: false - }, - format: { - type: String, - default: 'HH:mm:ss' - } - }, +// props: { +// date: { +// default () { +// return initTimeDate(); +// } +// }, +// value: { +// default: '' +// }, +// showDate: { +// type: Boolean, +// default: false +// }, +// format: { +// type: String, +// default: 'HH:mm:ss' +// } +// }, data () { return { prefixCls: prefixCls, timePrefixCls: timePrefixCls, -// format: 'HH:mm:ss', + date: initTimeDate(), + value: '', + showDate: false, + format: 'HH:mm:ss', hours: '', minutes: '', seconds: '', diff --git a/src/components/date-picker/picker.vue b/src/components/date-picker/picker.vue index be95418..588c849 100644 --- a/src/components/date-picker/picker.vue +++ b/src/components/date-picker/picker.vue @@ -398,13 +398,10 @@ this.handleClear(); }); this.picker.$on('on-pick-success', () => { -// this.emitChange(this.value); this.visible = false; this.$emit('on-ok'); }); this.picker.$on('on-pick-click', () => this.disableClickOutSide = true); - - // todo $on('on-time-range') } if (this.internalValue instanceof Date) { this.picker.date = new Date(this.internalValue.getTime()); diff --git a/test/routers/date.vue b/test/routers/date.vue index 6d48363..992f291 100644 --- a/test/routers/date.vue +++ b/test/routers/date.vue @@ -5,9 +5,9 @@