fix(runtime-core): handle template ref with number values (#8233)

close #8230
This commit is contained in:
丶远方 2023-05-05 16:00:01 +08:00 committed by GitHub
parent 038cd830d5
commit 1b1242f4d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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)