// 给table 循环的input 点击的时候获取焦点
// 1、给input 设置ref 属性
<el-input
  v-else
  ref="refInput"
  @blur="(scope.row.code = !scope.row.code), changeBlur()"
  v-model="scope.row[item.prop]"
  :placeholder="'请输入内容' + item.label"
/>
// 1、给input的ref属性在setup中使用? 叫什么我不清楚
const refInput =ref() //记得return 出去

//事件触发  记得引入 nextTick from vue
const aaaa ()=>{
 nextTick(()=>{
        refInput.value.focus()
      })
}
Logo

前往低代码交流专区

更多推荐