refactor(compiler-sfc): use shallowRef for ref sugar destructure
This commit is contained in:
@@ -643,7 +643,7 @@ export function compileScript(
|
||||
// append binding declarations after the parent statement
|
||||
s.appendLeft(
|
||||
statement.end! + startOffset,
|
||||
`\nconst ${nameId.name} = ${helper('ref')}(__${nameId.name});`
|
||||
`\nconst ${nameId.name} = ${helper('shallowRef')}(__${nameId.name});`
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -677,7 +677,7 @@ export function compileScript(
|
||||
// append binding declarations after the parent statement
|
||||
s.appendLeft(
|
||||
statement.end! + startOffset,
|
||||
`\nconst ${nameId.name} = ${helper('ref')}(__${nameId.name});`
|
||||
`\nconst ${nameId.name} = ${helper('shallowRef')}(__${nameId.name});`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user