publish 0.9.11-rc-1

publish 0.9.11-rc-1
This commit is contained in:
梁灏 2016-12-20 14:23:12 +08:00
parent b9041a0df9
commit e9dd4dab01
3 changed files with 36 additions and 23 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "iview", "name": "iview",
"version": "0.9.10", "version": "0.9.11-rc-1",
"title": "iView", "title": "iView",
"description": "A high quality UI components Library with Vue.js", "description": "A high quality UI components Library with Vue.js",
"homepage": "http://www.iviewui.com", "homepage": "http://www.iviewui.com",

View file

@ -2,22 +2,24 @@
<div <div
:class="[prefixCls]" :class="[prefixCls]"
v-clickoutside="handleClose"> v-clickoutside="handleClose">
<i-input <div v-el:reference>
v-el:reference <slot>
:class="[prefixCls + '-editor']" <i-input
:readonly="!editable || readonly" :class="[prefixCls + '-editor']"
:disabled="disabled" :readonly="!editable || readonly"
:size="size" :disabled="disabled"
:placeholder="placeholder" :size="size"
:value="visualValue" :placeholder="placeholder"
@on-change="handleInputChange" :value="visualValue"
@on-focus="handleFocus" @on-change="handleInputChange"
@on-blur="handleBlur" @on-focus="handleFocus"
@on-click="handleIconClick" @on-click="handleIconClick"
@mouseenter="handleInputMouseenter" @mouseenter="handleInputMouseenter"
@mouseleave="handleInputMouseleave" @mouseleave="handleInputMouseleave"
:icon="iconType"></i-input> :icon="iconType"></i-input>
<Drop v-show="visible" :placement="placement" transition="slide-up" v-ref:drop> </slot>
</div>
<Drop v-show="opened" :placement="placement" transition="slide-up" v-ref:drop>
<div v-el:picker></div> <div v-el:picker></div>
</Drop> </Drop>
</div> </div>
@ -166,6 +168,10 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
open: {
type: Boolean,
default: null
},
size: { size: {
validator (value) { validator (value) {
return oneOf(value, ['small', 'large']); return oneOf(value, ['small', 'large']);
@ -195,6 +201,9 @@
} }
}, },
computed: { computed: {
opened () {
return this.open === null ? this.visible : this.open;
},
iconType () { iconType () {
return this.showClose ? 'ios-close' : 'ios-calendar-outline'; return this.showClose ? 'ios-close' : 'ios-calendar-outline';
}, },
@ -247,9 +256,6 @@
handleFocus () { handleFocus () {
if (this.readonly) return; if (this.readonly) return;
this.visible = true; this.visible = true;
},
handleBlur () {
}, },
handleInputChange (event) { handleInputChange (event) {
const oldValue = this.visualValue; const oldValue = this.visualValue;
@ -325,7 +331,6 @@
this.visible = false; this.visible = false;
this.internalValue = ''; this.internalValue = '';
this.value = ''; this.value = '';
this.emitChange(this.value);
}, },
showPicker () { showPicker () {
if (!this.picker) { if (!this.picker) {
@ -353,7 +358,7 @@
this.handleClear(); this.handleClear();
}); });
this.picker.$on('on-pick-success', () => { this.picker.$on('on-pick-success', () => {
this.emitChange(this.value); // this.emitChange(this.value);
this.visible = false; this.visible = false;
}); });
@ -406,6 +411,11 @@
if (this.picker) { if (this.picker) {
this.picker.$destroy(); this.picker.$destroy();
} }
},
ready () {
if (this.open !== null) {
this.visible = this.open;
}
} }
} }
</script> </script>

View file

@ -14,7 +14,10 @@
@on-change="change" @on-change="change"
:confirm="true" :confirm="true"
:options="options" :options="options"
@on-open-change="change2"></date-picker> open
@on-open-change="change2">
<p>123</p>
</date-picker>
</i-col> </i-col>
<i-col span="8"> <i-col span="8">
<date-picker <date-picker