mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 18:40:22 +08:00
fix(ApiCascader): apiParamKey not working
This commit is contained in:
parent
2ec5f6322d
commit
c42ba1cc1b
@ -55,7 +55,7 @@
|
|||||||
labelField: propTypes.string.def('label'),
|
labelField: propTypes.string.def('label'),
|
||||||
valueField: propTypes.string.def('value'),
|
valueField: propTypes.string.def('value'),
|
||||||
childrenField: propTypes.string.def('children'),
|
childrenField: propTypes.string.def('children'),
|
||||||
asyncFetchParamKey: propTypes.string.def('parentCode'),
|
apiParamKey: propTypes.string.def('parentCode'),
|
||||||
immediate: propTypes.bool.def(true),
|
immediate: propTypes.bool.def(true),
|
||||||
// init fetch params
|
// init fetch params
|
||||||
initFetchParams: {
|
initFetchParams: {
|
||||||
@ -141,7 +141,7 @@
|
|||||||
if (!api || !isFunction(api)) return;
|
if (!api || !isFunction(api)) return;
|
||||||
try {
|
try {
|
||||||
const res = await api({
|
const res = await api({
|
||||||
[props.asyncFetchParamKey]: Reflect.get(targetOption, 'value'),
|
[props.apiParamKey]: Reflect.get(targetOption, 'value'),
|
||||||
});
|
});
|
||||||
if (Array.isArray(res)) {
|
if (Array.isArray(res)) {
|
||||||
const children = generatorOptions(res);
|
const children = generatorOptions(res);
|
||||||
|
Loading…
Reference in New Issue
Block a user