Commit 2ca6a99 1 parent 477d687 commit 2ca6a99 Copy full SHA for 2ca6a99
File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ export default class Cascader extends Component {
217
217
const loop = ( data , prefix = '0' ) => data . forEach ( ( item , index ) => {
218
218
const { value, children } = item ;
219
219
const pos = `${ prefix } -${ index } ` ;
220
- this . _v2n [ value ] = this . _p2n [ pos ] = { ...item , pos } ;
220
+ this . _v2n [ value ] = this . _p2n [ pos ] = { ...item , pos, _source : item } ;
221
221
222
222
if ( children && children . length ) {
223
223
loop ( children , pos ) ;
@@ -490,7 +490,8 @@ export default class Cascader extends Component {
490
490
491
491
const { loadData } = this . props ;
492
492
if ( canExpand && loadData ) {
493
- return loadData ( this . _v2n [ value ] ) . then ( callback ) ;
493
+ const data = this . _v2n [ value ] ;
494
+ return loadData ( data , data . _source ) . then ( callback ) ;
494
495
} else {
495
496
callback ( ) ;
496
497
}
You can’t perform that action at this time.
0 commit comments