问题描述
input 组件在iOS下,弹出无法弹出第三方键盘
问题出现的环境背景及自己尝试过哪些方法
input聚焦后,输入文字时,只能切换系统自动的键盘,无法切换到第三方键盘,有解决的办法吗?
相关代码
// 请把代码文本粘贴到下方(请勿用图片代替代码)
<template>
<div class="wrapper">
<input class="username"
type="text"
autofocus="true"
placeholder="用户名"
value="" >
</input>
<input class="password"
type="password"
placeholder="密码"
value="">
</input>
<wxc-button text="登录" type="blue"
@wxcButtonClicked="wxcButtonClicked"></wxc-button>
</div>
</template>
<style scoped>
.wrapper{
flex-direction: column;
align-items: center;
justify-content: center;
}
.username{
width: 600px;
height: 88px;
font-size: 30px;
margin-bottom: 20px;
border-style: solid;
border-width: 2px;
border-color: rgb(63, 140, 225);
text-align: center;
}
.password{
width: 600px;
height: 88px;
font-size: 30px;
margin-bottom: 20px;
border-style: solid;
border-width: 2px;
border-color: rgb(63, 140, 225);;
text-align: center;
}
</style>
<script>
import { WxcButton } from 'weex-ui'
export default {
components: {WxcButton},
data: () =>({
password: '',
username: ''
}),
methods: {
wxcButtonClicked (e) {
console.log(e)
}
}
}
</script>
发现原生写的app,只有是设置了setSecureTextEntry的类型是password,都会禁用第三方的键盘。所以这个问题不是weex的问题,是iOS系统的问题。