11// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22
3+ exports [` cache multiple access > cache variable used in both property shorthand and normal binding 1` ] = `
4+ "import { setStyle as _setStyle , setProp as _setProp , renderEffect as _renderEffect , template as _template } from 'vue';
5+ const t0 = _template("<div ></div >", true)
6+
7+ export function render(_ctx) {
8+ const n0 = t0 ()
9+ _renderEffect (() => {
10+ const _color = _ctx .color
11+ _setStyle (n0 , {color: _color })
12+ _setProp (n0 , " id" , _color )
13+ })
14+ return n0
15+ } "
16+ ` ;
17+
318exports [` cache multiple access > dynamic key bindings with expressions 1` ] = `
419"import { setDynamicProps as _setDynamicProps , renderEffect as _renderEffect , template as _template } from 'vue';
520const t0 = _template("<div ></div >", true)
@@ -40,7 +55,7 @@ export function render(_ctx) {
4055 const _foo = _ctx .foo
4156 const _bar = _ctx .bar
4257 const _foo_bar_baz = _foo [_bar (_ctx .baz )]
43-
58+
4459 _setProp (n0 , " id" , _foo_bar_baz )
4560 _setProp (n1 , " id" , _foo_bar_baz )
4661 _setProp (n2 , " id" , _bar () + _foo )
@@ -60,6 +75,17 @@ export function render(_ctx) {
6075} "
6176` ;
6277
78+ exports [` cache multiple access > not cache variable only used in property shorthand 1` ] = `
79+ "import { setStyle as _setStyle , renderEffect as _renderEffect , template as _template } from 'vue';
80+ const t0 = _template("<div ></div >", true)
81+
82+ export function render(_ctx) {
83+ const n0 = t0 ()
84+ _renderEffect (() => _setStyle (n0 , {color: _ctx .color }))
85+ return n0
86+ } "
87+ ` ;
88+
6389exports [` cache multiple access > object property chain access 1` ] = `
6490"import { setProp as _setProp , renderEffect as _renderEffect , template as _template } from 'vue';
6591const t0 = _template("<div ></div >")
@@ -70,7 +96,7 @@ export function render(_ctx) {
7096 _renderEffect (() => {
7197 const _obj = _ctx .obj
7298 const _obj_foo_baz_obj_bar = _obj [' foo' ][' baz' ] + _obj .bar
73-
99+
74100 _setProp (n0 , " id" , _obj_foo_baz_obj_bar )
75101 _setProp (n1 , " id" , _obj_foo_baz_obj_bar )
76102 })
@@ -89,7 +115,7 @@ export function render(_ctx) {
89115 _renderEffect (() => {
90116 const _foo = _ctx .foo
91117 const _foo_bar = _foo + _ctx .bar
92-
118+
93119 _setProp (n0 , " id" , _foo_bar )
94120 _setProp (n1 , " id" , _foo_bar )
95121 _setProp (n2 , " id" , _foo + _foo_bar )
@@ -107,7 +133,7 @@ export function render(_ctx) {
107133 const n1 = t0 ()
108134 _renderEffect (() => {
109135 const _foo_bar = _ctx .foo + _ctx .bar
110-
136+
111137 _setProp (n0 , " id" , _foo_bar )
112138 _setProp (n1 , " id" , _foo_bar )
113139 })
@@ -140,7 +166,7 @@ export function render(_ctx) {
140166 const n1 = t0 ()
141167 _renderEffect (() => {
142168 const _foo = _ctx .foo
143-
169+
144170 _setClass (n0 , _foo )
145171 _setClass (n1 , _foo )
146172 })
@@ -461,12 +487,12 @@ export function render(_ctx) {
461487 _setAttr (n0 , " form" , _ctx .form )
462488 _setAttr (n1 , " list" , _ctx .list )
463489 _setAttr (n2 , " type" , _ctx .type )
464-
490+
465491 _setAttr (n3 , " width" , _width )
466492 _setAttr (n4 , " width" , _width )
467493 _setAttr (n5 , " width" , _width )
468494 _setAttr (n6 , " width" , _width )
469-
495+
470496 _setAttr (n3 , " height" , _height )
471497 _setAttr (n4 , " height" , _height )
472498 _setAttr (n5 , " height" , _height )
0 commit comments