Skip to content

Commit

Permalink
fix(ApiCascader): apiParamKey not working
Browse files Browse the repository at this point in the history
  • Loading branch information
likui628 committed Oct 20, 2023
1 parent 2ec5f63 commit c42ba1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Form/src/components/ApiCascader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
labelField: propTypes.string.def('label'),
valueField: propTypes.string.def('value'),
childrenField: propTypes.string.def('children'),
asyncFetchParamKey: propTypes.string.def('parentCode'),
apiParamKey: propTypes.string.def('parentCode'),
immediate: propTypes.bool.def(true),
// init fetch params
initFetchParams: {
Expand Down Expand Up @@ -141,7 +141,7 @@
if (!api || !isFunction(api)) return;
try {
const res = await api({
[props.asyncFetchParamKey]: Reflect.get(targetOption, 'value'),
[props.apiParamKey]: Reflect.get(targetOption, 'value'),
});
if (Array.isArray(res)) {
const children = generatorOptions(res);
Expand Down

0 comments on commit c42ba1c

Please sign in to comment.