PageSourceSearch

https://ssr-file.dianshudata.com/web/_nuxt/fFij9moB.js

js dianshudata.com collected 2026-10-03 20:07:44 UTC 2,012 bytes, 1 lines download raw bytes

1import x from"./JgZAhckq.js";import{g as b,k as u,c as r,F as i,w as c,G as l,ap as d,b as v,Q as D,S as w,a as p,by as C,P as h,t as j,aj as L,d as T,o as s,ac as f,_ as B}from"./D1TL4jPd.js";const E={key:0},q={class:"copy-box"},N={class:"code-container"},R={key:1,class:"no-data"},S={key:1},V=b({__name:"RequestExampleTab",props:{apiDataDetail:{}},setup(g){const o=g,n=u(()=>{if(!o.apiDataDetail)return[];const e=o.apiDataDetail.exampleCodeList||[],t=Array.isArray(e)?e.filter(a=>a==null?void 0:a.language):[];return t.length?t.map(a=>({language:a.language,example:a.example})):o.apiDataDetail.javaRequestExample?[{language:"java",example:o.apiDataDetail.javaRequestExample}]:[]}),y=u(()=>{var t;return n.value.map(a=>a.language.toLowerCase()).includes("java")?"java":((t=n.value[0])==null?void 0:t.language)??"java"}),_=e=>{const t={java:"Java",javascript:"JavaScript"},a=e==null?void 0:e.toLowerCase();return t[a]||e||"示例"},m=async e=>{if(!e){f.warning("暂无可复制内容");return}if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function")try{await navigator.clipboard.writeText(e),f.success("复制成功");return}catch(t){console.error("复制失败, 请重试",t)}},k=()=>{window.location.href="https://file.dianshudata.com/sdk/api-sdk.zip"};return(e,t)=>e.apiDataDetail?(s(),r("div",E,[n.value.length?(s(),i(l(d),{key:0,"default-active-key":y.value,class:"custom-tabs"},{default:c(()=>[(s(!0),r(D,null,w(n.value,a=>(s(),i(l(d).TabPane,{key:a.language,tab:_(a.language)},{default:c(()=>[p("div",q,[v(l(C),{onClick:A=>m(a.example)},null,8,["onClick"])]),p("div",N,[p("pre",null,j(a.example||"暂无示例"),1),a.language.toLowerCase()==="java"?(s(),i(l(L),{key:0,type:"primary",class:"float-btn",onClick:k},{default:c(()=>t[0]||(t[0]=[T(" sdk下载 ")])),_:1})):h("",!0)])]),_:2},1032,["tab"]))),128))]),_:1},8,["default-active-key"])):(s(),r("div",R,"暂无示例"))])):(s(),r("div",S,[v(x)]))}}),K=B(V,[["__scopeId","data-v-04da168e"]]);export{K as default};

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.