优化<combo-box>组件上下键盘键移动速度

This commit is contained in:
刘祥超
2023-04-09 20:08:38 +08:00
parent f3bdd98af5
commit 2ece764dcb

View File

@@ -249,7 +249,7 @@ Vue.component("combo-box", {
template: `<div style="display: inline; z-index: 10; background: white" class="combo-box"> template: `<div style="display: inline; z-index: 10; background: white" class="combo-box">
<!-- 搜索框 --> <!-- 搜索框 -->
<div v-if="selectedItem == null"> <div v-if="selectedItem == null">
<input type="text" v-model="keyword" :placeholder="placeholder" :size="size" :style="{'width': styleWidth}" @input="changeKeyword" @focus="show" @blur="hide" @keyup.enter="confirm()" @keypress.enter.prevent="1" ref="searchBox" @keyup.down="downItem" @keyup.up="upItem"/> <input type="text" v-model="keyword" :placeholder="placeholder" :size="size" :style="{'width': styleWidth}" @input="changeKeyword" @focus="show" @blur="hide" @keyup.enter="confirm()" @keypress.enter.prevent="1" ref="searchBox" @keydown.down.prevent="downItem" @keydown.up.prevent="upItem"/>
</div> </div>
<!-- 当前选中 --> <!-- 当前选中 -->