Commit e8ec6c03 authored by linhuandong's avatar linhuandong

加入lazy

parent 7f54540b
{
"name": "element-ui",
"version": "2.15.7",
"version": "2.15.7666",
"description": "A Component Library for Vue.js.",
"main": "lib/element-ui.common.js",
"files": [
......
......@@ -189,6 +189,10 @@
type: Boolean,
default: false
},
lazy: {
type: [Boolean, Object],
default: false
},
tabindex: String
},
......@@ -308,6 +312,9 @@
if (this.validateEvent) {
this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
}
if (this.lazy) {
this.handleInput(event, true);
}
},
select() {
this.getInput().select();
......@@ -354,10 +361,10 @@
this.handleInput(event);
}
},
handleInput(event) {
handleInput(event, refresh) {
// should not emit input during composition
// see: https://github.com/ElemeFE/element/issues/10516
if (this.isComposing) return;
if (this.isComposing || (this.lazy && !refresh)) return;
// hack for https://github.com/ElemeFE/element/issues/8548
// should remove the following line when we don't support IE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment