Browse Source

Update index.tsx

lex 1 year ago
parent
commit
7ac15ebc9a
1 changed files with 13 additions and 0 deletions
  1. 13 0
      src/tenant/music/train-tool/index.tsx

+ 13 - 0
src/tenant/music/train-tool/index.tsx

@@ -407,6 +407,19 @@ export default defineComponent({
                         // onSlideChange={(swiper: any) => {}}
                         onTransitionEnd={(swiper: any) => {
                           state.details = state.albumList[swiper.activeIndex]
+                          state.ensembleCounts =
+                            state.details?.ensembleCounts <= 0 ? false : true
+                          state.subjectCounts =
+                            state.details?.subjectCounts <= 0 ? false : true
+                          state.musicCounts =
+                            state.details?.musicCounts <= 0 ? false : true
+                          if (state.subjectCounts) {
+                            state.activeTab = 'SUBJECT'
+                          } else if (state.musicCounts) {
+                            state.activeTab = 'MUSIC'
+                          } else if (state.ensembleCounts) {
+                            state.activeTab = 'ENSEMBLE'
+                          }
                           params.page = 1
                           state.list = []
                           FetchList(true)