fix(compiler-sfc/reactivity-transform): fix edge case where normal script has ref macros but script setup does not
This commit is contained in:
@@ -71,6 +71,23 @@ exports[`sfc ref transform usage in normal <script> 1`] = `
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`sfc ref transform usage with normal <script> (has macro usage) + <script setup> (no macro usage) 1`] = `
|
||||
"import { ref as _ref } from 'vue'
|
||||
|
||||
let data = _ref()
|
||||
|
||||
export default {
|
||||
setup(__props, { expose }) {
|
||||
expose();
|
||||
|
||||
console.log(data.value)
|
||||
|
||||
return { data }
|
||||
}
|
||||
|
||||
}"
|
||||
`;
|
||||
|
||||
exports[`sfc ref transform usage with normal <script> + <script setup> 1`] = `
|
||||
"import { ref as _ref } from 'vue'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user