Home > @elux/vue-web > createApp
createApp() function
创建应用(CSR)
Signature:
export declare function createApp(appConfig: AppConfig): EluxApp;
Parameters
Parameter | Type | Description |
---|---|---|
appConfig | AppConfig | 应用配置 |
Returns:
返回包含render
方法的实例,参见RenderOptions
Example
createApp(config)
.render()
.then(() => {
const initLoading = document.getElementById('root-loading');
if (initLoading) {
initLoading.parentNode!.removeChild(initLoading);
}
});