chore: fui-search-bar 增加最大位数限制

This commit is contained in:
Hefeng
2023-08-28 13:29:54 +08:00
parent 92b6e7ce0b
commit 0602515832

View File

@ -12,7 +12,7 @@
<view class="fui-sbi__circle"></view>
<view class="fui-sbi__line"></view>
</view>
<input ref="searchBarRef" class="fui-search__bar-input" :class="{'fui-sb__input-color':!color}"
<input ref="searchBarRef" :maxlength="maxlength" class="fui-search__bar-input" :class="{'fui-sb__input-color':!color}"
:style="{color:color,height: height+'rpx'}" placeholder-class="fui-search__bar-pl"
:placeholder="plholder" :value="val" :focus="isFocus" :disabled="disabled" confirm-type="search"
@blur="inputBlur" @focus="inputFocus" @input="inputChange" @confirm="search" />
@ -52,10 +52,10 @@
background: {
type: String,
// #ifdef APP-NVUE
default: '#F1F4FA'
default: '#F1F4FA',
// #endif
// #ifndef APP-NVUE
default: ''
default: '',
// #endif
},
//搜索栏上下paddingpadding-toppadding-bottom
@ -143,7 +143,11 @@
fixed: {
type: Boolean,
default: false
}
},
maxlength: {
type: [Number, String],
default: 30
},
},
created() {
this.val = this.value;