Demo:唤出搜索时自动聚焦搜索框

This commit is contained in:
wanglin2
2025-03-30 15:27:39 +08:00
parent bb9dd123f1
commit a0e54870b5

View File

@@ -23,7 +23,7 @@
>{{ $t('search.replace') }}</el-button
>
</el-input>
<div class="searchInfo" v-if="showSearchInfo">
<div class="searchInfo" v-if="showSearchInfo && !isUndef(searchText)">
{{ currentIndex }} / {{ total }}
</div>
</div>
@@ -155,7 +155,7 @@ export default {
showSearch() {
this.$bus.$emit('closeSideBar')
this.show = true
// this.$refs.searchInputRef.focus()
this.$refs.searchInputRef.focus()
},
hideReplaceInput() {