uniapp弹框uni-popup中input自动获取焦点实现

  • Post author:
  • Post category:uniapp


<!– 底部 弹出层开始–>

<uni-popup :show=”showPopupBottom” :type=”popType” @hidePopup=”hidePopup”>

<view class=”popupItem”>

<view class=”popupTitle”>扫描巡检设施</view>

<view class=”popupInput”>

<input :focus=”showPopupBottom” placeholder=”请扫描或输入设施编号” @input=”btnDown” style=”background-color: #F1F1F1;margin: 0 5upx;” v-model=”facilityNo”/>

</view>

<view class=”btnPopup”>

<button type=”default” @click=”btnCancel”>取消</button>

<button type=”warn” @click=”btnConfirm”>确定</button>

</view>

</view>

</uni-popup>

data() {


return {


name: “”,

technology: “技术部”,

date: “”,

time: “”,

spell: “”,

list: [],

showPopupBottom: false,

// 点击扫描弹框

btnScan(index) {


this.showPopupBottom = true

this.index = index

},



版权声明:本文为wwf1225原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。