File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,11 @@ describe('指令', () => {
220
220
`<template name="a"><view class="_div" style=" {{('color:' + activeColor + ';' + 'font-size:' + (fontSize + 'px') + ';')}}">111</view></template>` ,
221
221
{ name : 'a' }
222
222
)
223
+ assertCodegen (
224
+ `<div v-bind:style="{ color: a === b ? activeColor : color, fontSize: fontSize + 'px' }">111</div>` ,
225
+ `<template name="a"><view class="_div" style=" {{( 'color:' + (a === b ? activeColor : color) + ';' + 'font-size:' + (fontSize + 'px') + ';')}}">111</view></template>` ,
226
+ { name : 'a' }
227
+ )
223
228
assertCodegen (
224
229
`<div v-bind:style="[{ color: activeColor, fontSize: fontSize + 'px' }]">111</div>` ,
225
230
`<template name="a"><view class="_div" style=" {{['color:' + activeColor + ';' + 'font-size:' + (fontSize + 'px') + ';']}}">111</view></template>` ,
You can’t perform that action at this time.
0 commit comments