style: 优化设备接入网关编辑样式
This commit is contained in:
parent
92c1b48887
commit
8480df4f4d
|
@ -5,6 +5,7 @@
|
||||||
'card-render',
|
'card-render',
|
||||||
`access-${data.type || 'network'}`,
|
`access-${data.type || 'network'}`,
|
||||||
checked === data.id ? 'checked' : '',
|
checked === data.id ? 'checked' : '',
|
||||||
|
disabled ? 'disabled' : ''
|
||||||
]"
|
]"
|
||||||
@click="checkedChange(data.id)"
|
@click="checkedChange(data.id)"
|
||||||
>
|
>
|
||||||
|
@ -40,6 +41,10 @@ const props = defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const checkedChange = (id: string) => {
|
const checkedChange = (id: string) => {
|
||||||
|
@ -105,6 +110,9 @@ const checkedChange = (id: string) => {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.access-media {
|
.access-media {
|
||||||
background: url('/public/images/access-media.png') no-repeat;
|
background: url('/public/images/access-media.png') no-repeat;
|
||||||
|
|
|
@ -134,6 +134,7 @@
|
||||||
<AccessCard
|
<AccessCard
|
||||||
@checkedChange="procotolChange"
|
@checkedChange="procotolChange"
|
||||||
:checked="procotolCurrent"
|
:checked="procotolCurrent"
|
||||||
|
:disabled='id !== ":id"'
|
||||||
:data="{ ...item, type: 'protocol' }"
|
:data="{ ...item, type: 'protocol' }"
|
||||||
>
|
>
|
||||||
</AccessCard>
|
</AccessCard>
|
||||||
|
|
Loading…
Reference in New Issue