File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -228,21 +228,21 @@ obj.a++
228228const ComponentWithStyleInVNodeData = Vue . extend ( {
229229 render ( h ) {
230230 const elementWithStyleAsString = h ( 'div' , {
231- style : 'background- color: red ;'
231+ style : '--theme- color: black ;'
232232 } )
233233
234- const elementWithStyleAsObject = h ( 'div' , {
235- style : { backgroundColor : 'green ' }
234+ const elementWithStyleCSSProperties = h ( 'div' , {
235+ style : { [ '--theme-color' as any ] : 'black ' }
236236 } )
237237
238- const elementWithStyleAsArrayOfObjects = h ( 'div' , {
239- style : [ { backgroundColor : 'blue ' } ]
238+ const elementWithStyleAsArrayOfStyleValues = h ( 'div' , {
239+ style : [ { [ '--theme-color' as any ] : 'black ' } ]
240240 } )
241241
242242 return h ( 'div' , undefined , [
243243 elementWithStyleAsString ,
244- elementWithStyleAsObject ,
245- elementWithStyleAsArrayOfObjects
244+ elementWithStyleCSSProperties ,
245+ elementWithStyleAsArrayOfStyleValues
246246 ] )
247247 }
248248} )
Original file line number Diff line number Diff line change 1+ import { StyleValue } from './jsx'
12import { Vue } from './vue'
23import { DirectiveFunction , DirectiveOptions } from './options'
34import { Ref } from './v3-generated'
@@ -85,7 +86,7 @@ export interface VNodeData {
8586 staticClass ?: string
8687 class ?: any
8788 staticStyle ?: { [ key : string ] : any }
88- style ?: string | object [ ] | object
89+ style ?: StyleValue
8990 props ?: { [ key : string ] : any }
9091 attrs ?: { [ key : string ] : any }
9192 domProps ?: { [ key : string ] : any }
You can’t perform that action at this time.
0 commit comments