File tree Expand file tree Collapse file tree 7 files changed +75
-4
lines changed Expand file tree Collapse file tree 7 files changed +75
-4
lines changed Original file line number Diff line number Diff line change 31
31
新增功能模块先确定涉及应用,按照上面目录结构维护代码同时建议遵守以下约束:
32
32
33
33
- 子应用可以配置自己的layout需要在应用router模块导出配置subAppRoutes
34
- - 子应用支持使用自己的header,需要在config.json里配置模块路径
35
34
- 各应用需要使用iView作为UI库,并提供路由,国际化等配置写入config.json
36
35
- 各应用间不要相互直接依赖,确有依赖通过lerna管理
37
36
- 可复用组件,资源需要合理放置,packages/shared 共享组件方法,修改需要注意影响
43
42
44
43
### 如何新增一个子应用,如何扩展
45
44
46
- 1 . config.json 新增应用配置
45
+ 1 . config.json apps里新增应用配置(apps里配置的字应用模块会一起合并打包)
47
46
2 . packages 下新建应用目录或者插件目录进行应用开发
48
47
48
+ 参考packages/demo:
49
+ npm run serve --configfile=config.demo.json
50
+ http://localhost:8080/#/demoHome
49
51
50
52
### 前端开发、构建打包
51
53
Original file line number Diff line number Diff line change
1
+ {
2
+ "apps" : {
3
+ "demo" : {
4
+ "routes" : " demo/router" ,
5
+ "module" : " demo/module" ,
6
+ "i18n" : {
7
+ "en" : " demo/i18n/en.json" ,
8
+ "zh-CN" : " demo/i18n/zh.json"
9
+ }
10
+ }
11
+ },
12
+ "exts" : {
13
+ },
14
+ "components" : {
15
+ },
16
+ "conf" : {
17
+ "app_name" : " DataSphere Studio" ,
18
+ "app_logo" : " dss/assets/images/dssLogo.png" ,
19
+ "user_guide" : " " ,
20
+ "faq_link" : " /_book/" ,
21
+ "copy_project_enable" : true ,
22
+ "error_report" : true ,
23
+ "table_transfer" : true ,
24
+ "watermark" : {
25
+ "show" : true ,
26
+ "template" : " ${username} ${time}" ,
27
+ "timeupdate" : 60000
28
+ },
29
+ "update_chrome" : " /_book/知识库/DSS常见问题/其他/DSS使用推荐的浏览器版本.html"
30
+ },
31
+ "version" : " 1.1.2"
32
+ }
Original file line number Diff line number Diff line change 3
3
"version" : " 1.1.6" ,
4
4
"private" : true ,
5
5
"scripts" : {
6
- "serve" : " cd packages/dss && npm run serve" ,
7
- "build" : " cd packages/dss && npm run build" ,
6
+ "serve" : " patch-package && cd packages/dss && npm run serve" ,
7
+ "build" : " patch-package && cd packages/dss && npm run build" ,
8
8
"serve-sandbox" : " patch-package && npm run serve --configfile=config.sandbox.json" ,
9
9
"build-sandbox" : " patch-package && npm run build --configfile=config.sandbox.json" ,
10
10
"serve-scriptis" : " patch-package && npm run serve --module=scriptis --micro_module=scriptis" ,
Original file line number Diff line number Diff line change
1
+ {
2
+ "message" : {
3
+ }
4
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "message" : {
3
+ }
4
+ }
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <h2 >Hi, Demo Page!</h2 >
3
+ </template >
Original file line number Diff line number Diff line change
1
+ // 子应用layout 自定义 header footer 等需要导出subAppRoutes
2
+ // export const subAppRoutes = {
3
+ // path: '',
4
+ // name: 'layout',
5
+ // component: () => import('./view/layout.vue'),
6
+ // redirect: '/home',
7
+ // meta: {
8
+ // publicPage: true, // 权限公开
9
+ // },
10
+ // children: [
11
+
12
+ // ]
13
+ // }
14
+
15
+ export default [
16
+ {
17
+ path : 'demoHome' ,
18
+ name : 'DemoHome' ,
19
+ meta : {
20
+ title : 'Tests' ,
21
+ publicPage : true ,
22
+ } ,
23
+ component : ( ) =>
24
+ import ( './module/index.vue' ) ,
25
+ } ,
26
+ ]
You can’t perform that action at this time.
0 commit comments