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 getProviderList = async () => {
const res: any = await queryCodecProvider(); const res: any = await queryCodecProvider();
providerListAll.value = res.result providerListAll.value = res.result
.filter((i: any) => i.id !== 'property') .filter((i: any) => i.id !== 'property' && i.id !== 'bool')
.map((item: any) => ({ .map((item: any) => ({
value: item.id, value: item.id,
label: item.name, label: item.name,
})); }));
setProviderList(formData.value.configuration.function); setProviderList(formData.value.configuration.function);
}; };
getProviderList(); getProviderList();
const setProviderList = (value: string | undefined) => { const setProviderList = (value: string | undefined) => {
providerList.value = providerList.value = providerListAll.value;
value === 'HoldingRegisters'
? providerListAll.value
: providerListAll.value.filter(
(item: any) => item.value !== 'bool',
);
}; };
watch( watch(

View File

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