代码提交
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<Header
|
||||
:scroll-top="scrollTop"
|
||||
system-bar-area-bg="#fff"
|
||||
header-area-bg="#fff"
|
||||
bg-change-by-scroll
|
||||
@ -74,12 +75,13 @@
|
||||
>
|
||||
<view
|
||||
class="button"
|
||||
:class="item.cartNum <= 1 && 'disabled'"
|
||||
@click="handleCartNumberChange(item,'minus')"
|
||||
>
|
||||
<uv-icon
|
||||
name="minus"
|
||||
color="#333"
|
||||
size="12"
|
||||
size="24rpx"
|
||||
></uv-icon>
|
||||
</view>
|
||||
<view class="input">
|
||||
@ -92,12 +94,13 @@
|
||||
</view>
|
||||
<view
|
||||
class="button"
|
||||
:class="item.cartNum >= item.trueStock && 'disabled'"
|
||||
@click="handleCartNumberChange(item,'plus')"
|
||||
>
|
||||
<uv-icon
|
||||
name="plus"
|
||||
color="#333"
|
||||
size="12"
|
||||
size="24rpx"
|
||||
></uv-icon>
|
||||
</view>
|
||||
</view>
|
||||
@ -187,6 +190,7 @@
|
||||
content="确认要删除这些购物车数据吗?"
|
||||
@confirm="doDelete"
|
||||
/>
|
||||
<ReturnTop :scroll-top="scrollTop" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@ -201,6 +205,8 @@ import Header from "@/components/Header/index.vue"
|
||||
import { onHide, onPageScroll, onReachBottom } from "@dcloudio/uni-app";
|
||||
import Recommend from "@/components/Recommend/index.vue";
|
||||
import { useScroll } from "@/hooks/useScroll";
|
||||
import ReturnTop from "@/components/ReturnTop/index.vue"
|
||||
|
||||
|
||||
const modalRef = ref() // 删除弹窗
|
||||
const goodsAttrSelectRef = ref() // 更改sku
|
||||
@ -246,7 +252,7 @@ onHide(() => {
|
||||
goodsAttrSelectRef.value?.close()
|
||||
})
|
||||
|
||||
useScroll()
|
||||
const {scrollTop} = useScroll()
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@ -311,7 +317,7 @@ useScroll()
|
||||
font-size: 24rpx;
|
||||
|
||||
.input {
|
||||
width: 120rpx;
|
||||
width: 70rpx;
|
||||
|
||||
|
||||
input {
|
||||
@ -323,19 +329,28 @@ useScroll()
|
||||
|
||||
.button {
|
||||
font-size: 32rpx;
|
||||
width: 34rpx;
|
||||
width: 40rpx;
|
||||
aspect-ratio: 1/1;
|
||||
border-radius: 5rpx;
|
||||
border: 2rpx solid #cccccc;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all .3s;
|
||||
border: 1px solid #999999;
|
||||
|
||||
&:active {
|
||||
scale: 1.2;
|
||||
}
|
||||
&.disabled{
|
||||
border-color: #dddddd;
|
||||
:deep(.uv-icon__icon){
|
||||
color: #dddddd !important;
|
||||
}
|
||||
&:active {
|
||||
scale: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -356,7 +371,7 @@ useScroll()
|
||||
&.show {
|
||||
@include usePadding(40, 10);
|
||||
border-top: 1rpx solid #E6E6E6;
|
||||
height: 230rpx;
|
||||
height: 260rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user