项目开发中经常会遇到输入框input获得焦点后自动选中内容,可以通过foucus实现
//input中绑定foucus方法
<input @focus=" focus($event)" />
//得到焦点选中
focus:function( event) {
event.currentTarget. select()
}
项目开发中经常会遇到输入框input获得焦点后自动选中内容,可以通过foucus实现
//input中绑定foucus方法
<input @focus=" focus($event)" />
//得到焦点选中
focus:function( event) {
event.currentTarget. select()
}