mirror of https://github.com/vuejs/core.git
fix(runtime-core): handle template ref with number values (#8233)
close #8230
This commit is contained in:
parent
038cd830d5
commit
1b1242f4d1
|
@ -404,6 +404,9 @@ const normalizeRef = ({
|
|||
ref_key,
|
||||
ref_for
|
||||
}: VNodeProps): VNodeNormalizedRefAtom | null => {
|
||||
if (typeof ref === 'number') {
|
||||
ref = '' + ref
|
||||
}
|
||||
return (
|
||||
ref != null
|
||||
? isString(ref) || isRef(ref) || isFunction(ref)
|
||||
|
|
Loading…
Reference in New Issue