@@ -9,6 +9,7 @@ import { hasProp, getEvents } from '../_util/props-util';
9
9
import BaseMixin from '../_util/BaseMixin' ;
10
10
import { cloneElement } from '../_util/vnode' ;
11
11
import { defineComponent } from 'vue' ;
12
+ import isEqual from 'lodash-es/isEqual' ;
12
13
13
14
const BUILT_IN_PLACEMENTS = {
14
15
bottomLeft : {
@@ -134,7 +135,7 @@ export default defineComponent({
134
135
const { options = [ ] , sActiveValue = [ ] } = this ;
135
136
const result = arrayTreeFilter (
136
137
options ,
137
- ( o , level ) => o [ this . getFieldName ( 'value' ) ] === sActiveValue [ level ] ,
138
+ ( o , level ) => isEqual ( o [ this . getFieldName ( 'value' ) ] , sActiveValue [ level ] ) ,
138
139
{ childrenKeyName : this . getFieldName ( 'children' ) } ,
139
140
) ;
140
141
if ( result [ result . length - 2 ] ) {
@@ -145,7 +146,7 @@ export default defineComponent({
145
146
getActiveOptions ( activeValue ) {
146
147
return arrayTreeFilter (
147
148
this . options || [ ] ,
148
- ( o , level ) => o [ this . getFieldName ( 'value' ) ] === activeValue [ level ] ,
149
+ ( o , level ) => isEqual ( o [ this . getFieldName ( 'value' ) ] , activeValue [ level ] ) ,
149
150
{ childrenKeyName : this . getFieldName ( 'children' ) } ,
150
151
) ;
151
152
} ,
@@ -244,7 +245,7 @@ export default defineComponent({
244
245
const currentOptions = this . getCurrentLevelOptions ( ) ;
245
246
const currentIndex = currentOptions
246
247
. map ( o => o [ this . getFieldName ( 'value' ) ] )
247
- . indexOf ( activeValue [ currentLevel ] ) ;
248
+ . findIndex ( val => isEqual ( activeValue [ currentLevel ] , val ) ) ;
248
249
if (
249
250
e . keyCode !== KeyCode . DOWN &&
250
251
e . keyCode !== KeyCode . UP &&
0 commit comments