Commit c5f2577f515e7ae96b27b509e5dd4b3317fcb7b4
1 parent
7c1ffa3d
fix(api-select): loss option data on event callback
close #733
Showing
1 changed file
with
2 additions
and
1 deletions
src/components/Form/src/components/ApiSelect.vue
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | import { isFunction } from '/@/utils/is'; | 25 | import { isFunction } from '/@/utils/is'; |
26 | import { useRuleFormItem } from '/@/hooks/component/useFormItem'; | 26 | import { useRuleFormItem } from '/@/hooks/component/useFormItem'; |
27 | import { useAttrs } from '/@/hooks/core/useAttrs'; | 27 | import { useAttrs } from '/@/hooks/core/useAttrs'; |
28 | - import { get } from 'lodash-es'; | 28 | + import { get, omit } from 'lodash-es'; |
29 | 29 | ||
30 | import { LoadingOutlined } from '@ant-design/icons-vue'; | 30 | import { LoadingOutlined } from '@ant-design/icons-vue'; |
31 | import { useI18n } from '/@/hooks/web/useI18n'; | 31 | import { useI18n } from '/@/hooks/web/useI18n'; |
@@ -83,6 +83,7 @@ | @@ -83,6 +83,7 @@ | ||
83 | prev.push({ | 83 | prev.push({ |
84 | label: next[labelField], | 84 | label: next[labelField], |
85 | value: numberToString ? `${value}` : value, | 85 | value: numberToString ? `${value}` : value, |
86 | + ...omit(next, [labelField, valueField]), | ||
86 | }); | 87 | }); |
87 | } | 88 | } |
88 | return prev; | 89 | return prev; |