【功能修复】修复用户订单卡片装修的背景图片问题

pull/75/head
卢越 2024-08-11 14:59:08 +08:00
parent 19d3cb33e2
commit 35c75338ee
2 changed files with 27 additions and 3 deletions

View File

@ -49,7 +49,7 @@
<!-- 用户组件用户卡片 -->
<s-user-card v-if="type === 'UserCard'" :data="data" :styles="styles" />
<!-- 用户组件用户订单 -->
<s-order-card v-if="type === 'UserOrder'" :data="data" />
<s-order-card v-if="type === 'UserOrder'" :data="data" :styles="styles" />
<!-- 用户组件用户资产 -->
<s-wallet-card v-if="type === 'UserWallet'" />
<!-- 用户组件用户卡券 -->

View File

@ -1,6 +1,6 @@
<!-- 装修用户组件用户订单 -->
<template>
<view class="ss-order-menu-wrap ss-flex ss-col-center">
<view class="ss-order-menu-wrap ss-flex ss-col-center" :style="[style, { marginLeft: `${data.space}px` }]">
<view
class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
v-for="item in orderMap"
@ -67,8 +67,32 @@
path: '/pages/order/list',
},
];
//
const props = defineProps({
//
data: {
type: Object,
default: () => ({}),
},
//
styles: {
type: Object,
default: () => ({}),
},
});
//
const numData = computed(() => sheep.$store('user').numData);
//
const style = computed(() => {
// props.styles
const { bgType, bgImg, bgColor } = props.styles;
// bgType
return {
background: bgType === 'img'
? `url(${bgImg}) no-repeat top center / 100% 100%`
: bgColor
};
});
</script>
<style lang="scss" scoped>