<input type="text" placeholder="写评论"  @focus="showInput">  
         <view class="mask" v-show="showMask" @click="hide"></view>  
         <view class="popup popup-bottom" v-if="showState">  
                <view class="showkey flex_row">  
                      <textarea v-model="discuss" placeholder="请输入内容" focus :auto-focus="true" :fixed="true"/>  
            </view>  
         </view>  
    methods: {  
        showInput: function() {  
            this.showState = true;  
            this.showMask = true;  
        },  
        hide() {  
            this.showMask = false;  
            this.showState = false;  
        }  
    }在安卓手机里面已经自动获取焦点了,手机软键盘已经弹出,但是显示几秒后,软键盘又消失了,就变成失去焦点的状态了。然后整个popup 这个view又跑在底部显示了。不知道是怎么回事。
 
             
             
             
			 
                                        
                                     
                                                                     
                                                                    

 
                                                                    



 
            
没得好名字 (作者)
我测试了下的确是这个引起的,但是要怎么改能。这个方法是必须要的。当底部input聚焦时。我才让this.showState = true;也就是才显示另一个新的弹框。
2018-11-01 10:43