Fix(购物车):左上角删除按钮显示逻辑应该按照已中商品

This commit is contained in:
lifizer
2024-04-01 22:03:25 +08:00
parent fbe7b0b419
commit a8f701b614
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -1,6 +1,6 @@
<template> <template>
<view class="components-checkbox-icon jc-center ai-center" :class="{'isSelected':isSelected}" @click="change"> <view class="components-checkbox-icon jc-center ai-center" :class="{'isSelected':isSelected}" @click="change">
<image class="icon-hook" :src="$VUE_APP_RESOURCES_URL+'/20240109175325131970.png'" mode="scaleToFill" v-if="isSelected"/> <image class="icon-hook" :src="webUrl + '/20240109175325131970.png'" mode="scaleToFill" v-if="isSelected"/>
</view> </view>
</template> </template>
@@ -19,6 +19,11 @@ export default {
} }
} }
}, },
data() {
return {
webUrl: Object.freeze(this.$VUE_APP_RESOURCES_URL)
}
},
computed: { computed: {
isSelected: function() { isSelected: function() {
return this.defaultState return this.defaultState
+1 -1
View File
@@ -1,7 +1,7 @@
<template> <template>
<view class="pages-cart"> <view class="pages-cart">
<u-navbar <u-navbar
leftIcon="trash" :left-icon="selectCount > 0 ? 'trash' : ''"
title="购物车" title="购物车"
fixed fixed
@leftClick="remove" @leftClick="remove"