mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 12:02:51 +00:00
fix: 修复搜索偶尔无效的情况
This commit is contained in:
parent
b53462cf6e
commit
b4f2da66be
@ -52,12 +52,13 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</Scrollbar>
|
</Scrollbar>
|
||||||
<Input class="search-input" v-model="searchKey" :placeholder="localPlaceholder" clearable>
|
<div class="search-input">
|
||||||
<div class="search-pre" slot="prefix">
|
<div class="search-pre">
|
||||||
<Loading v-if="loadIng > 0"/>
|
<Loading v-if="loadIng > 0"/>
|
||||||
<Icon v-else type="ios-search" />
|
<Icon v-else type="ios-search" />
|
||||||
</div>
|
</div>
|
||||||
</Input>
|
<Input v-model="searchKey" :placeholder="localPlaceholder" clearable/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 切换 -->
|
<!-- 切换 -->
|
||||||
|
|||||||
@ -173,12 +173,11 @@
|
|||||||
<div
|
<div
|
||||||
v-if="(projectSearchShow || projectTotal > 20) && windowHeight > 600"
|
v-if="(projectSearchShow || projectTotal > 20) && windowHeight > 600"
|
||||||
class="manage-project-search">
|
class="manage-project-search">
|
||||||
<Input v-model="projectKeyValue" :placeholder="$L(`共${projectTotal || cacheProjects.length}个项目,搜索...`)" clearable>
|
<div class="search-pre">
|
||||||
<div class="search-pre" slot="prefix">
|
<Loading v-if="projectKeyLoading > 0"/>
|
||||||
<Loading v-if="projectKeyLoading > 0"/>
|
<Icon v-else type="ios-search" />
|
||||||
<Icon v-else type="ios-search" />
|
</div>
|
||||||
</div>
|
<Input v-model="projectKeyValue" :placeholder="$L(`共${projectTotal || cacheProjects.length}个项目,搜索...`)" clearable/>
|
||||||
</Input>
|
|
||||||
</div>
|
</div>
|
||||||
<ButtonGroup class="manage-box-new-group">
|
<ButtonGroup class="manage-box-new-group">
|
||||||
<Button class="manage-box-new" type="primary" icon="md-add" @click="onAddShow">{{$L('新建项目')}}</Button>
|
<Button class="manage-box-new" type="primary" icon="md-add" @click="onAddShow">{{$L('新建项目')}}</Button>
|
||||||
|
|||||||
@ -122,13 +122,12 @@
|
|||||||
<i class="taskfont" @click="onSearchSwitch('next')"></i>
|
<i class="taskfont" @click="onSearchSwitch('next')"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-input">
|
<div class="search-input">
|
||||||
<Input ref="searchInput" v-model="searchKey" :placeholder="$L('搜索消息')" @on-keyup="onSearchKeyup" clearable>
|
<div class="search-pre">
|
||||||
<div class="search-pre" slot="prefix">
|
<Loading v-if="searchLoad > 0"/>
|
||||||
<Loading v-if="searchLoad > 0"/>
|
<Icon v-else type="ios-search" />
|
||||||
<Icon v-else type="ios-search" />
|
</div>
|
||||||
</div>
|
<Input ref="searchInput" v-model="searchKey" :placeholder="$L('搜索消息')" @on-keyup="onSearchKeyup" clearable/>
|
||||||
</Input>
|
<div v-if="searchLoad === 0 && searchResult.length > 0" class="search-total">{{searchLocation}}/{{searchResult.length}}</div>
|
||||||
<div v-if="searchLoad === 0 && searchResult.length > 0" class="search-total" slot="append">{{searchLocation}}/{{searchResult.length}}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="search-cancel" @click="onSearchKeyup(null)">{{$L('取消')}}</div>
|
<div class="search-cancel" @click="onSearchKeyup(null)">{{$L('取消')}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -3,12 +3,11 @@
|
|||||||
<PageTitle :title="$L('项目')"/>
|
<PageTitle :title="$L('项目')"/>
|
||||||
<div class="list-search">
|
<div class="list-search">
|
||||||
<div class="search-wrapper">
|
<div class="search-wrapper">
|
||||||
<Input v-model="projectKeyValue" :placeholder="$L(loadProjects > 0 ? '更新中...' : '搜索')" clearable>
|
<div class="search-pre">
|
||||||
<div class="search-pre" slot="prefix">
|
<Loading v-if="loadProjects > 0"/>
|
||||||
<Loading v-if="loadProjects > 0"/>
|
<Icon v-else type="ios-search" />
|
||||||
<Icon v-else type="ios-search" />
|
</div>
|
||||||
</div>
|
<Input v-model="projectKeyValue" :placeholder="$L(loadProjects > 0 ? '更新中...' : '搜索')" clearable/>
|
||||||
</Input>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ul @touchstart="onTouchStart" @scroll="onScroll">
|
<ul @touchstart="onTouchStart" @scroll="onScroll">
|
||||||
|
|||||||
@ -5,30 +5,24 @@
|
|||||||
<div class="messenger-select">
|
<div class="messenger-select">
|
||||||
<div class="messenger-search">
|
<div class="messenger-search">
|
||||||
<div class="search-wrapper">
|
<div class="search-wrapper">
|
||||||
|
<div class="search-pre">
|
||||||
|
<Loading v-if="searchLoading"/>
|
||||||
|
<Icon v-else type="ios-search" />
|
||||||
|
</div>
|
||||||
<Input
|
<Input
|
||||||
v-if="tabActive==='dialog'"
|
v-if="tabActive==='dialog'"
|
||||||
v-model="dialogSearchKey"
|
v-model="dialogSearchKey"
|
||||||
ref="searchInput"
|
ref="searchInput"
|
||||||
:placeholder="$L(loadDialogs > 0 ? '更新中...' : '搜索')"
|
:placeholder="$L(loadDialogs > 0 ? '更新中...' : '搜索')"
|
||||||
@on-keydown="onKeydown"
|
@on-keydown="onKeydown"
|
||||||
clearable>
|
clearable/>
|
||||||
<div class="search-pre" slot="prefix">
|
|
||||||
<Loading v-if="dialogLoading"/>
|
|
||||||
<Icon v-else type="ios-search" />
|
|
||||||
</div>
|
|
||||||
</Input>
|
|
||||||
<Input
|
<Input
|
||||||
v-else
|
v-else
|
||||||
v-model="contactsKey"
|
v-model="contactsKey"
|
||||||
ref="contactInput"
|
ref="contactInput"
|
||||||
:placeholder="$L('搜索')"
|
:placeholder="$L('搜索')"
|
||||||
@on-keydown="onKeydown"
|
@on-keydown="onKeydown"
|
||||||
clearable>
|
clearable/>
|
||||||
<div class="search-pre" slot="prefix">
|
|
||||||
<Loading v-if="contactsLoad"/>
|
|
||||||
<Icon v-else type="ios-search" />
|
|
||||||
</div>
|
|
||||||
</Input>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="tabActive==='dialog' && !dialogSearchKey" class="messenger-nav">
|
<div v-if="tabActive==='dialog' && !dialogSearchKey" class="messenger-nav">
|
||||||
@ -496,9 +490,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
dialogLoading({loadDialogs, dialogSearchLoad}) {
|
searchLoading({tabActive, loadDialogs, dialogSearchLoad, contactsLoad}) {
|
||||||
return loadDialogs > 0 || dialogSearchLoad > 0
|
if (tabActive==='dialog') {
|
||||||
}
|
return loadDialogs > 0 || dialogSearchLoad > 0
|
||||||
|
} else {
|
||||||
|
return contactsLoad > 0
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@ -152,15 +152,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.search-input {
|
.search-input {
|
||||||
.ivu-input {
|
flex: 1;
|
||||||
height: 36px;
|
display: flex;
|
||||||
border-color: #f4f5f7;
|
align-items: center;
|
||||||
background-color: #f4f5f7;
|
justify-content: center;
|
||||||
}
|
background-color: #f4f5f7;
|
||||||
|
border-radius: 6px;
|
||||||
|
height: 36px;
|
||||||
|
padding: 0 6px;
|
||||||
|
|
||||||
.search-pre {
|
.search-pre {
|
||||||
width: 100%;
|
width: 32px;
|
||||||
height: 100%;
|
height: 32px;
|
||||||
|
margin-right: -6px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #808695;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -171,6 +177,15 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ivu-input {
|
||||||
|
border-color: transparent;
|
||||||
|
background-color: transparent;
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -390,6 +390,7 @@
|
|||||||
}
|
}
|
||||||
.search-input {
|
.search-input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
padding: 0 6px;
|
||||||
margin-left: 12px;
|
margin-left: 12px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
background-color: #F7F7F7;
|
background-color: #F7F7F7;
|
||||||
@ -397,13 +398,18 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
.search-pre {
|
.search-pre {
|
||||||
width: 100%;
|
width: 32px;
|
||||||
height: 100%;
|
height: 32px;
|
||||||
|
margin-right: -6px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #808695;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.common-loading {
|
.common-loading {
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
|
|||||||
@ -18,14 +18,20 @@
|
|||||||
.search-wrapper {
|
.search-wrapper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
padding: 0 8px;
|
padding: 0 6px;
|
||||||
margin: 0 4px;
|
margin: 0 4px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
.search-pre {
|
.search-pre {
|
||||||
width: 100%;
|
width: 32px;
|
||||||
height: 100%;
|
height: 32px;
|
||||||
|
margin-right: -6px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #808695;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
29
resources/assets/sass/pages/page-manage.scss
vendored
29
resources/assets/sass/pages/page-manage.scss
vendored
@ -216,23 +216,20 @@
|
|||||||
}
|
}
|
||||||
.manage-project-search {
|
.manage-project-search {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
padding: 0 3px;
|
padding: 0 6px;
|
||||||
margin: 8px 0 -2px;
|
margin: 8px 0 -2px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.ivu-input {
|
display: flex;
|
||||||
padding-left: 30px;
|
align-items: center;
|
||||||
border-color: transparent;
|
justify-content: center;
|
||||||
background-color: transparent;
|
|
||||||
&:hover,
|
|
||||||
&:focus {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.search-pre {
|
.search-pre {
|
||||||
width: 100%;
|
width: 32px;
|
||||||
height: 100%;
|
height: 32px;
|
||||||
|
margin-right: -6px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #808695;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -242,6 +239,14 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.ivu-input {
|
||||||
|
border-color: transparent;
|
||||||
|
background-color: transparent;
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.manage-box-new-group {
|
.manage-box-new-group {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
|
|||||||
12
resources/assets/sass/pages/page-messenger.scss
vendored
12
resources/assets/sass/pages/page-messenger.scss
vendored
@ -33,13 +33,19 @@
|
|||||||
.search-wrapper {
|
.search-wrapper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
background-color: #F7F7F7;
|
background-color: #F7F7F7;
|
||||||
padding: 0 8px;
|
padding: 0 6px;
|
||||||
margin: 0 4px;
|
margin: 0 4px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
.search-pre {
|
.search-pre {
|
||||||
width: 100%;
|
width: 32px;
|
||||||
height: 100%;
|
height: 32px;
|
||||||
|
margin-right: -6px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #808695;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user