增加搜索
This commit is contained in:
@@ -126,6 +126,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/search/search",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
@@ -15,7 +15,9 @@
|
|||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<view class="search">
|
<view class="search">
|
||||||
<uni-search-bar class="custom-search" radius="28" placeholder="请输入您想查询的内容或服务" clearButton="auto"
|
<uni-search-bar class="custom-search" radius="28" placeholder="请输入您想查询的内容或服务" clearButton="auto"
|
||||||
cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff" @confirm="handleSearch" />
|
cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"
|
||||||
|
@confirm="handleSearch" @focus="handleFocus"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 消息列表 -->
|
<!-- 消息列表 -->
|
||||||
@@ -50,6 +52,11 @@ onMounted(() => {
|
|||||||
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
|
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 获取input 焦点跳转
|
||||||
|
let handleFocus=()=>{
|
||||||
|
uni.navigateTo({url:'/pages/search/search'})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询搜索跳转
|
// 查询搜索跳转
|
||||||
let handleSearch = () => {
|
let handleSearch = () => {
|
||||||
|
|
||||||
|
|||||||
24
src/pages/search/search.vue
Normal file
24
src/pages/search/search.vue
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<template>
|
||||||
|
<view class="con-body">
|
||||||
|
<view class="con-bg">
|
||||||
|
<!-- 头部 -->
|
||||||
|
<customHeader ref="customHeaderRef" :title="'搜索'"
|
||||||
|
:leftFlag="true" :rightFlag="false"
|
||||||
|
></customHeader>
|
||||||
|
<!-- 高度来避免头部遮挡 -->
|
||||||
|
<view class="top-height"></view>
|
||||||
|
|
||||||
|
<customSearch></customSearch>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
import customHeader from '@/components/customHeader.vue'
|
||||||
|
import customSearch from '@/components/customSearch.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user