Commit 823235a6 by 袁成

fix: 基础数据组件blur

parent defe8951
......@@ -10,7 +10,7 @@
</li>
</ul>
<div class="select-box" slot="reference">
<Input ref="searchInput" v-model="selectValue" :disabled="disabled" :readonly="readonly || multiple" :class="{'multiple-input': multiple && !readonly}" placeholder="" @on-change="handleChange" @on-focus="handleFocus" @keydown.down.native="handleSelectNext" @keydown.up.native="handleSelectPrev" @keydown.enter.native="handleSelected">
<Input ref="searchInput" v-model="selectValue" :disabled="disabled" :readonly="readonly || multiple" :class="{'multiple-input': multiple && !readonly}" placeholder="" @on-change="handleChange" @on-focus="handleFocus" @on-blur="handleBlur" @keydown.down.native="handleSelectNext" @keydown.up.native="handleSelectPrev" @keydown.enter.native="handleSelected">
<Icon type="ios-close-circle" :class="{'clear-icon': true, 'hidden-icon': disabled || readonly || !selectValue }" slot="suffix" @click="clearList" />
<Icon type="ios-more" class="more-select" slot="suffix" @click="handleInputSelect" />
</Input>
......@@ -198,6 +198,25 @@ export default {
this.hasFocus = true
this.getBaseDataList()
},
handleBlur() {
this.dataListShow = false
// if (!this.onResultList) {
// this.hasFocus = false
// this.dataListShow = false
// }
// this.selectValue = String(this.selectValue)
// if (this.value === null) {
// this.selectValue = ''
// this.selectIndex = -1
// this.selectedItem = {}
// } else {
// this.selectValue = this.value.name
// this.selectedItem = this.value
// this.findIndex()
// }
// this.$emit('data-change', this.value)
},
// 输入查询时
handleChange() {
if (this.selectValue === '' || this.selectValue === null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment