InputNumber: fix accessing missing $refs in updated hook (#10995)

pull/10975/merge
杨奕 2018-05-03 18:41:10 +08:00 committed by GitHub
parent 31b65b8e51
commit dd773b9e72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -216,7 +216,8 @@
innerInput.setAttribute('aria-disabled', this.inputNumberDisabled);
},
updated() {
let innerInput = this.$refs.input.$refs.input;
if (!this.$refs || !this.$refs.input) return;
const innerInput = this.$refs.input.$refs.input;
innerInput.setAttribute('aria-valuenow', this.currentValue);
}
};