@@ -22,7 +22,6 @@ export class WizardComponent implements OnInit, AfterViewInit {
2222 if ( screenWidth > 990 ) {
2323 if ( this . tabIndex === 1 ) {
2424 moveTab . style . left = '20vw' ;
25- console . log ( '111' ) ;
2625 } else if ( this . tabIndex === 2 ) {
2726 moveTab . style . left = '41vw' ;
2827 }
@@ -34,13 +33,21 @@ export class WizardComponent implements OnInit, AfterViewInit {
3433 }
3534 }
3635 } ) ;
36+ const tabs = document . getElementsByClassName ( 'wizard-tab' ) ;
37+ for ( let i = 1 ; i < tabs . length ; i ++ ) {
38+ ( < HTMLElement > tabs [ i ] ) . style . display = 'none' ;
39+ }
3740 }
3841
3942 preOnClick ( ) {
4043 const moveTab = < HTMLElement > document . querySelector ( '.move-tab' ) ;
4144 const nextBtn = < HTMLElement > document . getElementById ( 'nextBtn' ) ;
4245 const preBtn = < HTMLElement > document . getElementById ( 'preBtn' ) ;
46+ const tabs = document . getElementsByClassName ( 'wizard-tab' ) ;
4347 const screenWidth = document . body . clientWidth ;
48+ for ( let i = 0 ; i < tabs . length ; i ++ ) {
49+ ( < HTMLElement > tabs [ i ] ) . style . display = 'none' ;
50+ }
4451 if ( this . tabIndex === 2 ) {
4552 this . tabIndex -- ;
4653 moveTab . style . left = screenWidth > 990 ? '20vw' : '30vw' ;
@@ -52,13 +59,18 @@ export class WizardComponent implements OnInit, AfterViewInit {
5259 preBtn . style . visibility = 'hidden' ;
5360 moveTab . innerHTML = 'About' ;
5461 }
62+ ( < HTMLElement > tabs [ this . tabIndex ] ) . style . display = 'inherit' ;
5563 }
5664
5765 nextOnClick ( ) {
5866 const moveTab = < HTMLElement > document . querySelector ( '.move-tab' ) ;
5967 const nextBtn = < HTMLElement > document . getElementById ( 'nextBtn' ) ;
6068 const preBtn = < HTMLElement > document . getElementById ( 'preBtn' ) ;
69+ const tabs = document . getElementsByClassName ( 'wizard-tab' ) ;
6170 const screenWidth = document . body . clientWidth ;
71+ for ( let i = 0 ; i < tabs . length ; i ++ ) {
72+ ( < HTMLElement > tabs [ i ] ) . style . display = 'none' ;
73+ }
6274 if ( this . tabIndex === 0 ) {
6375 this . tabIndex ++ ;
6476 moveTab . style . left = screenWidth > 990 ? '20vw' : '30vw' ;
@@ -70,6 +82,7 @@ export class WizardComponent implements OnInit, AfterViewInit {
7082 nextBtn . style . visibility = 'hidden' ;
7183 moveTab . innerHTML = 'Address' ;
7284 }
85+ ( < HTMLElement > tabs [ this . tabIndex ] ) . style . display = 'inherit' ;
7386 }
7487
7588}
0 commit comments