fix icon显示问题

This commit is contained in:
bootx
2025-04-27 20:48:33 +08:00
parent e9bc9ed864
commit f3c8c73490
3 changed files with 7 additions and 7 deletions

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -40,7 +40,7 @@
<div class="itemType">
<img v-if="item.icon === 'wechat'" src="@/assets/images/wechat.png" alt="">
<img v-if="item.icon === 'alipay'" src="@/assets/images/alipay.png" alt="">
<img v-if="item.icon === 'aggregate'" src="@/assets/images/aggregate-pay.png" alt="">
<img v-if="item.icon === 'aggregate'" src="@/assets/images/aggregate.png" alt="">
<!-- <img src="@/assets/images/quick_pay.png" alt=""> -->
<p>{{ item.name }}</p>
<span v-if="item.recommend"> 推荐</span>

View File

@@ -47,8 +47,7 @@
:class="{ methodItemClick: payMethObj.payClickItemId === item.id }"
@click="payMethObj.payClick(item)"
>
<img v-if="item.icon === 'aggregate-pay'" :src="getImageUrl(item.icon)" alt="">
<img v-else src="@/assets/images/alipay.png" alt="">
<img :src="getImageUrl(item.icon)" alt="">
<span>{{ item.name }}</span>
<div v-if="item.recommend" class="recommon">
推荐
@@ -116,6 +115,7 @@ const childRenList = ref<any>([])
// 动态生成图片路径
function getImageUrl(icon) {
console.log(icon)
return new URL(`../../../../assets/images/${icon}.png`, import.meta.url).href
}
// 控制二维码弹窗
@@ -225,7 +225,7 @@ watch(
(newValue) => {
if (newValue) {
// 判断是否为聚合支付
if (newValue === '111111111111111111') {
if (newValue === 'agg') {
isAggregateShow.value = true
return
}
@@ -256,10 +256,10 @@ function init() {
// 判断是否存在聚合支付
if (data.config.aggregateShow) {
data.groupConfigs.unshift({
id: '111111111111111111',
name: '聚合支付',
id: 'agg',
name: '聚合扫码',
recommend: false,
icon: 'aggregate-pay',
icon: 'aggregate',
})
}
orderObj.value = data