diff --git a/packages/components/select/src/useOption.ts b/packages/components/select/src/useOption.ts index 3c37bfe31a..1c7180ed1c 100644 --- a/packages/components/select/src/useOption.ts +++ b/packages/components/select/src/useOption.ts @@ -1,6 +1,6 @@ // @ts-nocheck import { computed, getCurrentInstance, inject, toRaw, watch } from 'vue' -import { get } from 'lodash-unified' +import { get, isEqual } from 'lodash-unified' import { ensureArray, escapeStringRegexp, isObject } from '@element-plus/utils' import { selectGroupKey, selectKey } from './token' @@ -77,8 +77,8 @@ export function useOption(props, states) { () => props.value, (val, oldVal) => { const { remote, valueKey } = select.props - - if (val !== oldVal) { + const shouldUpdate = remote ? val !== oldVal : !isEqual(val, oldVal) + if (shouldUpdate) { select.onOptionDestroy(oldVal, instance.proxy) select.onOptionCreate(instance.proxy) }