引入
ts
import { startApp } from 't-comm';
// 不支持 tree-shaking 的项目
import { startApp} from 't-comm/lib/vue-start/index';
// 只支持 ESM 的项目
import { startApp} from 't-comm/es/vue-start/index';
startApp(options)
描述:
Vue项目初始化
参数:
参数名 | 类型 | 描述 |
---|---|---|
options | object | 业务自定义配置 |
options.App | object | 业务App.vue对象 |
[options.routerMap] | Array<object> | 业务路由配置表 |
[options.beforeStart] | function | 钩子函数,业务自定义 |
[options.i18n] | boolean | 支持国际化 |
返回: object
返回 { router, store }