键盘
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
keyboardClass="username"
|
||||
:value="username"
|
||||
@inputChange="inputChange"
|
||||
@inputFocus="inputFocus"
|
||||
></keyboard-input>
|
||||
</div>
|
||||
</div>
|
||||
@@ -39,7 +40,7 @@
|
||||
<div class="login-item">
|
||||
<div class="login-label login-label_1" @click="toFocus(3)">域名地址</div>
|
||||
<div class="login_value login_value_1">
|
||||
<input type="text" class="login-input" ref="input3" v-model.trim="baseUrl" @focus="show" data-layout="normal">
|
||||
<input type="text" class="login-input" ref="input3" v-model.trim="baseUrl" @focus="show" data-layout="normal" data-next="1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="login-item">
|
||||
@@ -151,6 +152,11 @@ export default {
|
||||
}
|
||||
},
|
||||
show (e) {
|
||||
// 关闭中文keyboard
|
||||
let arr = document.querySelectorAll('.hg-theme-default')
|
||||
arr.forEach((ele) => {
|
||||
ele.style.visibility = 'hidden'
|
||||
})
|
||||
this.input = e.target
|
||||
this.layout = e.target.dataset.layout
|
||||
if (!this.visible) {
|
||||
@@ -167,7 +173,7 @@ export default {
|
||||
let inputs = document.querySelectorAll('input')
|
||||
let found = false;
|
||||
[].forEach.call(inputs, (item, i) => {
|
||||
if (!found && item === this.input && i < inputs.length - 1) {
|
||||
if (!found && item === this.input && i < inputs.length - 1 && this.input.dataset.next === '1') {
|
||||
found = true
|
||||
this.$nextTick(() => {
|
||||
inputs[i + 1].focus()
|
||||
@@ -181,6 +187,9 @@ export default {
|
||||
},
|
||||
inputChange (val) {
|
||||
this.username = val
|
||||
},
|
||||
inputFocus () {
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -249,7 +258,7 @@ export default {
|
||||
width 100%
|
||||
_font(30px, 78px, #fff,,)
|
||||
background: rgba(45,88,184,0.1);
|
||||
border: 1px solid #4980BD;
|
||||
border: 2px solid #4980BD;
|
||||
padding 0 22px
|
||||
&:focus
|
||||
background: rgba(45,88,184,0.25);
|
||||
|
||||
Reference in New Issue
Block a user