File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 46
46
export default {
47
47
name: ' MdApp' ,
48
48
functional: true ,
49
- render (createElement , { children, props }) {
49
+ render (createElement , { children, props, data }) {
50
50
let appComponent = MdAppSideDrawer
51
51
const { context , functionalContext , componentOptions } = createElement (appComponent)
52
52
const slots = buildSlots (children, context, functionalContext, componentOptions)
58
58
}
59
59
})
60
60
61
+ const staticClass = {}
62
+ if (data .staticClass ) {
63
+ data .staticClass .split (/ \s + / ).forEach (name => {
64
+ if (name .length === 0 ) return
65
+ staticClass[name] = true
66
+ })
67
+ }
68
+
61
69
return createElement (appComponent, {
62
- attrs: props
70
+ attrs: props,
71
+ class: {... staticClass, ... data .class },
72
+ style: {... data .staticStyle , ... data .style },
63
73
}, slots)
64
74
}
65
75
}
You can’t perform that action at this time.
0 commit comments