1import{d as k,r as m,y as v,z as g,A as t,F as N,C as h,D as n,E as r,G as b,H as f,I as p}from"./chunk-vue-TRwxe8i9.js";import{E as S,F as x,M as l}from"./CkuPa5Yr.js";import"./chunk-pinia-DfnRCC0j.js";import"./chunk-i18n-CEBPY5W3.js";import"./chunk-alioss-Co3x7qJ6.js";import"./chunk-fabric-NyCWrAO1.js";const C={class:"test-route-container p-8 max-w-2xl mx-auto w-full"},E={class:"mb-8 w-full"},J={class:"mb-8"},V={class:"grid grid-cols-1 sm:grid-cols-2 gap-3"},B=["onClick"],M={class:"mb-8 p-6 border rounded-lg bg-gray-50"},O={class:"flex flex-col gap-4"},T={class:"mb-8 p-6 border rounded-lg bg-gray-50"},q={class:"flex flex-col gap-4"},D={class:"p-6 border rounded-lg bg-blue-50"},F={class:"flex flex-col gap-2 font-mono text-sm"},G=k({__name:"test-route",setup(P){const a=S(),i=m("/text-to-video/test01"),u=m("TextToVideo"),d=m(""),c=[{label:"ttv test01",path:"/text-to-video/test01"},{label:"test-nano2",path:"/explore/zone/test-nano2"},{label:"é¦é¡µ",path:"/"},{label:"Manage",path:"/manage"}],y=async()=>{if(!i.value.trim()){l.error("请è¾å
¥è·¯ç±è·¯å¾");return}try{await x({path:i.value}),l.success("跳转æå")}catch(s){l.error(`跳转失败: ${s instanceof Error?s.message:"æªç¥é误"}`)}},w=async()=>{if(!u.value.trim()){l.error("请è¾å
¥è·¯ç±åç§°");return}try{const s=d.value.trim()?JSON.parse(d.value):{};await x({name:u.value,query:s}),l.success("跳转æå")}catch(s){s instanceof SyntaxError?l.error("Query åæ° JSON æ ¼å¼é误"):l.error(`跳转失败: ${s instanceof Error?s.message:"æªç¥é误"}`)}};return(s,e)=>(g(),v("div",C,[t("div",E,[e[14]||(e[14]=t("h1",{class:"text-3xl font-bold mb-6"},"è·¯ç±æµè¯å·¥å
·",-1)),t("div",J,[e[3]||(e[3]=t("h2",{class:"text-xl font-semibold mb-4"},"å¿«é跳转",-1)),t("div",V,[(g(),v(N,null,h(c,o=>t("button",{key:o.path,class:"px-4 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded transition",onClick:Q=>n(x)({path:o.path})},r(o.label),9,B)),64))])]),t("div",M,[e[5]||(e[5]=t("h2",{class:"text-xl font-semibold mb-4"},"è·¯å¾è·³è½¬",-1)),t("div",O,[t("div",null,[e[4]||(e[4]=t("label",{class:"block text-sm font-medium mb-2"},"è¾å
¥è·¯ç±è·¯å¾",-1)),b(t("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>i.value=o),type:"text",class:"w-full px-4 py-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[f,i.value]])]),t("button",{class:"px-4 py-2 bg-green-500 hover:bg-green-600 text-white rounded transition",onClick:y}," 跳转å°è·¯å¾ ")])]),t("div",T,[e[8]||(e[8]=t("h2",{class:"text-xl font-semibold mb-4"},"è·¯ç±å称跳转",-1)),t("div",q,[t("div",null,[e[6]||(e[6]=t("label",{class:"block text-sm font-medium mb-2"},"è¾å
¥è·¯ç±åç§°",-1)),b(t("input",{"onUpdate:modelValue":e[1]||(e[1]=o=>u.value=o),type:"text",placeholder:"ä¾: index, manage, test-route",class:"w-full px-4 py-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[f,u.value]])]),t("div",null,[e[7]||(e[7]=t("label",{class:"block text-sm font-medium mb-2"},"Query åæ° (JSON æ ¼å¼)",-1)),b(t("textarea",{"onUpdate:modelValue":e[2]||(e[2]=o=>d.value=o),placeholder:'{"key1": "value1", "key2": "value2"}',class:"w-full px-4 py-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500 font-mono text-sm",rows:"4"},null,512),[[f,d.value]])]),t("button",{class:"px-4 py-2 bg-purple-500 hover:bg-purple-600 text-white rounded transition",onClick:w}," 跳转 ")])]),t("div",D,[e[13]||(e[13]=t("h2",{class:"text-xl font-semibold mb-4"},"å½åè·¯ç±ä¿¡æ¯",-1)),t("div",F,[t("div",null,[e[9]||(e[9]=t("span",{class:"font-bold"},"è·¯å¾:",-1)),p(" "+r(n(a).path),1)]),t("div",null,[e[10]||(e[10]=t("span",{class:"font-bold"},"åç§°:",-1)),p(" "+r(n(a).name||"N/A"),1)]),t("div",null,[e[11]||(e[11]=t("span",{class:"font-bold"},"Query:",-1)),p(" "+r(JSON.stringify(n(a).query,null,2)),1)]),t("div",null,[e[12]||(e[12]=t("span",{class:"font-bold"},"Params:",-1)),p(" "+r(JSON.stringify(n(a).params,null,2)),1)])])])])]))}});export{G 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.