File tree 3 files changed +35
-1
lines changed
src/generators/server-side-rendering/visitors
test/runtime/samples/spread-element-multiple 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export default function visitElement(
56
56
block . contextualise ( attribute . value [ 0 ] . expression ) ;
57
57
args . push ( `{ ${ quoteIfNecessary ( attribute . name ) } : ${ attribute . value [ 0 ] . metadata . snippet } }` ) ;
58
58
} else {
59
- args . push ( `{ ${ quoteIfNecessary ( attribute . name ) } : " ${ stringifyAttributeValue ( block , attribute . value ) } " }` ) ;
59
+ args . push ( `{ ${ quoteIfNecessary ( attribute . name ) } : \` ${ stringifyAttributeValue ( block , attribute . value ) } \` }` ) ;
60
60
}
61
61
}
62
62
} ) ;
Original file line number Diff line number Diff line change
1
+ export default {
2
+ data : {
3
+ a : {
4
+ 'data-one' : 1 ,
5
+ 'data-two' : 2 ,
6
+ } ,
7
+ c : {
8
+ 'data-b' : 'overridden' ,
9
+ } ,
10
+ d : 'deeeeee' ,
11
+ } ,
12
+
13
+ html : `
14
+ <div data-one="1" data-two="2" data-b="overridden" data-d="deeeeee" >test</div>
15
+ ` ,
16
+
17
+ test ( assert , component , target ) {
18
+ component . set ( {
19
+ a : {
20
+ 'data-one' : 10
21
+ } ,
22
+ c : {
23
+ 'data-c' : 'new'
24
+ } ,
25
+ d : 'DEEEEEE'
26
+ } ) ;
27
+
28
+ assert . htmlEqual (
29
+ target . innerHTML ,
30
+ `<div data-one="10" data-b="b" data-c="new" data-d="DEEEEEE" >test</div>`
31
+ ) ;
32
+ } ,
33
+ } ;
Original file line number Diff line number Diff line change
1
+ < div {{...a}} data-b ="b " {{...c}} data-d ={{d}} > test</ div >
You can’t perform that action at this time.
0 commit comments