浏览代码

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')
     }
   })
 }