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', }; }, });