自动获取焦点

自动获取焦点无法使用element组件库,需要写原生的

<el-input v-model="input" placeholder="请输入内容" ref="input"></el-input>

this.$nextTick(() => {
      this.$refs.input.focus()
    })
posted @ 2019-08-19 11:19  小蜗蜗蜗牛^o^  阅读(160)  评论(0编辑  收藏  举报