Browse Source

[Fix][UI] ensure number type field has number type value in alarm-instance-manage (#16089)

upstream-dev
rockfang 6 months ago committed by GitHub
parent
commit
ac1eacafe0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-form.ts

9
dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-form.ts

@ -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…
Cancel
Save