programing

다단계 양식 전환

instargram 2023. 6. 26. 21:01
반응형

다단계 양식 전환

양식의 두 페이지를 전환하기 위해 if 문을 작성하려고 합니다.두 번째 화면이 시각화되고 두 번째 ProgressBar 구성 요소 버튼을 클릭하면 "2"라는 nr이 표시됩니다.따라서 이미 두 번째 화면에 있는 경우 동일한 두 번째 화면으로 다시 리디렉션되지 않도록 if 문을 수행해야 합니다.

https://codesandbox.io/s/intelligent-jasper-teh1im?file=/src/App.vue

    nextStep() {
          if (this.stepIndex < 1) {
            this.stepIndex++;
          } else if (this.stepIndex >= 1) {
            return this.stepIndex;
          }
        },
        previousStep() {
          if (this.stepIndex <= 1) {
            this.stepIndex--;
          } else if (this.stepIndex < 1) {
            return this.stepIndex;
          }
        },

언급URL : https://stackoverflow.com/questions/75592855/multi-step-form-toggling

반응형