+12
-2
lines changedFilter options
+12
-2
lines changed Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@
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,8 +58,18 @@
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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4