new-page.md 746 B

新建模块

本系统的所有页面、代码都是按模块组织的,所以新增页面前需要新建一个模块

src_custom 目录下新建一个子目录,模块英文名作为目录名。例如:htgl

htgl 目录下新建 index.js 文件,这个文件会被模块系统自动导入

定义路由

路由一般定义在模块的 index.js 文件中

框架页内的路由,需要定义成 /sd-frame 的子路由

注意:项目增加的路由,应该以 xm- 为前缀,便于和平台本身自带的路由区分

```js static import routerService from '@/common/services/router-service'

routerService.routeInFrame('xm-hello', { component:'./xm-example.vue'), }) ```