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.
35 lines
846 B
35 lines
846 B
2 years ago
|
import './less/index.less';
|
||
|
import '../i18n/i18n.cn';
|
||
|
import { createWidget, Layout, RouterWidget } from '@fui/core';
|
||
|
import { Main } from './main';
|
||
|
import { RouterDemo } from './center';
|
||
|
|
||
|
createWidget({
|
||
|
type: RouterWidget.xtype,
|
||
|
routes: [
|
||
|
{
|
||
|
path: '/',
|
||
|
component: function () {
|
||
|
return Promise.resolve({
|
||
|
type: Layout.xtype,
|
||
|
});
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
name: 'component',
|
||
|
path: '/component/:componentId',
|
||
|
component() {
|
||
|
return Promise.resolve({
|
||
|
type: RouterDemo.xtype,
|
||
|
});
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
render() {
|
||
|
return {
|
||
|
type: Main.xtype,
|
||
|
element: '#wrapper',
|
||
|
};
|
||
|
},
|
||
|
});
|