html:
<el-button ref="inputResult" @click="inputResult">输入结果</el-button>
js:
this.$nextTick(() => { this.$refs.inputResult.click() })
错误日志:
Vue warn]: Error in nextTick: "TypeError: _this.$refs.inputResult.click is not a function"
如何通过js触发el-button的click时间呢?
繁华开满天机
相关分类