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