Skip to content

Commit

Permalink
fix(select): fix component error caused by vue2 deep cleanup memory l…
Browse files Browse the repository at this point in the history
…eak (#2843)
  • Loading branch information
zzcr authored Jan 24, 2025
1 parent a34e529 commit 82f2309
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/renderless/src/option/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const initState = ({ reactive, computed, props, api, markRaw, select, parent })
disabled: computed(() => props.disabled || state.groupDisabled),
isObject: computed(() => Object.prototype.toString.call(props.value).toLowerCase() === '[object object]'),
currentLabel: computed(() => props.label || (state.isObject ? '' : props.value)),
currentValue: computed(() => props.value || props.label || ''),
currentValue: props.value || props.label || '',

itemSelected: computed(() => {
if (!select.multiple) {
Expand Down Expand Up @@ -90,7 +90,7 @@ const initWatch = ({ watch, props, state, select, constants }) => {
() => props.value,
(value, oldVal) => {
const { remote, valueKey } = select

state.currentValue = value || props.label || ''
if (!props.created && !remote) {
if (
valueKey &&
Expand Down

0 comments on commit 82f2309

Please sign in to comment.