PageSourceSearch

https://www.ftu.org.hk/_nuxt/BVsm4mO2.js

js ftu.org.hk collected 2026-10-02 17:36:01 UTC 2,455 bytes, 1 lines download raw bytes

1import{d as b,i as h,c as x,S as k,l as c,o as d,m as a,w as _,v as T,z as M,t as S,G as y,Q as B,_ as z}from"./rNMPrltl.js";const C={class:"simple-pagination"},F=["disabled"],L={width:"20",height:"20",viewBox:"0 0 20 20"},q=["stroke"],I=["max"],E={class:"total"},N=["disabled"],O={width:"20",height:"20",viewBox:"0 0 20 20"},R=["stroke"],$=300,j=b({__name:"index",props:{currentPage:{},total:{default:1},pageSize:{default:10}},emits:["update:currentPage"],setup(o,{emit:m}){const n=o,f=m,s=h(n.currentPage),l=h(!1),r=x(()=>{if(!n.total||n.total<=0)return 1;const e=n.pageSize>0?n.pageSize:10;return Math.max(1,Math.ceil(n.total/e))});k(()=>n.currentPage,e=>{s.value=e});function v(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>e())})})}async function w(){await B(),await v();const e=document.querySelector(".page-header"),t=e?e.getBoundingClientRect().height:0,i=document.querySelector(".content-wrapper"),p=i?i.getBoundingClientRect().top+window.pageYOffset-t-10:0;try{window.scrollTo({top:Math.max(0,p),behavior:"auto"})}catch{window.scrollTo(0,Math.max(0,p))}}function u(e){const t=r.value;e<1||e>t||l.value||(l.value=!0,setTimeout(()=>l.value=!1,$),f("update:currentPage",e),w())}function g(){const e=parseInt(s.value.toString()),t=r.value;if(isNaN(e)||e<1){s.value=1,u(1);return}if(e>t){y.warning(`超出最大頁數,最大頁數為 ${t}`),s.value=t,u(t);return}e!==n.currentPage&&u(e)}function P(e){e.target.select()}return(e,t)=>(d(),c("div",C,[a("button",{class:"arrow-btn",disabled:o.currentPage===1,onClick:t[0]||(t[0]=i=>u(o.currentPage-1))},[(d(),c("svg",L,[a("path",{d:"M13 16L7 10L13 4",stroke:o.currentPage===1?"#bdbdbd":"#e60012","stroke-width":"2",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,8,q)]))],8,F),_(a("input",{"onUpdate:modelValue":t[1]||(t[1]=i=>s.value=i),class:"page-input",type:"number",min:1,max:r.value,onBlur:g,onKeyup:M(g,["enter"]),onFocus:P},null,40,I),[[T,s.value]]),t[3]||(t[3]=a("span",{class:"slash"},"/",-1)),a("span",E,S(r.value),1),t[4]||(t[4]=a("span",{class:"page-text"},"頁",-1)),a("button",{class:"arrow-btn",disabled:o.currentPage>=r.value,onClick:t[2]||(t[2]=i=>u(o.currentPage+1))},[(d(),c("svg",O,[a("path",{d:"M7 4L13 10L7 16",stroke:o.currentPage>=r.value?"#bdbdbd":"#e60012","stroke-width":"2",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,8,R)]))],8,N)]))}}),H=z(j,[["__scopeId","data-v-bf5a9855"]]);export{H as _};

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.