fix(runtime-core/template-ref): named ref in v-for regression fix (#5118)

close #5116
close #5447
close #5525
This commit is contained in:
lidlanca
2022-04-12 03:28:40 -04:00
committed by GitHub
parent 7efb9dba30
commit cee1eafb4d
2 changed files with 58 additions and 0 deletions

View File

@@ -91,6 +91,9 @@ export function setRef(
if (!isArray(existing)) {
if (_isString) {
refs[ref] = [refValue]
if (hasOwn(setupState, ref)) {
setupState[ref] = refs[ref]
}
} else {
ref.value = [refValue]
if (rawRef.k) refs[rawRef.k] = ref.value