fix: bug#10676 修复设备接入网关 AccessCard组件背景图

This commit is contained in:
jackhoo_98 2023-03-22 12:20:45 +08:00
parent 026d9dd914
commit eb43a5f5b2
7 changed files with 18 additions and 8 deletions

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -3,7 +3,7 @@
hoverable
:class="[
'card-render',
'container',
`access-${data.type || 'network'}`,
checked === data.id ? 'checked' : '',
]"
@click="checkedChange(data.id)"
@ -41,6 +41,7 @@ const props = defineProps({
default: () => {},
},
});
console.log(111, props.data);
const checkedChange = (id: string) => {
emit('checkedChange', id);
@ -106,8 +107,16 @@ const checkedChange = (id: string) => {
}
}
}
.container {
background: url('/public/images/access-icon.png') no-repeat;
.access-media {
background: url('/public/images/access-media.png') no-repeat;
background-position: bottom right;
}
.access-network {
background: url('/public/images/access-network.png') no-repeat;
background-position: bottom right;
}
.access-protocol {
background: url('/public/images/access-protocol.png') no-repeat;
background-position: bottom right;
}
</style>

View File

@ -193,7 +193,7 @@
<AccessCard
@checkedChange="procotolChange"
:checked="procotolCurrent"
:data="item"
:data="{ ...item, type: 'protocol' }"
>
</AccessCard>
</j-col>

View File

@ -275,7 +275,7 @@
<AccessCard
@checkedChange="procotolChange"
:checked="procotolCurrent"
:data="item"
:data="{ ...item, type: 'protocol' }"
>
</AccessCard>
</j-col>

View File

@ -40,6 +40,7 @@
description: item.description
? item.description
: descriptionList[provider.id],
type: 'network',
}"
>
<template #other>
@ -118,12 +119,12 @@
v-for="item in procotolList"
:key="item?.id"
>
<access-card
<AccessCard
@checkedChange="procotolChange"
:checked="procotolCurrent"
:data="item"
:data="{ ...item, type: 'protocol' }"
>
</access-card>
</AccessCard>
</j-col>
</j-row>
<j-empty v-else description="暂无数据" />