@@ -22,7 +22,6 @@ export class WizardComponent implements OnInit, AfterViewInit {
22
22
if ( screenWidth > 990 ) {
23
23
if ( this . tabIndex === 1 ) {
24
24
moveTab . style . left = '20vw' ;
25
- console . log ( '111' ) ;
26
25
} else if ( this . tabIndex === 2 ) {
27
26
moveTab . style . left = '41vw' ;
28
27
}
@@ -34,13 +33,21 @@ export class WizardComponent implements OnInit, AfterViewInit {
34
33
}
35
34
}
36
35
} ) ;
36
+ const tabs = document . getElementsByClassName ( 'wizard-tab' ) ;
37
+ for ( let i = 1 ; i < tabs . length ; i ++ ) {
38
+ ( < HTMLElement > tabs [ i ] ) . style . display = 'none' ;
39
+ }
37
40
}
38
41
39
42
preOnClick ( ) {
40
43
const moveTab = < HTMLElement > document . querySelector ( '.move-tab' ) ;
41
44
const nextBtn = < HTMLElement > document . getElementById ( 'nextBtn' ) ;
42
45
const preBtn = < HTMLElement > document . getElementById ( 'preBtn' ) ;
46
+ const tabs = document . getElementsByClassName ( 'wizard-tab' ) ;
43
47
const screenWidth = document . body . clientWidth ;
48
+ for ( let i = 0 ; i < tabs . length ; i ++ ) {
49
+ ( < HTMLElement > tabs [ i ] ) . style . display = 'none' ;
50
+ }
44
51
if ( this . tabIndex === 2 ) {
45
52
this . tabIndex -- ;
46
53
moveTab . style . left = screenWidth > 990 ? '20vw' : '30vw' ;
@@ -52,13 +59,18 @@ export class WizardComponent implements OnInit, AfterViewInit {
52
59
preBtn . style . visibility = 'hidden' ;
53
60
moveTab . innerHTML = 'About' ;
54
61
}
62
+ ( < HTMLElement > tabs [ this . tabIndex ] ) . style . display = 'inherit' ;
55
63
}
56
64
57
65
nextOnClick ( ) {
58
66
const moveTab = < HTMLElement > document . querySelector ( '.move-tab' ) ;
59
67
const nextBtn = < HTMLElement > document . getElementById ( 'nextBtn' ) ;
60
68
const preBtn = < HTMLElement > document . getElementById ( 'preBtn' ) ;
69
+ const tabs = document . getElementsByClassName ( 'wizard-tab' ) ;
61
70
const screenWidth = document . body . clientWidth ;
71
+ for ( let i = 0 ; i < tabs . length ; i ++ ) {
72
+ ( < HTMLElement > tabs [ i ] ) . style . display = 'none' ;
73
+ }
62
74
if ( this . tabIndex === 0 ) {
63
75
this . tabIndex ++ ;
64
76
moveTab . style . left = screenWidth > 990 ? '20vw' : '30vw' ;
@@ -70,6 +82,7 @@ export class WizardComponent implements OnInit, AfterViewInit {
70
82
nextBtn . style . visibility = 'hidden' ;
71
83
moveTab . innerHTML = 'Address' ;
72
84
}
85
+ ( < HTMLElement > tabs [ this . tabIndex ] ) . style . display = 'inherit' ;
73
86
}
74
87
75
88
}
0 commit comments