11// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22
3+ exports [` compiler: vModel transform > component > component v-model should merge with explicit @update:modelValue 1` ] = `
4+ "
5+ const _component_Comp = _resolveComponent("Comp")
6+ const n0 = _createComponentWithFallback(_component_Comp, {
7+ modelValue : () => (counter .value ),
8+ " onUpdate:modelValue" : () => [
9+ _value => (counter .value = _value ),
10+ onUpdate
11+ ]
12+ } , null, true)
13+ return n0
14+ "
15+ ` ;
16+
317exports [` compiler: vModel transform > component > v-model for component should generate modelModifiers 1` ] = `
418"import { resolveComponent as _resolveComponent , createComponentWithFallback as _createComponentWithFallback } from 'vue';
519
620export function render(_ctx) {
721 const _component_Comp = _resolveComponent (" Comp" )
8- const n0 = _createComponentWithFallback (_component_Comp , { modelValue : () => (_ctx .foo ),
9- " onUpdate:modelValue" : () => _value => (_ctx .foo = _value ),
10- modelModifiers : () => ({ trim: true , " bar-baz" : true }) }, null , true )
22+ const n0 = _createComponentWithFallback (_component_Comp , {
23+ modelValue : () => (_ctx .foo ),
24+ " onUpdate:modelValue" : () => _value => (_ctx .foo = _value ),
25+ modelModifiers : () => ({ trim: true , " bar-baz" : true })
26+ }, null , true )
1127 return n0
1228} "
1329` ;
@@ -17,8 +33,10 @@ exports[`compiler: vModel transform > component > v-model for component should w
1733
1834export function render(_ctx) {
1935 const _component_Comp = _resolveComponent (" Comp" )
20- const n0 = _createComponentWithFallback (_component_Comp , { modelValue : () => (_ctx .foo ),
21- " onUpdate:modelValue" : () => _value => (_ctx .foo = _value ) }, null , true )
36+ const n0 = _createComponentWithFallback (_component_Comp , {
37+ modelValue : () => (_ctx .foo ),
38+ " onUpdate:modelValue" : () => _value => (_ctx .foo = _value )
39+ }, null , true )
2240 return n0
2341} "
2442` ;
@@ -45,8 +63,10 @@ exports[`compiler: vModel transform > component > v-model with arguments for com
4563
4664export function render(_ctx) {
4765 const _component_Comp = _resolveComponent (" Comp" )
48- const n0 = _createComponentWithFallback (_component_Comp , { bar : () => (_ctx .foo ),
49- " onUpdate:bar" : () => _value => (_ctx .foo = _value ) }, null , true )
66+ const n0 = _createComponentWithFallback (_component_Comp , {
67+ bar : () => (_ctx .foo ),
68+ " onUpdate:bar" : () => _value => (_ctx .foo = _value )
69+ }, null , true )
5070 return n0
5171} "
5272` ;
@@ -57,12 +77,16 @@ exports[`compiler: vModel transform > component > v-model with dynamic arguments
5777export function render(_ctx) {
5878 const _component_Comp = _resolveComponent (" Comp" )
5979 const n0 = _createComponentWithFallback (_component_Comp , { $: [
60- () => ({ [_ctx .foo ]: _ctx .foo ,
61- [" onUpdate:" + _ctx .foo ]: () => _value => (_ctx .foo = _value ),
62- [_ctx .foo + " Modifiers" ]: () => ({ trim: true }) }),
63- () => ({ [_ctx .bar ]: _ctx .bar ,
64- [" onUpdate:" + _ctx .bar ]: () => _value => (_ctx .bar = _value ),
65- [_ctx .bar + " Modifiers" ]: () => ({ number: true }) })
80+ () => ({
81+ [_ctx .foo ]: _ctx .foo ,
82+ [" onUpdate:" + _ctx .foo ]: () => _value => (_ctx .foo = _value ),
83+ [_ctx .foo + " Modifiers" ]: () => ({ trim: true })
84+ }),
85+ () => ({
86+ [_ctx .bar ]: _ctx .bar ,
87+ [" onUpdate:" + _ctx .bar ]: () => _value => (_ctx .bar = _value ),
88+ [_ctx .bar + " Modifiers" ]: () => ({ number: true })
89+ })
6690 ] }, null , true )
6791 return n0
6892} "
@@ -74,8 +98,10 @@ exports[`compiler: vModel transform > component > v-model with dynamic arguments
7498export function render(_ctx) {
7599 const _component_Comp = _resolveComponent (" Comp" )
76100 const n0 = _createComponentWithFallback (_component_Comp , { $: [
77- () => ({ [_ctx .arg ]: _ctx .foo ,
78- [" onUpdate:" + _ctx .arg ]: () => _value => (_ctx .foo = _value ) })
101+ () => ({
102+ [_ctx .arg ]: _ctx .foo ,
103+ [" onUpdate:" + _ctx .arg ]: () => _value => (_ctx .foo = _value )
104+ })
79105 ] }, null , true )
80106 return n0
81107} "
@@ -86,9 +112,11 @@ exports[`compiler: vModel transform > component > v-model:model with arguments f
86112
87113export function render(_ctx) {
88114 const _component_Comp = _resolveComponent (" Comp" )
89- const n0 = _createComponentWithFallback (_component_Comp , { model : () => (_ctx .foo ),
90- " onUpdate:model" : () => _value => (_ctx .foo = _value ),
91- modelModifiers$ : () => ({ trim: true }) }, null , true )
115+ const n0 = _createComponentWithFallback (_component_Comp , {
116+ model : () => (_ctx .foo ),
117+ " onUpdate:model" : () => _value => (_ctx .foo = _value ),
118+ modelModifiers$ : () => ({ trim: true })
119+ }, null , true )
92120 return n0
93121} "
94122` ;
0 commit comments