Merge branch 'feature/task1.0.0' into 'msb_test'

Feature/task1.0.0

See merge request yanxuan-frontend/shop-pc!47
merge-requests/49/merge
肖广 3 years ago
commit 16a70bd821

@ -5,6 +5,7 @@
trigger="hover"
placement="bottom"
width="330"
:disabled="cartCount === 0"
>
<div
slot="reference"
@ -13,8 +14,8 @@
>
<img src="~/assets/img/layout/icon-shop.png" />
<span>购物车</span>
<div v-if="cartProducts.length > 0" class="wrap-right-cart__tip">
{{ cartProducts.length }}
<div v-if="cartCount > 0" class="wrap-right-cart__tip">
{{ cartCount }}
</div>
</div>
<div class="header-cart-products scrollbar-self">
@ -80,7 +81,7 @@
</template>
</div>
<div class="header-cart-bottom flex flex-middle flex-between">
<p>{{ cartProducts.length }}件商品</p>
<p>{{ cartCount }}件商品</p>
<UiButton type="red_panel" :radius="true" @click="onJumCartPage"
>去购物车</UiButton
>
@ -102,6 +103,9 @@ export default {
},
computed: {
...mapState(["cartProducts", "token"]),
cartCount() {
return this.cartProducts.length;
},
},
watch: {
cartProducts: {

@ -182,10 +182,6 @@ export default {
};
</script>
<style lang="scss" scoped>
.layout-header-popover {
&__cart-content {
}
}
.sticky-bar-header {
position: fixed;
top: 0;

Loading…
Cancel
Save