交办、整改责任人修改
This commit is contained in:
1
unpackage/dist/build/mp-weixin/components/hazardDetail/useHazardDetailScroll.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/components/hazardDetail/useHazardDetailScroll.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),l=require("./hazardDetail.js");exports.useHazardDetailScroll=function(t,o){const n=e.getCurrentInstance(),u=(null==n?void 0:n.proxy)||n,r=e.ref([]),a=e.ref(0),i=e.ref([0]),c=e.ref(0),s=e.ref(""),v=e.ref(""),d=e.ref(!0),f=e.ref(!1);let h=null;const g=()=>{clearTimeout(h),h=setTimeout((()=>{r.value.length&&e.nextTick$1((()=>{const l=e.index.createSelectorQuery().in(u);l.select(".content-scroll").boundingClientRect(),l.select(".content-scroll").scrollOffset(),l.selectAll(".node-section").boundingClientRect(),l.exec((e=>{const l=null==e?void 0:e[0],t=null==e?void 0:e[1],o=(null==e?void 0:e[2])||[];if(!l||!o.length)return;c.value=l.height||0;const n=(null==t?void 0:t.scrollTop)||0;i.value=o.map((e=>e.top-l.top+n))}))}))}),80)};return e.watch((()=>"function"==typeof o?o():null==o?void 0:o.value),(e=>{e||(g(),setTimeout(g,300))})),e.watch((()=>"function"==typeof t?t():null==t?void 0:t.value),(e=>{return t=e,r.value=l.generateHazardHistory(t),a.value=0,s.value="",g(),void setTimeout(g,300);var t}),{immediate:!0,deep:!0}),e.watch(a,(e=>{v.value="hazard-step-"+e,setTimeout((()=>{v.value=""}),300)})),e.watch((()=>r.value.length),(()=>g())),e.onReady((()=>{g(),setTimeout(g,300)})),{historyList:r,activeIndex:a,contentScrollIntoView:s,stepScrollIntoView:v,scrollWithAnimation:d,onContentScroll:e=>{if(f.value)return;const{scrollTop:l=0,scrollHeight:t=0}=e.detail||{};((e,l=0)=>{const t=r.value.length;if(!t)return;if(l>0&&c.value>0&&e+c.value>=l-60)return void(a.value!==t-1&&(a.value=t-1));const o=i.value;if(!o.length)return;let n=0;for(let u=o.length-1;u>=0;u--)if(e>=o[u]-80){n=u;break}n!==a.value&&(a.value=n)})(l,t),g()},onScrollToLower:()=>{const e=r.value.length;e>0&&a.value!==e-1&&(a.value=e-1)},scrollToNode:e=>{e<0||e>=r.value.length||(f.value=!0,d.value=!0,a.value=e,s.value="hazard-node-"+e,setTimeout((()=>{s.value="",f.value=!1,g()}),350))},scheduleMeasureLayout:g}};
|
||||
Reference in New Issue
Block a user