首页搜索栏优化
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@
|
|||||||
{ "path": "pages/me/performance", "style": { "navigationStyle": "custom", "navigationBarTitleText": "我的绩效" } },
|
{ "path": "pages/me/performance", "style": { "navigationStyle": "custom", "navigationBarTitleText": "我的绩效" } },
|
||||||
{ "path": "pages/notice/list", "style": { "navigationStyle": "custom", "navigationBarTitleText": "公告" } },
|
{ "path": "pages/notice/list", "style": { "navigationStyle": "custom", "navigationBarTitleText": "公告" } },
|
||||||
{ "path": "pages/erp/hub", "style": { "navigationStyle": "custom", "navigationBarTitleText": "业务" } },
|
{ "path": "pages/erp/hub", "style": { "navigationStyle": "custom", "navigationBarTitleText": "业务" } },
|
||||||
{ "path": "pages/search/search", "style": { "navigationStyle": "custom", "navigationBarTitleText": "搜索" } },
|
{ "path": "pages/search/search", "style": { "navigationStyle": "custom", "navigationBarTitleText": "搜索", "app-plus": { "animationType": "slide-in-right", "animationDuration": 280 } } },
|
||||||
{ "path": "pages/preview/file", "style": { "navigationStyle": "custom", "navigationBarTitleText": "附件预览" } }
|
{ "path": "pages/preview/file", "style": { "navigationStyle": "custom", "navigationBarTitleText": "附件预览" } }
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
+20
-2
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page">
|
<view class="page search-page" :class="{ show: shown }">
|
||||||
<fy-header title="搜索" back />
|
<fy-header title="搜索" back />
|
||||||
<wd-search v-model="q" placeholder="搜索同事、会话或待办" hide-cancel focus placeholder-left />
|
<wd-search v-model="q" placeholder="搜索同事、会话或待办" hide-cancel focus placeholder-left />
|
||||||
<view v-if="!q.trim()">
|
<view v-if="!q.trim()">
|
||||||
@@ -52,7 +52,10 @@ import { store, previewOf } from '../../utils/store.js'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { FyHeader, FyFileMark },
|
components: { FyHeader, FyFileMark },
|
||||||
data() { return { q: '' } },
|
data() { return { q: '', shown: false } },
|
||||||
|
onShow() {
|
||||||
|
this.$nextTick(() => { this.shown = true })
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
people() {
|
people() {
|
||||||
const q = this.q.trim()
|
const q = this.q.trim()
|
||||||
@@ -99,6 +102,21 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.search-page {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 30;
|
||||||
|
background: #F5F7FA;
|
||||||
|
transform: translateX(100%);
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.search-page.show {
|
||||||
|
transform: translateX(0);
|
||||||
|
transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||||
|
}
|
||||||
.search { padding: 12rpx 28rpx 16rpx; }
|
.search { padding: 12rpx 28rpx 16rpx; }
|
||||||
.search input { height: 80rpx; background: #fff; border-radius: 20rpx; padding: 0 28rpx; font-size: 28rpx; border: 1rpx solid rgba(17,24,39,0.06); }
|
.search input { height: 80rpx; background: #fff; border-radius: 20rpx; padding: 0 28rpx; font-size: 28rpx; border: 1rpx solid rgba(17,24,39,0.06); }
|
||||||
.sec { padding: 24rpx 28rpx 8rpx; font-size: 24rpx; color: #6B7280; }
|
.sec { padding: 24rpx 28rpx 8rpx; font-size: 24rpx; color: #6B7280; }
|
||||||
|
|||||||
+24
-3
@@ -2,10 +2,13 @@
|
|||||||
<view class="page msg edge">
|
<view class="page msg edge">
|
||||||
<fy-header :title="unread ? ('消息(' + unread + ')') : '消息'">
|
<fy-header :title="unread ? ('消息(' + unread + ')') : '消息'">
|
||||||
<template #right>
|
<template #right>
|
||||||
<text class="ico sm" @click="goSearch">⌕</text>
|
|
||||||
<text class="ico" @click="plus">+</text>
|
<text class="ico" @click="plus">+</text>
|
||||||
</template>
|
</template>
|
||||||
</fy-header>
|
</fy-header>
|
||||||
|
<view class="finder" @click="goSearch">
|
||||||
|
<text class="finder-ico">⌕</text>
|
||||||
|
<text>搜索</text>
|
||||||
|
</view>
|
||||||
<fy-scroll class="edge-scroll list" dock @refresh="reload">
|
<fy-scroll class="edge-scroll list" dock @refresh="reload">
|
||||||
<view v-if="!rows.length" class="empty">暂无会话</view>
|
<view v-if="!rows.length" class="empty">暂无会话</view>
|
||||||
<view
|
<view
|
||||||
@@ -124,13 +127,31 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goSearch() { uni.navigateTo({ url: '/pages/search/search' }) }
|
goSearch() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/search/search',
|
||||||
|
animationType: 'slide-in-right',
|
||||||
|
animationDuration: 280
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.msg { display: flex; flex-direction: column; height: 100%; background: #F5F7FA; overflow: hidden; }
|
.msg { display: flex; flex-direction: column; height: 100%; background: #fff; overflow: hidden; }
|
||||||
|
.finder {
|
||||||
|
margin: 12rpx 24rpx 16rpx;
|
||||||
|
height: 72rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background: #F3F4F6;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #9CA3AF;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
.finder-ico { margin-right: 8rpx; font-size: 30rpx; }
|
||||||
.list { background: #fff; }
|
.list { background: #fff; }
|
||||||
.ico.sm { font-size: 34rpx; color: #1677FF; }
|
.ico.sm { font-size: 34rpx; color: #1677FF; }
|
||||||
.item { display: flex; align-items: center; padding: 22rpx 28rpx; background: #fff; }
|
.item { display: flex; align-items: center; padding: 22rpx 28rpx; background: #fff; }
|
||||||
|
|||||||
Reference in New Issue
Block a user