Selaa lähdekoodia

fix(ApiCascader): apiParamKey not working

Li Kui 1 vuosi sitten
vanhempi
commit
c42ba1cc1b
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      src/components/Form/src/components/ApiCascader.vue

+ 2 - 2
src/components/Form/src/components/ApiCascader.vue

@@ -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: {
@@ -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);