refactor(ref-transform): use shallowRef to align with types

This commit is contained in:
Evan You
2021-08-24 09:20:32 -04:00
parent b40845153c
commit 8f1101c498
3 changed files with 33 additions and 33 deletions

View File

@@ -255,7 +255,7 @@ export function transformAST(
// append binding declarations after the parent statement
s.appendLeft(
statement.end! + offset,
`\nconst ${nameId.name} = ${helper('ref')}(__${nameId.name});`
`\nconst ${nameId.name} = ${helper('shallowRef')}(__${nameId.name});`
)
}
}
@@ -289,7 +289,7 @@ export function transformAST(
// append binding declarations after the parent statement
s.appendLeft(
statement.end! + offset,
`\nconst ${nameId.name} = ${helper('ref')}(__${nameId.name});`
`\nconst ${nameId.name} = ${helper('shallowRef')}(__${nameId.name});`
)
}
}