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

View File

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

View File

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

View File

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