wenbobowen 4 gadi atpakaļ
vecāks
revīzija
854466f2c3
1 mainītis faili ar 10 papildinājumiem un 8 dzēšanām
  1. 10 8
      src/views/projectManage/publishTask/index.vue

+ 10 - 8
src/views/projectManage/publishTask/index.vue

@@ -72,7 +72,7 @@
         </div>
         <actionDynamic :comments="commentlist" :change-record="changeRecordList" @addComment="createCommentHandle" />
       </section>
-      <div v-if="!showEmpty && showStep" class="step">
+      <div v-if="!showEmpty" id="stepWrap" class="step">
         <step :data="data.templates" :type-list="data.templates" @goto="scrollToHandle" />
       </div>
     </div>
@@ -140,7 +140,6 @@ export default {
       description: '<p style="color:red;">123</p>',
       edit: false, // 是否是编辑状态
       showEmpty: true,
-      showStep: true,
       openEdit: true,
       data: {},
       temList: [],
@@ -163,14 +162,17 @@ export default {
   methods: {
     // 监听滚动条
     handleScroll() {
-      const fullHeight = document.getElementsByClassName('main-wrapper')[0].scrollHeight
-      const top = document.getElementsByClassName('main-wrapper')[0].scrollTop
-      console.log(fullHeight, top, fullHeight - top)
+      const containerWrap = document.getElementsByClassName('main-wrapper')[0]
+      const stepWrap = document.getElementById('stepWrap')
+      const fullHeight = containerWrap.scrollHeight
+      const top = containerWrap.scrollTop
       if (fullHeight - top <= 1000) {
-        this.showStep = false
+        stepWrap.style.bottom = '450px'
+        stepWrap.style.top = 'auto'
       } else {
-        if (!this.showStep) {
-          this.showStep = true
+        if (stepWrap.style.bottom === '450px') {
+          stepWrap.style.bottom = 'auto'
+          stepWrap.style.top = '150px'
         }
       }
     },