uView版本升级到2.0.34

This commit is contained in:
sfmind
2022-11-19 20:38:24 +08:00
parent 5934d6b029
commit fb097f7a5b
48 changed files with 485 additions and 413 deletions

View File

@ -1,5 +1,10 @@
export default {
props: {
// 键盘弹起时,是否自动上推页面
adjustPosition: {
type: Boolean,
default: uni.$u.props.codeInput.adjustPosition
},
// 最大输入长度
maxlength: {
type: [String, Number],

View File

@ -23,7 +23,9 @@
v-if="mode === 'line'"
:style="[lineStyle]"
></view>
<view v-if="codeArray.length === index" :style="{backgroundColor: color}" class="u-code-input__item__cursor"></view>
<!-- #ifndef APP-PLUS -->
<view v-if="isFocus && codeArray.length === index" :style="{backgroundColor: color}" class="u-code-input__item__cursor"></view>
<!-- #endif -->
</view>
<input
:disabled="disabledKeyboard"
@ -31,11 +33,14 @@
:focus="focus"
:value="inputValue"
:maxlength="maxlength"
:adjustPosition="adjustPosition"
class="u-code-input__input"
@input="inputHandler"
:style="{
height: $u.addUnit(size)
}"
@focus="isFocus = true"
@blur="isFocus = false"
/>
</view>
</template>
@ -70,7 +75,8 @@
mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
data() {
return {
inputValue: ''
inputValue: '',
isFocus: this.focus
}
},
watch: {
@ -203,6 +209,7 @@
width: 40px;
background-color: $u-content-color;
}
/* #ifndef APP-PLUS */
&__cursor {
position: absolute;
top: 50%;
@ -212,6 +219,8 @@
height: $u-code-input-cursor-height;
animation: $u-code-input-cursor-animation-duration u-cursor-flicker infinite;
}
/* #endif */
}
&__input {
@ -226,6 +235,7 @@
}
}
/* #ifndef APP-PLUS */
@keyframes u-cursor-flicker {
0% {
opacity: 0;
@ -237,4 +247,6 @@
opacity: 0;
}
}
/* #endif */
</style>