feat(reactivity-transform): $$() escape for destructured prop bindings

This commit is contained in:
Evan You
2021-12-11 17:50:09 +08:00
parent 179fc05a84
commit 198ca14f19
4 changed files with 96 additions and 15 deletions

View File

@@ -1,5 +1,25 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`sfc props transform $$() escape 1`] = `
"import { toRef as _toRef } from 'vue'
export default {
props: ['foo'],
setup(__props) {
const __props_bar = _toRef(__props, 'bar')
const __props_foo = _toRef(__props, 'foo')
console.log((__props_foo))
console.log((__props_bar))
({ foo: __props_foo, baz: __props_bar })
return () => {}
}
}"
`;
exports[`sfc props transform aliasing 1`] = `
"import { toDisplayString as _toDisplayString } from \\"vue\\"