You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
633 B
33 lines
633 B
2 years ago
|
import { shortcut, Widget, RouterView, Router } from '@fui/core';
|
||
|
|
||
|
@shortcut()
|
||
|
export class Center extends Widget {
|
||
|
static xtype = 'demo.center';
|
||
|
|
||
|
props = { baseCls: 'demo-center' };
|
||
|
|
||
|
render() {
|
||
|
const self = this;
|
||
|
|
||
|
return {
|
||
|
type: RouterView.xtype,
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@shortcut()
|
||
|
export class RouterDemo extends Widget {
|
||
|
static xtype = 'demo.router';
|
||
|
|
||
|
props = {
|
||
|
baseCls: 'demo-router',
|
||
|
};
|
||
|
|
||
|
render() {
|
||
|
const params = Router.$router.history.current.params;
|
||
|
return {
|
||
|
type: params.componentId,
|
||
|
};
|
||
|
}
|
||
|
}
|