lex 2 vuotta sitten
vanhempi
commit
22cbaf49ca

+ 8 - 2
src/components/o-sticky/index.tsx

@@ -34,9 +34,15 @@ export default defineComponent({
       this.divStyle.bottom = '0px'
     }
 
+    // nextTick(() => {
+    //   const { height } = useRect((this as any).$refs.div)
+    //   this.sectionStyle.height = `${height}px`
+    // })
     nextTick(() => {
-      const { height } = useRect((this as any).$refs.div)
-      this.sectionStyle.height = `${height}px`
+      setTimeout(() => {
+        const { height } = useRect((this as any).$refs.div)
+        this.sectionStyle.height = `${height}px`
+      }, 100)
     })
   },
   render() {

+ 1 - 1
src/school/exercise-record/modals/student-item.module.less

@@ -1,5 +1,5 @@
 .itemWrap {
-  width: calc(100% -30px);
+  width: calc(100% - 30px);
   height: 121px;
   background: #ffffff;
   border-radius: 10px;