fix: input not work at firefox && sogou #2151

pull/2222/head
tanjinzhou 2020-05-08 14:24:44 +08:00
parent 352eb84eff
commit abd1b7f499
4 changed files with 8 additions and 2 deletions

View File

@ -173,6 +173,9 @@ export default {
}); });
}, },
handleChange(e) { handleChange(e) {
if (e.inputType === 'insertCompositionText') {
return;
}
const { value, composing } = e.target; const { value, composing } = e.target;
// https://github.com/vueComponent/ant-design-vue/issues/2203 // https://github.com/vueComponent/ant-design-vue/issues/2203
if ((composing && this.lazy) || this.stateValue === value) return; if ((composing && this.lazy) || this.stateValue === value) return;

View File

@ -69,6 +69,9 @@ export default {
this.$emit('input', e); this.$emit('input', e);
}, },
handleChange(e) { handleChange(e) {
if (e.inputType === 'insertCompositionText') {
return;
}
const { value, composing } = e.target; const { value, composing } = e.target;
if ((composing && this.lazy) || this.stateValue === value) return; if ((composing && this.lazy) || this.stateValue === value) return;

View File

@ -98,7 +98,7 @@ export default {
activeKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), activeKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
}, },
updated() { updated() {
setTimeout(() => { this.$nextTick(function() {
componentDidUpdate(this); componentDidUpdate(this);
}); });
}, },

View File

@ -52,7 +52,7 @@ export default {
}, },
updated() { updated() {
setTimeout(() => { this.$nextTick(() => {
this.updatedCal(this.prevProps); this.updatedCal(this.prevProps);
this.prevProps = { ...this.$props }; this.prevProps = { ...this.$props };
}); });