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