mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-11-29 18:58:05 +08:00
[Fix][UI] ensure number type field has number type value in alarm-instance-manage (#16089)
This commit is contained in:
parent
a7245189a8
commit
ac1eacafe0
@ -115,6 +115,15 @@ export function useForm() {
|
||||
state.detailForm.warningType = record.warningType
|
||||
if (record.pluginInstanceParams)
|
||||
state.json = JSON.parse(record.pluginInstanceParams)
|
||||
// ensure number type field has number type value
|
||||
state.json.forEach((item: any) => {
|
||||
if (item.validate && item.validate.length) {
|
||||
const numberTypeItem = item.validate.find(
|
||||
(v: any) => v.type === 'number'
|
||||
)
|
||||
if (numberTypeItem) item.value = +item.value
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user