PageSourceSearch

https://www.mechrevo.com/en/_nuxt/BfXh6QPZ.js

js mechrevo.com collected 2026-10-02 11:06:03 UTC 2,612 bytes, 1 lines download raw bytes

1import{_ as h}from"./CbBh4sUL.js";import{c as w}from"./C13c8upd.js";import{_ as x}from"./DlAUqK2U.js";import{i as B,P,o as l,c as g,a as f,g as p,w as i,d,t as b,k,f as m,b as _,G as I,C as L,x as u,H as C}from"./CBVuVATE.js";const V={class:"nav-container"},T={class:"nav-links"},q=["href"],E={__name:"ProductNav",props:{displayProduct:{type:Object,default:null},productName:{type:String,required:!0},productId:{type:String,required:!0},buyLink:{type:String,default:""},transparent:{type:Boolean,default:!1},overlay:{type:Boolean,default:!1},enableSticky:{type:Boolean,default:!1}},setup(e){const a=e,v=u(!1),S=async()=>{try{const o=await w.getContentList({limit:1,q:{category_uid_is:"product-video",display_product_id_is:a.productId}});v.value=o?.objects?.length>0}catch(o){console.error("检查产品视频失败:",o),v.value=!1}},s=u(null),n=u(!1),r=u(0),N=C(()=>a.overlay&&!n.value?{position:"absolute",top:"60px",left:0,right:0,zIndex:2}:{}),y=()=>{if(!a.enableSticky||!s.value)return;const o=window.pageYOffset||document.documentElement.scrollTop;if(a.overlay){const t=o>60;n.value!==t&&console.log("Sticky state changed:",t,"scrollTop:",o),n.value=t}else{if(r.value===0&&s.value){const t=s.value.getBoundingClientRect();r.value=t.top+o,console.log("Nav initial position:",r.value)}n.value=o>=r.value}};return B(()=>{console.log("ProductNav mounted, enableSticky:",a.enableSticky,"overlay:",a.overlay),S(),a.enableSticky&&(console.log("Adding scroll listener"),window.addEventListener("scroll",y,{passive:!0}),requestAnimationFrame(()=>{y()}))}),P(()=>{a.enableSticky&&(console.log("Removing scroll listener"),window.removeEventListener("scroll",y))}),(o,t)=>{const c=h;return l(),g("div",null,[f("div",{ref_key:"navRef",ref:s,class:L(["product-nav",{transparent:e.transparent,overlay:e.overlay,sticky:e.enableSticky&&m(n)}]),style:I(m(N))},[f("div",V,[f("div",T,[e.displayProduct&&e.displayProduct.has_detail_page?(l(),p(c,{key:0,to:`/products/${e.productId}`,class:"nav-link flex-1"},{default:i(()=>[d(b(e.productName),1)]),_:1},8,["to"])):(l(),p(c,{key:1,to:"",class:"nav-link flex-1"},{default:i(()=>[d(b(e.productName),1)]),_:1})),k("",!0),m(v)?(l(),p(c,{key:3,to:`/products/${e.productId}/videos`,class:"nav-link"},{default:i(()=>[...t[1]||(t[1]=[d(" 视频 ",-1)])]),_:1},8,["to"])):k("",!0),_(c,{to:`/products/${e.productId}/downloads`,class:"nav-link"},{default:i(()=>[...t[2]||(t[2]=[d(" Downloads ",-1)])]),_:1},8,["to"]),e.buyLink?(l(),g("a",{key:4,href:e.buyLink,target:"_blank",class:"buy-btn"}," Buy Now ",8,q)):k("",!0)])])],6)])}}},j=x(E,[["__scopeId","data-v-74956012"]]);export{j as P};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.