소스 검색

fix: 清除上一次跟练状态

TIANYONG 1 년 전
부모
커밋
cece393259
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      src/subpages/colexiu/popups/follow/index.tsx

+ 5 - 3
src/subpages/colexiu/popups/follow/index.tsx

@@ -81,9 +81,11 @@ const onClear = () => {
   detailState.times.forEach((item) => {
     const note: HTMLElement = document.querySelector(`div[data-vf=vf${item.id}]`)!
     if (note) {
-      note.classList.remove('follow-error')
-      note.classList.remove('follow-success')
-      // note.classList.add('follow-error')
+      note.classList.remove('follow-up', 'follow-down', 'follow-error', 'follow-success')
+    }
+    const _note: HTMLElement = document.getElementById(`vf-${item.id}`)!
+    if (_note) {
+      _note.classList.remove('follow-up', 'follow-down')
     }
   })
 }