使用了vant popup组件,工具模拟没有问题,Android机子没有问题,iphone 6 plus也没有问题,iPhone xs,iPhone x 输入时无法获得输入焦点。ios 13,5,1 wechat 7.0.13 wechatlib 2.12.0
代码如下:
<van-popup show="{{ showAdd }}" custom-class="add-class" position="top" overlay="{{ false }}">
<van-panel title="{{title}}" use-footer-slot>
<view>
<van-cell-group>
<van-field label="乘客姓名" value="{{ newName }}" data-value="newName" error-message="{{newNameError}}" maxlength="20" required placeholder="请输入姓名" border="{{ false }}" bindinput="onChangeName" ></van-field>
<van-field label="电话号码" maxlength="12" value="{{ newPhone }}" data-value="newPhone" error-message="{{newPhoneError}}" required clearable placeholder="请输入手机号码" border="{{ false }}" bindinput="onChangePhone" ></van-field>
<van-field label="证件号码" maxlength="20" value="{{ newId }}" data-value="newId" error-message="{{newIdError}}" required clearable placeholder="请输入身份证件号码" border="{{ false }}" bindinput="onChangeId" ></van-field>
</van-cell-group>
</view>
<view slot="footer">
<van-row justify="center" >
<van-col span="6" offset="6" >
<van-button plain hairline type="primary" type="danger" size="small" bindtap='onClose'>取消</van-button>
</van-col>
<van-col span="6" offset="2" >
<van-button plain hairline type="primary" type="danger" bindtap='onSave' size="small">保存</van-button>
</van-col>
</van-row>
</view>
</van-panel>
<view class="weui-msg__text-area" style="height: 20rem;">
<text class="weui-msg__title">温馨提示\n</text>
<text class="weui-msg__desc">1.接公安局及上级部门通知:为了保障乘客的乘车安全及相关利益,要求乘客必须<text class="color_e34e54">实名购票</text>;\n</text>
<text class="weui-msg__desc">2.乘车必须随身携带有效的<text class="color_e34e54">身份证件</text>;\n</text>
<text class="weui-msg__desc">3.乘务人员必须查验(检票)乘客身份;\n</text>
<text class="weui-msg__desc">4.乘客如果赶飞机、高铁等不能迟到的紧急情况,请提前3个小时购买同官宝定制出行;\n</text>
<text class="weui-msg__desc">5.同官宝定制出行将乘客安全放在第一位,乘客不能要求司机超速、改变路线等不合理要求;\n</text>
<text class="weui-msg__desc">6.上车后请及时告知乘务人员下车地点,以免改变路线影响车上其他乘客出行。\n</text>
</view>
</van-popup>
</view>