手機端ios cube-ui input鍵盤彈起輸入完成后點完成 不回彈的問題


今天發現最近做的手機端頁面 ui 用的cube-ui textarea 輸入內容后點擊鍵盤 完成 不回彈的問題  

記錄下來 備忘

<template>
  <div>

    <section class="cube-content">
      <h2 class="cube-index-list-anchor">財務處理</h2>

      <div class="scroll-list-wrap">
      <cube-scroll ref="scroll">
      <section class="anchor">
        <p>張小黑:100001ASA1L1</p>
        <p>參照費用:16800</p>
      </section>
      <section class="anchor">
        <cube-upload
        :max="3"
        action="http://devtbsapp.origimed.com:18081/app/qa/Questions/uploadFiles.json?TOKEN=cdWsYYqJQce9FVmhwNTpcV"
        :simultaneous-uploads="1"
        @files-added="filesAdded"
        @file-success="fileSuccess"/>
      </section>
      <section class="anchor">
          <cube-input v-model="value" :placeholder="placeholder" @focus="getFocus"></cube-input>
      </section>
      <section class="anchor">
          <cube-input v-model="pay" :placeholder="pay2" @focus="getFocus"></cube-input>
      </section>
      <section class="anchor">
          <cube-input v-model="time" :placeholder="time2" :readonly="readonly" @focus="showDateTimePicker"></cube-input>
      </section>
      <section class="anchor">
          <cube-textarea v-model="text"  :maxlength="maxlength" :placeholder="text2" @focus="getFocus"></cube-textarea>
      </section>
      <section class="anchor">
          <cube-textarea v-model="explain"  :maxlength="maxlength" :placeholder="text3" @focus="getFocus"></cube-textarea>
      </section>
      <section class="anchor">
        <cube-button :primary="true" :disabled="disabledBtn">確定</cube-button>
        <cube-button class="rback">返回</cube-button>
      </section>
      </cube-scroll>
      </div>

    </section>

  </div>
</template>
getFocus() {
      window.addEventListener('focusout', function () {
       document.body.scrollTop = document.body.scrollHeight;
      })
    },

就是在每個input上綁定個getFocus事件

親試好用  感謝

https://www.cnblogs.com/yangwenbo/p/11028005.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM