Merge branch 'dev-3.9' of git.mesalab.cn:nezha/nezha-fronted into dev-3.9
This commit is contained in:
@@ -94,6 +94,7 @@
|
|||||||
load: valueListLoad,
|
load: valueListLoad,
|
||||||
hasMore: (valueShow && valueList.length)&&(valueListInfo.total > valueList.length),
|
hasMore: (valueShow && valueList.length)&&(valueListInfo.total > valueList.length),
|
||||||
}"
|
}"
|
||||||
|
@mousedown="mousedownSearchBox"
|
||||||
>
|
>
|
||||||
<div class="search-key" v-if="keyShow && searchList.length" v-my-loading="keywordLoad">
|
<div class="search-key" v-if="keyShow && searchList.length" v-my-loading="keywordLoad">
|
||||||
<div v-for="(item, index) in searchList" @click="selectKey(item)" @mouseenter="selectIndex = index" :key="index" class="search-item" :ref="'search-item' + index" :class="{'search-item-select': index === selectIndex}">
|
<div v-for="(item, index) in searchList" @click="selectKey(item)" @mouseenter="selectIndex = index" :key="index" class="search-item" :ref="'search-item' + index" :class="{'search-item-select': index === selectIndex}">
|
||||||
@@ -128,7 +129,7 @@
|
|||||||
{{$t('overall.noDataAvailable')}}
|
{{$t('overall.noDataAvailable')}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-item-title">{{$t('searchBox.enterNext')}}</div>
|
<div class="search-item-title" @mousedown="mousedownSearchBox">{{$t('searchBox.enterNext')}}</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
<span class="nz-icon-search-box">
|
<span class="nz-icon-search-box">
|
||||||
<i class="nz-icon nz-icon-search" @click="emitSearch"/>
|
<i class="nz-icon nz-icon-search" @click="emitSearch"/>
|
||||||
@@ -907,7 +908,7 @@ export default {
|
|||||||
this.oldSearchStr = ''
|
this.oldSearchStr = ''
|
||||||
}
|
}
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.$refs.searchStr.blur()
|
this.$refs.searchStr && this.$refs.searchStr.blur()
|
||||||
this.$emit('search', obj)
|
this.$emit('search', obj)
|
||||||
})
|
})
|
||||||
}, 100),
|
}, 100),
|
||||||
@@ -1038,7 +1039,7 @@ export default {
|
|||||||
inputEnd () { // 光标最后一位
|
inputEnd () { // 光标最后一位
|
||||||
const ele = this.$refs.searchStr.$el
|
const ele = this.$refs.searchStr.$el
|
||||||
const obj = ele.getElementsByClassName('el-input__inner')[0]
|
const obj = ele.getElementsByClassName('el-input__inner')[0]
|
||||||
obj.focus()
|
this.$refs.searchStr.focus()
|
||||||
const len = obj.value.length
|
const len = obj.value.length
|
||||||
if (document.selection) {
|
if (document.selection) {
|
||||||
const sel = obj.createTextRange()
|
const sel = obj.createTextRange()
|
||||||
@@ -1212,6 +1213,9 @@ export default {
|
|||||||
return arr.find(enumItem => enumItem.value === item).label
|
return arr.find(enumItem => enumItem.value === item).label
|
||||||
})
|
})
|
||||||
return value
|
return value
|
||||||
|
},
|
||||||
|
mousedownSearchBox (event) {
|
||||||
|
event.preventDefault()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
Reference in New Issue
Block a user