@dev-tcloud/tcloud-ui 0.0.71 → 0.0.72
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/esm2020/lib/_modules/tcloud-ui-modal/components/tcloud-ui-modal-footer/tcloud-ui-modal-footer.component.mjs +2 -1
- package/esm2020/lib/_modules/tcloud-ui-modal/services/tcloud-modal.service.mjs +15 -1
- package/esm2020/lib/_modules/tcloud-ui-modal/tcloud-ui-modal.component.mjs +5 -16
- package/fesm2015/dev-tcloud-tcloud-ui.mjs +19 -15
- package/fesm2015/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/fesm2020/dev-tcloud-tcloud-ui.mjs +19 -15
- package/fesm2020/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/lib/_modules/tcloud-ui-modal/services/tcloud-modal.service.d.ts +1 -0
- package/lib/_modules/tcloud-ui-modal/tcloud-ui-modal.component.d.ts +0 -1
- package/package.json +1 -1
|
@@ -489,6 +489,9 @@ class TcloudModalService {
|
|
|
489
489
|
this.stateLoading$ = this._stateLoading.asObservable();
|
|
490
490
|
}
|
|
491
491
|
toModal(action) {
|
|
492
|
+
if (action === 'close') {
|
|
493
|
+
this.fixed_body('off');
|
|
494
|
+
}
|
|
492
495
|
this._stateClose.next((action === 'open'));
|
|
493
496
|
}
|
|
494
497
|
toRespConfirm(resp) {
|
|
@@ -508,6 +511,17 @@ class TcloudModalService {
|
|
|
508
511
|
this.loading = loading;
|
|
509
512
|
this._stateLoading.next(loading);
|
|
510
513
|
}
|
|
514
|
+
fixed_body(fixed) {
|
|
515
|
+
let body = document.getElementsByTagName("BODY")[0];
|
|
516
|
+
if (body && body.style) {
|
|
517
|
+
if (fixed === 'on') {
|
|
518
|
+
body.style.overflowY = "hidden";
|
|
519
|
+
}
|
|
520
|
+
if (fixed === 'off') {
|
|
521
|
+
body.style.removeProperty('overflow-y');
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
511
525
|
}
|
|
512
526
|
TcloudModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
513
527
|
TcloudModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudModalService });
|
|
@@ -590,7 +604,7 @@ class TCloudUiModalComponent {
|
|
|
590
604
|
this.control_open = open;
|
|
591
605
|
this.checkIsOpen();
|
|
592
606
|
this._open = open;
|
|
593
|
-
this.fixed_body((open) ? 'on' : 'off');
|
|
607
|
+
this.tcloudModalService.fixed_body((open) ? 'on' : 'off');
|
|
594
608
|
}
|
|
595
609
|
get open() { return this._open; }
|
|
596
610
|
/**
|
|
@@ -633,25 +647,14 @@ class TCloudUiModalComponent {
|
|
|
633
647
|
}
|
|
634
648
|
action = (action) ? action : 'close';
|
|
635
649
|
this.toAction.emit(action);
|
|
636
|
-
this.fixed_body('off');
|
|
650
|
+
this.tcloudModalService.fixed_body('off');
|
|
637
651
|
}
|
|
638
652
|
checkIsOpen() {
|
|
639
653
|
if (this.control_open) {
|
|
640
|
-
this.fixed_body('on');
|
|
654
|
+
this.tcloudModalService.fixed_body('on');
|
|
641
655
|
}
|
|
642
656
|
else {
|
|
643
|
-
this.fixed_body('off');
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
fixed_body(fixed) {
|
|
647
|
-
let body = document.getElementsByTagName("BODY")[0];
|
|
648
|
-
if (body && body.style) {
|
|
649
|
-
if (fixed === 'on') {
|
|
650
|
-
body.style.overflowY = "hidden";
|
|
651
|
-
}
|
|
652
|
-
if (fixed === 'off') {
|
|
653
|
-
body.style.removeProperty('overflow-y');
|
|
654
|
-
}
|
|
657
|
+
this.tcloudModalService.fixed_body('off');
|
|
655
658
|
}
|
|
656
659
|
}
|
|
657
660
|
ngOnDestroy() {
|
|
@@ -780,6 +783,7 @@ class TCloudUiModalFooterComponent {
|
|
|
780
783
|
this.subscription = this.tcloudModalService.stateLoading$.subscribe((loading) => { this.loading = loading; });
|
|
781
784
|
}
|
|
782
785
|
ngOnDestroy() {
|
|
786
|
+
this.tcloudModalService.fixed_body('off');
|
|
783
787
|
if (this.subscription) {
|
|
784
788
|
this.subscription.unsubscribe();
|
|
785
789
|
}
|