PageSourceSearch

https://cdn-static.gitcode.com/_nuxt-gitcode-ssr/CezRw4yT.js

js gitcode.com collected 2026-10-02 02:42:49 UTC 781 bytes, 1 lines download raw bytes

1import{w as c,J as h,K as w,L as C,r as s}from"./Bru-Yob-.js";function y({fetchPage:r,pageSize:p=100,immediate:g=!0,debounceMs:i=600}){const n=s(""),a=s(!1),o=s([]),e=C({total:0,pageIndex:1,pageSize:p,pageCount:0}),t=async()=>{if(!a.value){a.value=!0;try{const u=await r({search:n.value,page:e.pageIndex,per_page:e.pageSize});if(a.value=!1,!u)return;const{list:l=[],total:x=0,pageCount:I=0}=u;e.pageIndex===1?o.value=l:o.value=o.value.slice(0).concat(l),e.total=x,e.pageCount=I}catch{a.value=!1}}},d=()=>{e.pageIndex<e.pageCount&&!a.value&&e.pageIndex++},f=()=>{e.pageIndex=1,t()},v=()=>{n.value=""};return c(n,h(()=>{e.pageIndex=1,t()},i)),c(()=>e.pageIndex,()=>t()),g&&w(()=>t()),{key:n,loading:a,optionList:o,pager:e,onTouchBottom:d,reload:f,clear:v,runFetch:t}}export{y as u};

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.