File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ declare type ASTElement = {
121
121
model ?: {
122
122
value : string ;
123
123
callback: string ;
124
+ expression: string ;
124
125
} ;
125
126
126
127
directives ?: Array < ASTDirective > ;
Original file line number Diff line number Diff line change @@ -220,7 +220,13 @@ function genData (el: ASTElement): string {
220
220
}
221
221
// component v-model
222
222
if ( el . model ) {
223
- data += `model:{value:${ el . model . value } ,callback:${ el . model . callback } },`
223
+ data += `model:{value:${
224
+ el . model . value
225
+ } ,callback:${
226
+ el . model . callback
227
+ } ,expression:${
228
+ el . model . expression
229
+ } },`
224
230
}
225
231
// inline-template
226
232
if ( el . inlineTemplate ) {
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ export function genComponentModel (
25
25
26
26
el . model = {
27
27
value : `(${ value } )` ,
28
+ expression : `"${ value } "` ,
28
29
callback : `function (${ baseValueExpression } ) {${ assignment } }`
29
30
}
30
31
}
You can’t perform that action at this time.
0 commit comments