@ibiz-template/runtime 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +606 -136
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/controller/common/base.controller.d.ts.map +1 -1
- package/out/controller/common/base.controller.js +2 -0
- package/out/controller/common/editor/editor.controller.d.ts +1 -1
- package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/editor.controller.js +3 -1
- package/out/controller/control/caption-bar/caption-bar.controller.js +1 -1
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.js +4 -2
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +16 -14
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +1 -0
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +0 -1
- package/out/controller/utils/event/controller-event.d.ts +7 -0
- package/out/controller/utils/event/controller-event.d.ts.map +1 -1
- package/out/controller/utils/event/controller-event.js +17 -0
- package/out/controller/utils/index.d.ts +1 -0
- package/out/controller/utils/index.d.ts.map +1 -1
- package/out/controller/utils/index.js +1 -0
- package/out/controller/utils/value-ex/value-ex.d.ts +47 -0
- package/out/controller/utils/value-ex/value-ex.d.ts.map +1 -0
- package/out/controller/utils/value-ex/value-ex.js +48 -0
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +16 -5
- package/out/interface/common/i-modal/i-modal.d.ts +8 -0
- package/out/interface/common/i-modal/i-modal.d.ts.map +1 -1
- package/out/interface/controller/state/common/i-controller.state.d.ts +8 -0
- package/out/interface/controller/state/common/i-controller.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-search-bar.state.d.ts +8 -0
- package/out/interface/controller/state/control/i-search-bar.state.d.ts.map +1 -1
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +3 -1
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/entity/method/method.js +5 -4
- package/out/ui-action/provider/backend-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/backend-ui-action-provider.js +6 -3
- package/out/ui-action/uiaction-util.d.ts.map +1 -1
- package/out/ui-action/uiaction-util.js +1 -0
- package/out/utils/handlebars/handlebars.d.ts +11 -2
- package/out/utils/handlebars/handlebars.d.ts.map +1 -1
- package/out/utils/handlebars/handlebars.js +24 -2
- package/out/utils/handlebars/helpers/and/and.d.ts +16 -0
- package/out/utils/handlebars/helpers/and/and.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/and/and.js +24 -0
- package/out/utils/handlebars/helpers/camel-case/camel-case.d.ts +16 -0
- package/out/utils/handlebars/helpers/camel-case/camel-case.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/camel-case/camel-case.js +23 -0
- package/out/utils/handlebars/helpers/concat/concat.d.ts +16 -0
- package/out/utils/handlebars/helpers/concat/concat.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/concat/concat.js +20 -0
- package/out/utils/handlebars/helpers/eq/eq.d.ts +16 -0
- package/out/utils/handlebars/helpers/eq/eq.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/eq/eq.js +22 -0
- package/out/utils/handlebars/helpers/eq-property-value/eq-property-value.d.ts +15 -0
- package/out/utils/handlebars/helpers/eq-property-value/eq-property-value.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/eq-property-value/eq-property-value.js +32 -0
- package/out/utils/handlebars/helpers/gt/gt.d.ts +16 -0
- package/out/utils/handlebars/helpers/gt/gt.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/gt/gt.js +22 -0
- package/out/utils/handlebars/helpers/gte/gte.d.ts +16 -0
- package/out/utils/handlebars/helpers/gte/gte.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/gte/gte.js +22 -0
- package/out/utils/handlebars/helpers/helper-base.d.ts +29 -0
- package/out/utils/handlebars/helpers/helper-base.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/helper-base.js +20 -0
- package/out/utils/handlebars/helpers/index.d.ts +9 -0
- package/out/utils/handlebars/helpers/index.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/index.js +45 -0
- package/out/utils/handlebars/helpers/json/json.d.ts +16 -0
- package/out/utils/handlebars/helpers/json/json.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/json/json.js +19 -0
- package/out/utils/handlebars/helpers/lower-case/lower-case.d.ts +16 -0
- package/out/utils/handlebars/helpers/lower-case/lower-case.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/lower-case/lower-case.js +22 -0
- package/out/utils/handlebars/helpers/lt/lt.d.ts +16 -0
- package/out/utils/handlebars/helpers/lt/lt.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/lt/lt.js +22 -0
- package/out/utils/handlebars/helpers/lte/lte.d.ts +16 -0
- package/out/utils/handlebars/helpers/lte/lte.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/lte/lte.js +22 -0
- package/out/utils/handlebars/helpers/neq/neq.d.ts +16 -0
- package/out/utils/handlebars/helpers/neq/neq.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/neq/neq.js +22 -0
- package/out/utils/handlebars/helpers/not/not.d.ts +16 -0
- package/out/utils/handlebars/helpers/not/not.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/not/not.js +21 -0
- package/out/utils/handlebars/helpers/or/or.d.ts +16 -0
- package/out/utils/handlebars/helpers/or/or.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/or/or.js +27 -0
- package/out/utils/handlebars/helpers/pascal-case/pascal-case.d.ts +16 -0
- package/out/utils/handlebars/helpers/pascal-case/pascal-case.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/pascal-case/pascal-case.js +23 -0
- package/out/utils/handlebars/helpers/snake-case/snake-case.d.ts +16 -0
- package/out/utils/handlebars/helpers/snake-case/snake-case.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/snake-case/snake-case.js +23 -0
- package/out/utils/handlebars/helpers/spinal-case/spinal-case.d.ts +16 -0
- package/out/utils/handlebars/helpers/spinal-case/spinal-case.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/spinal-case/spinal-case.js +23 -0
- package/out/utils/handlebars/helpers/upper-case/upper-case.d.ts +16 -0
- package/out/utils/handlebars/helpers/upper-case/upper-case.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/upper-case/upper-case.js +22 -0
- package/out/utils/handlebars/utils/helper/helper.d.ts +42 -0
- package/out/utils/handlebars/utils/helper/helper.d.ts.map +1 -0
- package/out/utils/handlebars/utils/helper/helper.js +69 -0
- package/out/utils/handlebars/utils/index.d.ts +2 -0
- package/out/utils/handlebars/utils/index.d.ts.map +1 -0
- package/out/utils/handlebars/utils/index.js +1 -0
- package/out/utils/modal/modal.d.ts +1 -0
- package/out/utils/modal/modal.d.ts.map +1 -1
- package/out/utils/modal/modal.js +5 -2
- package/package.json +3 -3
- package/src/controller/common/base.controller.ts +2 -0
- package/src/controller/common/editor/editor.controller.ts +5 -2
- package/src/controller/control/caption-bar/caption-bar.controller.ts +1 -1
- package/src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts +4 -2
- package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +17 -14
- package/src/controller/control/search-bar/search-bar.controller.ts +1 -0
- package/src/controller/control/tree/tree.controller.ts +0 -1
- package/src/controller/utils/event/controller-event.ts +18 -0
- package/src/controller/utils/index.ts +1 -0
- package/src/controller/utils/value-ex/value-ex.ts +83 -0
- package/src/engine/md-view.engine.ts +17 -5
- package/src/interface/common/i-modal/i-modal.ts +9 -0
- package/src/interface/controller/state/common/i-controller.state.ts +9 -0
- package/src/interface/controller/state/control/i-search-bar.state.ts +9 -0
- package/src/service/dto/method.dto.ts +3 -1
- package/src/service/service/entity/method/method.ts +11 -4
- package/src/ui-action/provider/backend-ui-action-provider.ts +6 -3
- package/src/ui-action/uiaction-util.ts +1 -0
- package/src/utils/handlebars/handlebars.ts +25 -3
- package/src/utils/handlebars/helpers/and/and.ts +26 -0
- package/src/utils/handlebars/helpers/camel-case/camel-case.ts +25 -0
- package/src/utils/handlebars/helpers/concat/concat.ts +22 -0
- package/src/utils/handlebars/helpers/eq/eq.ts +28 -0
- package/src/utils/handlebars/helpers/eq-property-value/eq-property-value.ts +41 -0
- package/src/utils/handlebars/helpers/gt/gt.ts +28 -0
- package/src/utils/handlebars/helpers/gte/gte.ts +28 -0
- package/src/utils/handlebars/helpers/helper-base.ts +31 -0
- package/src/utils/handlebars/helpers/index.ts +46 -0
- package/src/utils/handlebars/helpers/json/json.ts +25 -0
- package/src/utils/handlebars/helpers/lower-case/lower-case.ts +24 -0
- package/src/utils/handlebars/helpers/lt/lt.ts +28 -0
- package/src/utils/handlebars/helpers/lte/lte.ts +28 -0
- package/src/utils/handlebars/helpers/neq/neq.ts +28 -0
- package/src/utils/handlebars/helpers/not/not.ts +26 -0
- package/src/utils/handlebars/helpers/or/or.ts +28 -0
- package/src/utils/handlebars/helpers/pascal-case/pascal-case.ts +25 -0
- package/src/utils/handlebars/helpers/snake-case/snake-case.ts +25 -0
- package/src/utils/handlebars/helpers/spinal-case/spinal-case.ts +25 -0
- package/src/utils/handlebars/helpers/upper-case/upper-case.ts +24 -0
- package/src/utils/handlebars/utils/helper/helper.ts +75 -0
- package/src/utils/handlebars/utils/index.ts +1 -0
- package/src/utils/modal/modal.ts +6 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HelperBase } from '../helper-base';
|
|
2
|
+
/**
|
|
3
|
+
* 小于等于
|
|
4
|
+
*
|
|
5
|
+
* @description 判断: word <= word2, 用法 {{#lte word word2}}xxx{{else}}yyy{{/lte}}、{{lte word word2}} 返回值为 boolean 类型
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2021-12-24 15:12:18
|
|
8
|
+
* @export
|
|
9
|
+
* @class HelperLte
|
|
10
|
+
* @extends {HelperBase}
|
|
11
|
+
*/
|
|
12
|
+
export declare class HelperLte extends HelperBase {
|
|
13
|
+
constructor(hbs: IData);
|
|
14
|
+
onExecute(param: unknown, param2: unknown, options: Handlebars.HelperOptions): string | boolean;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=lte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lte.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/helpers/lte/lte.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;GASG;AACH,qBAAa,SAAU,SAAQ,UAAU;gBAC3B,GAAG,EAAE,KAAK;IAItB,SAAS,CACP,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,aAAa,GAChC,MAAM,GAAG,OAAO;CAIpB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { lte } from 'lodash-es';
|
|
2
|
+
import { HelperUtil } from '../../utils';
|
|
3
|
+
import { HelperBase } from '../helper-base';
|
|
4
|
+
/**
|
|
5
|
+
* 小于等于
|
|
6
|
+
*
|
|
7
|
+
* @description 判断: word <= word2, 用法 {{#lte word word2}}xxx{{else}}yyy{{/lte}}、{{lte word word2}} 返回值为 boolean 类型
|
|
8
|
+
* @author chitanda
|
|
9
|
+
* @date 2021-12-24 15:12:18
|
|
10
|
+
* @export
|
|
11
|
+
* @class HelperLte
|
|
12
|
+
* @extends {HelperBase}
|
|
13
|
+
*/
|
|
14
|
+
export class HelperLte extends HelperBase {
|
|
15
|
+
constructor(hbs) {
|
|
16
|
+
super(hbs, 'lte');
|
|
17
|
+
}
|
|
18
|
+
onExecute(param, param2, options) {
|
|
19
|
+
const bol = lte(param, param2);
|
|
20
|
+
return HelperUtil.handleJudgmentExecute(this, bol, options);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HelperBase } from '../helper-base';
|
|
2
|
+
/**
|
|
3
|
+
* 不等于
|
|
4
|
+
*
|
|
5
|
+
* @description 判断: word !== word2, 用法 {{#neq word 'xxx'}}xxx{{else}}yyy{{/neq}}、{{neq word 'xxx'}} 返回值为 boolean 类型
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2021-12-24 15:12:21
|
|
8
|
+
* @export
|
|
9
|
+
* @class HelperNeq
|
|
10
|
+
* @extends {HelperBase}
|
|
11
|
+
*/
|
|
12
|
+
export declare class HelperNeq extends HelperBase {
|
|
13
|
+
constructor(hbs: IData);
|
|
14
|
+
onExecute(param: unknown, param2: unknown, options: Handlebars.HelperOptions): string | boolean;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=neq.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neq.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/helpers/neq/neq.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;GASG;AACH,qBAAa,SAAU,SAAQ,UAAU;gBAC3B,GAAG,EAAE,KAAK;IAItB,SAAS,CACP,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,aAAa,GAChC,MAAM,GAAG,OAAO;CAIpB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { eq } from 'lodash-es';
|
|
2
|
+
import { HelperUtil } from '../../utils';
|
|
3
|
+
import { HelperBase } from '../helper-base';
|
|
4
|
+
/**
|
|
5
|
+
* 不等于
|
|
6
|
+
*
|
|
7
|
+
* @description 判断: word !== word2, 用法 {{#neq word 'xxx'}}xxx{{else}}yyy{{/neq}}、{{neq word 'xxx'}} 返回值为 boolean 类型
|
|
8
|
+
* @author chitanda
|
|
9
|
+
* @date 2021-12-24 15:12:21
|
|
10
|
+
* @export
|
|
11
|
+
* @class HelperNeq
|
|
12
|
+
* @extends {HelperBase}
|
|
13
|
+
*/
|
|
14
|
+
export class HelperNeq extends HelperBase {
|
|
15
|
+
constructor(hbs) {
|
|
16
|
+
super(hbs, 'neq');
|
|
17
|
+
}
|
|
18
|
+
onExecute(param, param2, options) {
|
|
19
|
+
const bol = !eq(param, param2);
|
|
20
|
+
return HelperUtil.handleJudgmentExecute(this, bol, options);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HelperBase } from '../helper-base';
|
|
2
|
+
/**
|
|
3
|
+
* 参数不存在或者为空时返回 true
|
|
4
|
+
*
|
|
5
|
+
* @description 判断: 参数为 null、undefined、空字符串、空数组、空对象时返回 true, 用法: {{#not value}}xxx{{else}}yyy{{/not}}、{{not value}} 返回值为 boolean 类型
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2021-12-29 15:12:38
|
|
8
|
+
* @export
|
|
9
|
+
* @class HelperNot
|
|
10
|
+
* @extends {HelperBase}
|
|
11
|
+
*/
|
|
12
|
+
export declare class HelperNot extends HelperBase {
|
|
13
|
+
constructor(hbs: IData);
|
|
14
|
+
onExecute(param: unknown, options: Handlebars.HelperOptions): string | boolean;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=not.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/helpers/not/not.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;GASG;AACH,qBAAa,SAAU,SAAQ,UAAU;gBAC3B,GAAG,EAAE,KAAK;IAItB,SAAS,CACP,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,UAAU,CAAC,aAAa,GAChC,MAAM,GAAG,OAAO;CAIpB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HelperUtil } from '../../utils';
|
|
2
|
+
import { HelperBase } from '../helper-base';
|
|
3
|
+
/**
|
|
4
|
+
* 参数不存在或者为空时返回 true
|
|
5
|
+
*
|
|
6
|
+
* @description 判断: 参数为 null、undefined、空字符串、空数组、空对象时返回 true, 用法: {{#not value}}xxx{{else}}yyy{{/not}}、{{not value}} 返回值为 boolean 类型
|
|
7
|
+
* @author chitanda
|
|
8
|
+
* @date 2021-12-29 15:12:38
|
|
9
|
+
* @export
|
|
10
|
+
* @class HelperNot
|
|
11
|
+
* @extends {HelperBase}
|
|
12
|
+
*/
|
|
13
|
+
export class HelperNot extends HelperBase {
|
|
14
|
+
constructor(hbs) {
|
|
15
|
+
super(hbs, 'not');
|
|
16
|
+
}
|
|
17
|
+
onExecute(param, options) {
|
|
18
|
+
const bol = Handlebars.Utils.isEmpty(param);
|
|
19
|
+
return HelperUtil.handleJudgmentExecute(this, bol, options);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HelperBase } from '../helper-base';
|
|
2
|
+
/**
|
|
3
|
+
* 或者条件
|
|
4
|
+
*
|
|
5
|
+
* @description 判断: word word2 word3 其中任意一个值在判断中为 true, 用法 {{#or word word2 word3}}xxx{{else}}yyy{{/or}}、{{or word word2 word3}} 返回值为 boolean 类型
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2021-12-29 10:12:00
|
|
8
|
+
* @export
|
|
9
|
+
* @class HelperOr
|
|
10
|
+
* @extends {HelperBase}
|
|
11
|
+
*/
|
|
12
|
+
export declare class HelperOr extends HelperBase {
|
|
13
|
+
constructor(hbs: IData);
|
|
14
|
+
onExecute(...args: unknown[] | Handlebars.HelperOptions[]): string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=or.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"or.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/helpers/or/or.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;GASG;AACH,qBAAa,QAAS,SAAQ,UAAU;gBAC1B,GAAG,EAAE,KAAK;IAItB,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,aAAa,EAAE,GAAG,MAAM;CAUnE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HelperBase } from '../helper-base';
|
|
2
|
+
/**
|
|
3
|
+
* 或者条件
|
|
4
|
+
*
|
|
5
|
+
* @description 判断: word word2 word3 其中任意一个值在判断中为 true, 用法 {{#or word word2 word3}}xxx{{else}}yyy{{/or}}、{{or word word2 word3}} 返回值为 boolean 类型
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2021-12-29 10:12:00
|
|
8
|
+
* @export
|
|
9
|
+
* @class HelperOr
|
|
10
|
+
* @extends {HelperBase}
|
|
11
|
+
*/
|
|
12
|
+
export class HelperOr extends HelperBase {
|
|
13
|
+
constructor(hbs) {
|
|
14
|
+
super(hbs, 'or');
|
|
15
|
+
}
|
|
16
|
+
onExecute(...args) {
|
|
17
|
+
var _a;
|
|
18
|
+
const options = args[args.length - 1];
|
|
19
|
+
args.pop();
|
|
20
|
+
const item = args.find(itemArg => !!itemArg);
|
|
21
|
+
if (options.fn) {
|
|
22
|
+
const data = ((_a = options.data) === null || _a === void 0 ? void 0 : _a.root) || {};
|
|
23
|
+
return item ? options.fn(data) : options.inverse(data);
|
|
24
|
+
}
|
|
25
|
+
return item || '';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HelperBase } from '../helper-base';
|
|
2
|
+
/**
|
|
3
|
+
* 首字母转大写
|
|
4
|
+
*
|
|
5
|
+
* @description 用法 {{pascalCase word}},效果: myName => MyName
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2021-12-24 15:12:13
|
|
8
|
+
* @export
|
|
9
|
+
* @class HelperPascalCase
|
|
10
|
+
* @extends {HelperBase}
|
|
11
|
+
*/
|
|
12
|
+
export declare class HelperPascalCase extends HelperBase {
|
|
13
|
+
constructor(hbs: IData);
|
|
14
|
+
onExecute(param: string): string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=pascal-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pascal-case.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/helpers/pascal-case/pascal-case.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;GASG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;gBAClC,GAAG,EAAE,KAAK;IAItB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAMjC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { upperFirst } from 'lodash-es';
|
|
2
|
+
import { HelperBase } from '../helper-base';
|
|
3
|
+
/**
|
|
4
|
+
* 首字母转大写
|
|
5
|
+
*
|
|
6
|
+
* @description 用法 {{pascalCase word}},效果: myName => MyName
|
|
7
|
+
* @author chitanda
|
|
8
|
+
* @date 2021-12-24 15:12:13
|
|
9
|
+
* @export
|
|
10
|
+
* @class HelperPascalCase
|
|
11
|
+
* @extends {HelperBase}
|
|
12
|
+
*/
|
|
13
|
+
export class HelperPascalCase extends HelperBase {
|
|
14
|
+
constructor(hbs) {
|
|
15
|
+
super(hbs, 'pascalCase');
|
|
16
|
+
}
|
|
17
|
+
onExecute(param) {
|
|
18
|
+
if (!param) {
|
|
19
|
+
return '';
|
|
20
|
+
}
|
|
21
|
+
return upperFirst(param);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HelperBase } from '../helper-base';
|
|
2
|
+
/**
|
|
3
|
+
* 驼峰转蛇形命名法
|
|
4
|
+
*
|
|
5
|
+
* @description 用法 {{snakeCase word}},效果: myName => my_name
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2021-12-24 15:12:06
|
|
8
|
+
* @export
|
|
9
|
+
* @class HelperSnakeCase
|
|
10
|
+
* @extends {HelperBase}
|
|
11
|
+
*/
|
|
12
|
+
export declare class HelperSnakeCase extends HelperBase {
|
|
13
|
+
constructor(hbs: IData);
|
|
14
|
+
onExecute(param: string): string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=snake-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snake-case.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/helpers/snake-case/snake-case.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;GASG;AACH,qBAAa,eAAgB,SAAQ,UAAU;gBACjC,GAAG,EAAE,KAAK;IAItB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAMjC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { snakeCase } from 'lodash-es';
|
|
2
|
+
import { HelperBase } from '../helper-base';
|
|
3
|
+
/**
|
|
4
|
+
* 驼峰转蛇形命名法
|
|
5
|
+
*
|
|
6
|
+
* @description 用法 {{snakeCase word}},效果: myName => my_name
|
|
7
|
+
* @author chitanda
|
|
8
|
+
* @date 2021-12-24 15:12:06
|
|
9
|
+
* @export
|
|
10
|
+
* @class HelperSnakeCase
|
|
11
|
+
* @extends {HelperBase}
|
|
12
|
+
*/
|
|
13
|
+
export class HelperSnakeCase extends HelperBase {
|
|
14
|
+
constructor(hbs) {
|
|
15
|
+
super(hbs, 'snakeCase');
|
|
16
|
+
}
|
|
17
|
+
onExecute(param) {
|
|
18
|
+
if (!param) {
|
|
19
|
+
return '';
|
|
20
|
+
}
|
|
21
|
+
return snakeCase(param);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HelperBase } from '../helper-base';
|
|
2
|
+
/**
|
|
3
|
+
* 驼峰命名法转为横线命名法
|
|
4
|
+
*
|
|
5
|
+
* @description 用法 {{spinalCase word}},效果: myName => my-name
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2021-12-24 15:12:37
|
|
8
|
+
* @export
|
|
9
|
+
* @class HelperSpinalCase
|
|
10
|
+
* @extends {HelperBase}
|
|
11
|
+
*/
|
|
12
|
+
export declare class HelperSpinalCase extends HelperBase {
|
|
13
|
+
constructor(hbs: IData);
|
|
14
|
+
onExecute(param: string): string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=spinal-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinal-case.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/helpers/spinal-case/spinal-case.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;GASG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;gBAClC,GAAG,EAAE,KAAK;IAItB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAMjC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { kebabCase } from 'lodash-es';
|
|
2
|
+
import { HelperBase } from '../helper-base';
|
|
3
|
+
/**
|
|
4
|
+
* 驼峰命名法转为横线命名法
|
|
5
|
+
*
|
|
6
|
+
* @description 用法 {{spinalCase word}},效果: myName => my-name
|
|
7
|
+
* @author chitanda
|
|
8
|
+
* @date 2021-12-24 15:12:37
|
|
9
|
+
* @export
|
|
10
|
+
* @class HelperSpinalCase
|
|
11
|
+
* @extends {HelperBase}
|
|
12
|
+
*/
|
|
13
|
+
export class HelperSpinalCase extends HelperBase {
|
|
14
|
+
constructor(hbs) {
|
|
15
|
+
super(hbs, 'spinalCase');
|
|
16
|
+
}
|
|
17
|
+
onExecute(param) {
|
|
18
|
+
if (!param) {
|
|
19
|
+
return '';
|
|
20
|
+
}
|
|
21
|
+
return kebabCase(param);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HelperBase } from '../helper-base';
|
|
2
|
+
/**
|
|
3
|
+
* 字符串转大写
|
|
4
|
+
*
|
|
5
|
+
* @description 用法 {{upperCase word}},效果: myName => MYNAME
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2021-12-24 15:12:21
|
|
8
|
+
* @export
|
|
9
|
+
* @class HelperUpCase
|
|
10
|
+
* @extends {HelperBase}
|
|
11
|
+
*/
|
|
12
|
+
export declare class HelperUpperCase extends HelperBase {
|
|
13
|
+
constructor(hbs: IData);
|
|
14
|
+
onExecute(param: string): string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=upper-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upper-case.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/helpers/upper-case/upper-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;GASG;AACH,qBAAa,eAAgB,SAAQ,UAAU;gBACjC,GAAG,EAAE,KAAK;IAItB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAMjC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HelperBase } from '../helper-base';
|
|
2
|
+
/**
|
|
3
|
+
* 字符串转大写
|
|
4
|
+
*
|
|
5
|
+
* @description 用法 {{upperCase word}},效果: myName => MYNAME
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2021-12-24 15:12:21
|
|
8
|
+
* @export
|
|
9
|
+
* @class HelperUpCase
|
|
10
|
+
* @extends {HelperBase}
|
|
11
|
+
*/
|
|
12
|
+
export class HelperUpperCase extends HelperBase {
|
|
13
|
+
constructor(hbs) {
|
|
14
|
+
super(hbs, 'upperCase');
|
|
15
|
+
}
|
|
16
|
+
onExecute(param) {
|
|
17
|
+
if (!param) {
|
|
18
|
+
return '';
|
|
19
|
+
}
|
|
20
|
+
return param.toUpperCase();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 助手工具类
|
|
3
|
+
*
|
|
4
|
+
* @author chitanda
|
|
5
|
+
* @date 2021-12-29 17:12:32
|
|
6
|
+
* @export
|
|
7
|
+
* @class HelperUtil
|
|
8
|
+
*/
|
|
9
|
+
export declare class HelperUtil {
|
|
10
|
+
/**
|
|
11
|
+
* 当前所有助手 tag 名称
|
|
12
|
+
*
|
|
13
|
+
* @author chitanda
|
|
14
|
+
* @date 2021-12-30 10:12:39
|
|
15
|
+
* @protected
|
|
16
|
+
* @type {string[]}
|
|
17
|
+
*/
|
|
18
|
+
protected static helperNames: string[];
|
|
19
|
+
/**
|
|
20
|
+
* 判断字符串是否为助手
|
|
21
|
+
*
|
|
22
|
+
* @author chitanda
|
|
23
|
+
* @date 2021-12-30 10:12:26
|
|
24
|
+
* @static
|
|
25
|
+
* @param {string} name
|
|
26
|
+
* @return {*} {boolean}
|
|
27
|
+
*/
|
|
28
|
+
static isHelperName(name: string): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 判断类助手统一结果调用处理
|
|
31
|
+
*
|
|
32
|
+
* @author chitanda
|
|
33
|
+
* @date 2021-12-29 17:12:23
|
|
34
|
+
* @static
|
|
35
|
+
* @param {unknown} context 执行上下文
|
|
36
|
+
* @param {boolean} bol 判断结果
|
|
37
|
+
* @param {Handlebars.HelperOptions} options
|
|
38
|
+
* @return {*} {(string | boolean)}
|
|
39
|
+
*/
|
|
40
|
+
static handleJudgmentExecute(context: unknown, bol: boolean, options: Handlebars.HelperOptions): string | boolean;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/utils/helper/helper.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,UAAU;IACrB;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,CAoBpC;IAEF;;;;;;;;OAQG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,qBAAqB,CAC1B,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,UAAU,CAAC,aAAa,GAChC,MAAM,GAAG,OAAO;CAOpB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 助手工具类
|
|
3
|
+
*
|
|
4
|
+
* @author chitanda
|
|
5
|
+
* @date 2021-12-29 17:12:32
|
|
6
|
+
* @export
|
|
7
|
+
* @class HelperUtil
|
|
8
|
+
*/
|
|
9
|
+
export class HelperUtil {
|
|
10
|
+
/**
|
|
11
|
+
* 判断字符串是否为助手
|
|
12
|
+
*
|
|
13
|
+
* @author chitanda
|
|
14
|
+
* @date 2021-12-30 10:12:26
|
|
15
|
+
* @static
|
|
16
|
+
* @param {string} name
|
|
17
|
+
* @return {*} {boolean}
|
|
18
|
+
*/
|
|
19
|
+
static isHelperName(name) {
|
|
20
|
+
return this.helperNames.includes(name);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 判断类助手统一结果调用处理
|
|
24
|
+
*
|
|
25
|
+
* @author chitanda
|
|
26
|
+
* @date 2021-12-29 17:12:23
|
|
27
|
+
* @static
|
|
28
|
+
* @param {unknown} context 执行上下文
|
|
29
|
+
* @param {boolean} bol 判断结果
|
|
30
|
+
* @param {Handlebars.HelperOptions} options
|
|
31
|
+
* @return {*} {(string | boolean)}
|
|
32
|
+
*/
|
|
33
|
+
static handleJudgmentExecute(context, bol, options) {
|
|
34
|
+
if (options.fn) {
|
|
35
|
+
return bol ? options.fn(context) : options.inverse(context);
|
|
36
|
+
}
|
|
37
|
+
// eslint-disable-next-line no-return-assign
|
|
38
|
+
return bol ? (options.hash.yes = true) : (options.hash.no = false);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 当前所有助手 tag 名称
|
|
43
|
+
*
|
|
44
|
+
* @author chitanda
|
|
45
|
+
* @date 2021-12-30 10:12:39
|
|
46
|
+
* @protected
|
|
47
|
+
* @type {string[]}
|
|
48
|
+
*/
|
|
49
|
+
HelperUtil.helperNames = [
|
|
50
|
+
'lookup',
|
|
51
|
+
'log',
|
|
52
|
+
'and',
|
|
53
|
+
'camelCase',
|
|
54
|
+
'concat',
|
|
55
|
+
'eq',
|
|
56
|
+
'gt',
|
|
57
|
+
'get',
|
|
58
|
+
'lowerCase',
|
|
59
|
+
'lt',
|
|
60
|
+
'lte',
|
|
61
|
+
'neq',
|
|
62
|
+
'not',
|
|
63
|
+
'or',
|
|
64
|
+
'pascalCase',
|
|
65
|
+
'pluralize',
|
|
66
|
+
'snakeCase',
|
|
67
|
+
'spinalCase',
|
|
68
|
+
'upperCase',
|
|
69
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/handlebars/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HelperUtil } from './helper/helper';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/utils/modal/modal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAErD,KAAK,eAAe,GAAG;IACrB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACtC,CAAC;AACF,qBAAa,KAAM,YAAW,MAAM;IAClC,IAAI,EAAE,QAAQ,CAAkB;IAEhC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,SAAS,EAAE,MAAM,CAAK;IAEtB,KAAK;;wBACkD,OAAO;;;MAE5D;gBAEU,IAAI,EAAE,eAAe;IAejC;;;;OAIG;IACH,QAAQ,SAAU,UAAU,KAAG,IAAI,CAEjC;IAEF;;;;;OAKG;IACH,aAAa,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI;IAIlD,OAAO,CAAC,IAAI,GAAE,UAAoC,GAAG,OAAO,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/utils/modal/modal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAErD,KAAK,eAAe,GAAG;IACrB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACtC,CAAC;AACF,qBAAa,KAAM,YAAW,MAAM;IAClC,IAAI,EAAE,QAAQ,CAAkB;IAEhC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,SAAS,EAAE,MAAM,CAAK;IAEtB,kBAAkB,EAAE,OAAO,CAAS;IAEpC,KAAK;;wBACkD,OAAO;;;MAE5D;gBAEU,IAAI,EAAE,eAAe;IAejC;;;;OAIG;IACH,QAAQ,SAAU,UAAU,KAAG,IAAI,CAEjC;IAEF;;;;;OAKG;IACH,aAAa,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI;IAIlD,OAAO,CAAC,IAAI,GAAE,UAAoC,GAAG,OAAO,CAAC,OAAO,CAAC;IAoB3E;;;;;OAKG;IACH,SAAS,CAAC,OAAO,IAAI,IAAI;CAI1B"}
|
package/out/utils/modal/modal.js
CHANGED
|
@@ -5,6 +5,7 @@ export class Modal {
|
|
|
5
5
|
constructor(opts) {
|
|
6
6
|
this.mode = ViewMode.EMBED;
|
|
7
7
|
this.viewUsage = 4;
|
|
8
|
+
this.ignoreDismissCheck = false;
|
|
8
9
|
this.hooks = {
|
|
9
10
|
shouldDismiss: new AsyncSeriesHook(),
|
|
10
11
|
beforeDismiss: new AsyncSeriesHook(),
|
|
@@ -41,8 +42,10 @@ export class Modal {
|
|
|
41
42
|
}
|
|
42
43
|
async dismiss(data = { ok: false, data: [] }) {
|
|
43
44
|
const context = { allowClose: true };
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
if (this.ignoreDismissCheck !== true) {
|
|
46
|
+
// 判断是否执行关闭
|
|
47
|
+
await this.hooks.shouldDismiss.call(context);
|
|
48
|
+
}
|
|
46
49
|
if (!context.allowClose) {
|
|
47
50
|
ibiz.log.debug('shouldDismiss结果为false,关闭中断。');
|
|
48
51
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "控制器包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"author": "chitanda",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@ibiz-template/core": "^0.1.
|
|
32
|
+
"@ibiz-template/core": "^0.1.14",
|
|
33
33
|
"@ibiz/model-core": "^0.0.15",
|
|
34
34
|
"@types/path-browserify": "^1.0.0",
|
|
35
35
|
"@types/qs": "^6.9.7",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"qx-util": "^0.4.8",
|
|
58
58
|
"ramda": "^0.29.0"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "7410b8ff7fb415b221b9eab24fd0e4f2ce1f16c6"
|
|
61
61
|
}
|
|
@@ -72,6 +72,7 @@ export class BaseController<
|
|
|
72
72
|
protected initState(): void {
|
|
73
73
|
this.state.isCreated = false;
|
|
74
74
|
this.state.isMounted = false;
|
|
75
|
+
this.state.isDestroyed = false;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
/**
|
|
@@ -199,6 +200,7 @@ export class BaseController<
|
|
|
199
200
|
*/
|
|
200
201
|
async destroyed(): Promise<void> {
|
|
201
202
|
await this.onDestroyed();
|
|
203
|
+
this.state.isDestroyed = true;
|
|
202
204
|
ibiz.log.debug(`${this.constructor.name}:${this.name} onDestroyed`);
|
|
203
205
|
await this._evt.emit('onDestroyed', undefined);
|
|
204
206
|
this.evt.destroy();
|
|
@@ -126,18 +126,21 @@ export class EditorController<T extends IEditor = IEditor>
|
|
|
126
126
|
data: IData,
|
|
127
127
|
context: IContext,
|
|
128
128
|
params: IParams,
|
|
129
|
-
): { context:
|
|
129
|
+
): { context: IContext; params: IParams } {
|
|
130
130
|
const { navigateContexts, navigateParams } = this
|
|
131
131
|
.model as INavigateParamContainer;
|
|
132
132
|
let selfContext = {};
|
|
133
133
|
if (navigateContexts && data) {
|
|
134
134
|
selfContext = convertNavData(navigateContexts!, context, params, data);
|
|
135
135
|
}
|
|
136
|
+
const _context = Object.assign(context.clone(), selfContext);
|
|
137
|
+
|
|
136
138
|
let selfParams = {};
|
|
137
139
|
if (navigateParams && data) {
|
|
138
140
|
selfParams = convertNavData(navigateParams!, context, params, data);
|
|
139
141
|
}
|
|
140
|
-
|
|
142
|
+
const _params: IParams = { ...params, ...selfParams };
|
|
143
|
+
return { context: _context, params: _params };
|
|
141
144
|
}
|
|
142
145
|
|
|
143
146
|
/**
|
|
@@ -35,7 +35,7 @@ export class CaptionBarController
|
|
|
35
35
|
await super.onCreated();
|
|
36
36
|
|
|
37
37
|
this.view.evt.on('onViewInfoChange', ({ caption: _caption, dataInfo }) => {
|
|
38
|
-
this.state.caption = `${this.
|
|
38
|
+
this.state.caption = `${this.view.model.caption}${
|
|
39
39
|
dataInfo ? `-${dataInfo}` : ''
|
|
40
40
|
}`;
|
|
41
41
|
});
|
|
@@ -119,8 +119,10 @@ export class FormDRUIPartController extends FormDetailController<IDEFormDRUIPart
|
|
|
119
119
|
this.isNewData = state === FormNotifyState.DRAFT;
|
|
120
120
|
this.state.showMask = this.isNewData;
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
if (state === FormNotifyState.LOAD || state === FormNotifyState.DRAFT) {
|
|
123
|
+
// 表单数据加载变更后,计算关系界面参数
|
|
124
|
+
this.calcViewParams();
|
|
125
|
+
}
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
/**
|