mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 00:09:42 +08:00
Allow components to initialise props
This commit is contained in:
parent
3796193291
commit
7d12f7853b
@ -23,6 +23,9 @@ export default class Component {
|
||||
*/
|
||||
static component(props) {
|
||||
props = props || {};
|
||||
if (this.props) {
|
||||
props = this.props(props);
|
||||
}
|
||||
var view = function(component) {
|
||||
component.props = props;
|
||||
return component.view();
|
||||
|
Loading…
x
Reference in New Issue
Block a user