mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-02-05 05:19:49 +08:00
uniapp【优化】:分类页面增加标题
This commit is contained in:
@@ -8,15 +8,22 @@
|
|||||||
.back {
|
.back {
|
||||||
width: 50rpx;
|
width: 50rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
margin-right: 20rpx;
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
|
.page-title{
|
||||||
|
font-size: 27rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
width: 110rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
.search-tit {
|
.search-tit {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
right: 10rpx;
|
right: 10rpx;
|
||||||
font-size: 24rpx;
|
font-size: 22rpx;
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
|
|||||||
@@ -5,10 +5,13 @@
|
|||||||
<view class="search-box">
|
<view class="search-box">
|
||||||
<image @click="hanlderBack" class="back" :src="handleStaticResources('/static/images/back.png')">
|
<image @click="hanlderBack" class="back" :src="handleStaticResources('/static/images/back.png')">
|
||||||
</image>
|
</image>
|
||||||
|
<view class="page-title">
|
||||||
<uv-input shape="circle" :placeholder="state.pageTitle ? state.pageTitle :`请输入关键词`"
|
{{state.pageTitle}}
|
||||||
|
</view>
|
||||||
|
<uv-input shape="circle" placeholder="请输入关键词"
|
||||||
prefixIcon="search" v-model="state.searchKey"
|
prefixIcon="search" v-model="state.searchKey"
|
||||||
:customStyle="{ 'background-color': '#fff','padding':'3px 9px' }" @confirm="handleSearch"
|
:customStyle="{ 'background-color': '#fff','padding':'3px 9px','width':state.searchInputW}"
|
||||||
|
@confirm="handleSearch"
|
||||||
prefixIconStyle="font-size: 22px;color: #909399">
|
prefixIconStyle="font-size: 22px;color: #909399">
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<view class="search-tit" @click="handleSearch">搜索</view>
|
<view class="search-tit" @click="handleSearch">搜索</view>
|
||||||
@@ -167,6 +170,7 @@
|
|||||||
priceTo : number | string;
|
priceTo : number | string;
|
||||||
brandId : string;
|
brandId : string;
|
||||||
pageTitle : string;
|
pageTitle : string;
|
||||||
|
searchInputW:string;
|
||||||
}>({
|
}>({
|
||||||
searchKey: "",
|
searchKey: "",
|
||||||
page: 1,
|
page: 1,
|
||||||
@@ -217,6 +221,7 @@
|
|||||||
priceTo: '',
|
priceTo: '',
|
||||||
brandId: "",
|
brandId: "",
|
||||||
pageTitle: "",
|
pageTitle: "",
|
||||||
|
searchInputW:"320rpx"
|
||||||
})
|
})
|
||||||
|
|
||||||
let queryParams : QueryParams
|
let queryParams : QueryParams
|
||||||
@@ -235,6 +240,10 @@
|
|||||||
queryParams = query;
|
queryParams = query;
|
||||||
/** 处理 query 然后获取商品列表 */
|
/** 处理 query 然后获取商品列表 */
|
||||||
handleuQueryProduct(query);
|
handleuQueryProduct(query);
|
||||||
|
|
||||||
|
// #ifdef APP
|
||||||
|
state.searchInputW = 'auto';
|
||||||
|
// #endif
|
||||||
});
|
});
|
||||||
|
|
||||||
onPullDownRefresh(async () => {
|
onPullDownRefresh(async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user