Skip to content

Commit 82f2309

Browse files
authored
fix(select): fix component error caused by vue2 deep cleanup memory leak (#2843)
1 parent a34e529 commit 82f2309

File tree

1 file changed

+2
-2
lines changed
  • packages/renderless/src/option

1 file changed

+2
-2
lines changed

packages/renderless/src/option/vue.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const initState = ({ reactive, computed, props, api, markRaw, select, parent })
3636
disabled: computed(() => props.disabled || state.groupDisabled),
3737
isObject: computed(() => Object.prototype.toString.call(props.value).toLowerCase() === '[object object]'),
3838
currentLabel: computed(() => props.label || (state.isObject ? '' : props.value)),
39-
currentValue: computed(() => props.value || props.label || ''),
39+
currentValue: props.value || props.label || '',
4040

4141
itemSelected: computed(() => {
4242
if (!select.multiple) {
@@ -90,7 +90,7 @@ const initWatch = ({ watch, props, state, select, constants }) => {
9090
() => props.value,
9191
(value, oldVal) => {
9292
const { remote, valueKey } = select
93-
93+
state.currentValue = value || props.label || ''
9494
if (!props.created && !remote) {
9595
if (
9696
valueKey &&

0 commit comments

Comments
 (0)