You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-app/pages/goods/list/index.vue

68 lines
1.4 KiB

3 years ago
<!--
* @Author: ch
* @Date: 2022-03-21 10:31:54
* @LastEditors: ch
3 years ago
* @LastEditTime: 2022-03-29 10:45:01
3 years ago
* @Description: file content
-->
<template>
<view>
<view class="header">
3 years ago
<UiPageHeader>
<u--input slot="custom" class="search--input" prefixIconStyle="font-size:48rpx;color:#ccc"
prefixIcon="search" placeholderClass="search--input__placeholder" clearable
:placeholder="placeholder" :value="$Route.query.search"
@focus="$Router.push('/search')"/>
</UiPageHeader>
3 years ago
<!-- 排序标签 -->
<Sort></Sort>
</view>
<BsGoodsGroup class="goods-group"></BsGoodsGroup>
</view>
</template>
<script>
import BsGoodsGroup from "@/components/BsGoodsGroup.vue";
3 years ago
import Sort from "./components/Sort.vue";
import UiPageHeader from '@/components/UiPageHeader.vue';
3 years ago
export default {
3 years ago
components: { BsGoodsGroup, Sort, UiPageHeader },
3 years ago
data() {
return {
sortType: "all", // 排序类型
sortPrice: false, // 价格排序 (true高到低 false低到高)
};
},
3 years ago
mounted(){
// console.log(getCurrentPages())
},
onHide(){
console.log(getCurrentPages());
}
3 years ago
};
</script>
<style lang="scss" scoped>
page {
background: #f8f8f8;
}
.header {
position: sticky;
top: var(--window-top);
z-index: 99;
}
3 years ago
.search--input{
display: block;
margin-left:20rpx;
height: 70rpx;
border:none;
box-sizing: border-box;
background: #F8F8F8;
&__placeholder{
font-size: 26rpx;
color: #666;
}
}
3 years ago
.goods-group {
padding-top: 30rpx;
}
</style>