1
1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
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
+
3
18
exports [` cache multiple access > dynamic key bindings with expressions 1` ] = `
4
19
"import { setDynamicProps as _setDynamicProps , renderEffect as _renderEffect , template as _template } from 'vue';
5
20
const t0 = _template("<div ></div >", true)
@@ -40,7 +55,7 @@ export function render(_ctx) {
40
55
const _foo = _ctx .foo
41
56
const _bar = _ctx .bar
42
57
const _foo_bar_baz = _foo [_bar (_ctx .baz )]
43
-
58
+
44
59
_setProp (n0 , " id" , _foo_bar_baz )
45
60
_setProp (n1 , " id" , _foo_bar_baz )
46
61
_setProp (n2 , " id" , _bar () + _foo )
@@ -60,6 +75,17 @@ export function render(_ctx) {
60
75
} "
61
76
` ;
62
77
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
+
63
89
exports [` cache multiple access > object property chain access 1` ] = `
64
90
"import { setProp as _setProp , renderEffect as _renderEffect , template as _template } from 'vue';
65
91
const t0 = _template("<div ></div >")
@@ -70,7 +96,7 @@ export function render(_ctx) {
70
96
_renderEffect (() => {
71
97
const _obj = _ctx .obj
72
98
const _obj_foo_baz_obj_bar = _obj [' foo' ][' baz' ] + _obj .bar
73
-
99
+
74
100
_setProp (n0 , " id" , _obj_foo_baz_obj_bar )
75
101
_setProp (n1 , " id" , _obj_foo_baz_obj_bar )
76
102
})
@@ -89,7 +115,7 @@ export function render(_ctx) {
89
115
_renderEffect (() => {
90
116
const _foo = _ctx .foo
91
117
const _foo_bar = _foo + _ctx .bar
92
-
118
+
93
119
_setProp (n0 , " id" , _foo_bar )
94
120
_setProp (n1 , " id" , _foo_bar )
95
121
_setProp (n2 , " id" , _foo + _foo_bar )
@@ -107,7 +133,7 @@ export function render(_ctx) {
107
133
const n1 = t0 ()
108
134
_renderEffect (() => {
109
135
const _foo_bar = _ctx .foo + _ctx .bar
110
-
136
+
111
137
_setProp (n0 , " id" , _foo_bar )
112
138
_setProp (n1 , " id" , _foo_bar )
113
139
})
@@ -140,7 +166,7 @@ export function render(_ctx) {
140
166
const n1 = t0 ()
141
167
_renderEffect (() => {
142
168
const _foo = _ctx .foo
143
-
169
+
144
170
_setClass (n0 , _foo )
145
171
_setClass (n1 , _foo )
146
172
})
@@ -461,12 +487,12 @@ export function render(_ctx) {
461
487
_setAttr (n0 , " form" , _ctx .form )
462
488
_setAttr (n1 , " list" , _ctx .list )
463
489
_setAttr (n2 , " type" , _ctx .type )
464
-
490
+
465
491
_setAttr (n3 , " width" , _width )
466
492
_setAttr (n4 , " width" , _width )
467
493
_setAttr (n5 , " width" , _width )
468
494
_setAttr (n6 , " width" , _width )
469
-
495
+
470
496
_setAttr (n3 , " height" , _height )
471
497
_setAttr (n4 , " height" , _height )
472
498
_setAttr (n5 , " height" , _height )
0 commit comments