style: 风云榜样式调整
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
class="image m-r-16 shrink"
|
||||
:class="{ w_180: props.source === 3, h_180: props.source === 3 }"
|
||||
>
|
||||
<view class="corner-badge" v-if="props.source === 0 && cornerText">
|
||||
<view class="corner-badge__bg"></view>
|
||||
<view class="corner-badge__text">{{ cornerText }}</view>
|
||||
</view>
|
||||
<image :src="props.data.picUrl" mode="scaleToFill" />
|
||||
</view>
|
||||
<view class="flex1 flex-column ju-between">
|
||||
@@ -156,14 +160,13 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script setup>
|
||||
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
||||
import { ref, onMounted, getCurrentInstance, defineProps, watch } from 'vue';
|
||||
import { ref, getCurrentInstance, defineProps, watch, computed } from 'vue';
|
||||
import { formatOrderStatus } from '@/sheep/hooks/useGoods';
|
||||
import * as api from '@/sheep/api/ai/index';
|
||||
import { makeViewBoxTransform } from 'zrender/lib/tool/parseSVG';
|
||||
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
@@ -182,6 +185,12 @@ import { makeViewBoxTransform } from 'zrender/lib/tool/parseSVG';
|
||||
default: 'id',
|
||||
},
|
||||
});
|
||||
|
||||
const cornerText = computed(() => {
|
||||
const raw = String(props?.data?.shoppingPlazaName || '').trim();
|
||||
if (!raw) return '';
|
||||
return raw;
|
||||
});
|
||||
let timeText = ref('结束');
|
||||
let hour = ref(0);
|
||||
let minute = ref(0);
|
||||
@@ -328,6 +337,7 @@ import { makeViewBoxTransform } from 'zrender/lib/tool/parseSVG';
|
||||
}
|
||||
|
||||
.image {
|
||||
position: relative;
|
||||
width: 248rpx;
|
||||
height: 248rpx;
|
||||
border-radius: 8rpx;
|
||||
@@ -339,6 +349,41 @@ import { makeViewBoxTransform } from 'zrender/lib/tool/parseSVG';
|
||||
}
|
||||
}
|
||||
|
||||
.corner-badge {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.corner-badge__bg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
background: linear-gradient(135deg, #9eb7ff 0%, #2556ec 100%);
|
||||
clip-path: polygon(0 0, 100% 0, 0 100%);
|
||||
}
|
||||
|
||||
.corner-badge__text {
|
||||
position: absolute;
|
||||
left: 6rpx;
|
||||
top: 6rpx;
|
||||
width: 35rpx;
|
||||
max-height: 52rpx;
|
||||
font-size: 14rpx;
|
||||
line-height: 18rpx;
|
||||
color: #ffffff;
|
||||
font-weight: 700;
|
||||
transform-origin: 0 0;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.stockText {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user