fix: bug#11300、11289

This commit is contained in:
jackhoo_98 2023-03-31 17:03:55 +08:00
parent 0ec07a4d73
commit bcf1f60ec3
2 changed files with 10 additions and 11 deletions

View File

@ -413,23 +413,17 @@ const filterOption = (input: string, option: any) => {
const getProviderList = async () => {
const res: any = await queryCodecProvider();
providerListAll.value = res.result
.filter((i: any) => i.id !== 'property')
.filter((i: any) => i.id !== 'property' && i.id !== 'bool')
.map((item: any) => ({
value: item.id,
label: item.name,
}));
setProviderList(formData.value.configuration.function);
};
getProviderList();
const setProviderList = (value: string | undefined) => {
providerList.value =
value === 'HoldingRegisters'
? providerListAll.value
: providerListAll.value.filter(
(item: any) => item.value !== 'bool',
);
providerList.value = providerListAll.value;
};
watch(

View File

@ -281,9 +281,14 @@
<span>{{
getText(slotProps)
}}</span>
<span>{{
getInterval(slotProps)
}}</span>
<span
v-if="
getInterval(slotProps)
"
>{{
getInterval(slotProps)
}}</span
>
</div>
</Ellipsis>
</div>