perf: 项目页面点击搜索按钮再点击弹出的搜索框窗会隐藏
This commit is contained in:
parent
f7820a23be
commit
1df55b78c2
@ -35,12 +35,12 @@
|
|||||||
</ETooltip>
|
</ETooltip>
|
||||||
</li>
|
</li>
|
||||||
<li :class="['project-icon', searchText!='' ? 'active' : '']">
|
<li :class="['project-icon', searchText!='' ? 'active' : '']">
|
||||||
<ETooltip v-model="searchShow" :manual="searchText!=''" effect="light">
|
<Tooltip :always="searchText!=''" @on-popper-show="searchFocus" theme="light">
|
||||||
<Icon class="menu-icon" type="ios-search" />
|
<Icon class="menu-icon" type="ios-search" @click="searchFocus" />
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<Input v-model="searchText" ref="searchInput" :placeholder="$L('名称、描述...')" class="search-input" clearable/>
|
<Input v-model="searchText" ref="searchInput" :placeholder="$L('名称、描述...')" class="search-input" clearable/>
|
||||||
</div>
|
</div>
|
||||||
</ETooltip>
|
</Tooltip>
|
||||||
</li>
|
</li>
|
||||||
<li :class="['project-icon', projectParameter('chat') ? 'active' : '']" @click="$store.dispatch('toggleProjectParameter', 'chat')">
|
<li :class="['project-icon', projectParameter('chat') ? 'active' : '']" @click="$store.dispatch('toggleProjectParameter', 'chat')">
|
||||||
<Icon class="menu-icon" type="ios-chatbubbles" />
|
<Icon class="menu-icon" type="ios-chatbubbles" />
|
||||||
@ -464,7 +464,6 @@ export default {
|
|||||||
sortField: 'end_at',
|
sortField: 'end_at',
|
||||||
sortType: 'desc',
|
sortType: 'desc',
|
||||||
|
|
||||||
searchShow: false,
|
|
||||||
searchText: '',
|
searchText: '',
|
||||||
|
|
||||||
addColumnShow: false,
|
addColumnShow: false,
|
||||||
@ -716,19 +715,18 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
projectData() {
|
projectData() {
|
||||||
this.sortData = this.getSort();
|
this.sortData = this.getSort();
|
||||||
},
|
|
||||||
searchShow(val) {
|
|
||||||
if (val) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.searchInput.focus({
|
|
||||||
cursor: "end"
|
|
||||||
});
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
searchFocus() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.searchInput.focus({
|
||||||
|
cursor: "end"
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
getSort() {
|
getSort() {
|
||||||
const sortData = [];
|
const sortData = [];
|
||||||
this.columnList.forEach((column) => {
|
this.columnList.forEach((column) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user