From e9dd4dab011911c4200be22f384fd79c8a018119 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Tue, 20 Dec 2016 14:23:12 +0800 Subject: [PATCH] publish 0.9.11-rc-1 --- package.json | 2 +- src/components/date-picker/picker.vue | 52 +++++++++++++++++++++++++++++++--------------------- test/routers/date.vue | 5 ++++- 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 2abae61..0403b7c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iview", - "version": "0.9.10", + "version": "0.9.11-rc-1", "title": "iView", "description": "A high quality UI components Library with Vue.js", "homepage": "http://www.iviewui.com", diff --git a/src/components/date-picker/picker.vue b/src/components/date-picker/picker.vue index 1995050..3911f1d 100644 --- a/src/components/date-picker/picker.vue +++ b/src/components/date-picker/picker.vue @@ -2,22 +2,24 @@
- - +
+ + + +
+
@@ -166,6 +168,10 @@ type: Boolean, default: false }, + open: { + type: Boolean, + default: null + }, size: { validator (value) { return oneOf(value, ['small', 'large']); @@ -195,6 +201,9 @@ } }, computed: { + opened () { + return this.open === null ? this.visible : this.open; + }, iconType () { return this.showClose ? 'ios-close' : 'ios-calendar-outline'; }, @@ -248,9 +257,6 @@ if (this.readonly) return; this.visible = true; }, - handleBlur () { - - }, handleInputChange (event) { const oldValue = this.visualValue; const value = event.target.value; @@ -325,7 +331,6 @@ this.visible = false; this.internalValue = ''; this.value = ''; - this.emitChange(this.value); }, showPicker () { if (!this.picker) { @@ -353,7 +358,7 @@ this.handleClear(); }); this.picker.$on('on-pick-success', () => { - this.emitChange(this.value); +// this.emitChange(this.value); this.visible = false; }); @@ -406,6 +411,11 @@ if (this.picker) { this.picker.$destroy(); } + }, + ready () { + if (this.open !== null) { + this.visible = this.open; + } } } \ No newline at end of file diff --git a/test/routers/date.vue b/test/routers/date.vue index 26b5134..e40c26c 100644 --- a/test/routers/date.vue +++ b/test/routers/date.vue @@ -14,7 +14,10 @@ @on-change="change" :confirm="true" :options="options" - @on-open-change="change2"> + open + @on-open-change="change2"> +

123

+