skyblued 2 年之前
父節點
當前提交
982064edb0
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      src/student/teacher-dependent/teacher-home.tsx

+ 5 - 4
src/student/teacher-dependent/teacher-home.tsx

@@ -44,13 +44,14 @@ export default defineComponent({
     })
     })
     useEventListener(document, 'scroll', evt => {
     useEventListener(document, 'scroll', evt => {
       const { y } = useWindowScroll()
       const { y } = useWindowScroll()
-      this.background = `rgba(255, 255, 255, ${(y.value - 40) / 100})`
-      if (y.value > 65) {
+      // this.background = `rgba(255, 255, 255, ${y.value / 100})`
+      // console.log(y.value)
+      if (y.value > 142) {
         this.headColor = '#000'
         this.headColor = '#000'
-        // this.background = '#fff'
+        this.background = '#fff'
         this.backIconColor = 'black'
         this.backIconColor = 'black'
       } else {
       } else {
-        // this.background = 'transparent'
+        this.background = 'transparent'
         this.headColor = '#fff'
         this.headColor = '#fff'
         this.backIconColor = 'white'
         this.backIconColor = 'white'
       }
       }