How to click the button to position the cursor in the desired el-input

1.el-inpu

<el-input size="default" v-model="read.ID_NO" ref="inputNameCardN" ></el-input> 

2. Method

const dingwei = function(){
				 _this.$refs.inputNameCardN.focus()
			}

3. The method triggered by the Enter key

<el-input size="default" v-model="read.ID_NO" ref="inputNameCardN" @keyup.enter.native=""></el-input> 

Guess you like

Origin blog.csdn.net/guapilixianghe/article/details/128420041