import{w}from"./index.c2385adf.js";import{b as k}from"./index.ff1c8ac7.js";import{_ as K,a as i,r as _,I as C,b as r,M as S,N as T,o as x,c as V,f as t,K as N,t as R,d as a,e as c,J as B,T as D,H as I,j as M,U as z}from"./index.699f1124.js";const Q={class:"searchContainer"},U={class:"wrap"},$={class:"conter1000"},j={class:"tit"},E=I("\u641C\u7D22"),F={class:"conter1000"},H={__name:"searchContainer",props:{title:{type:String,required:!0},bannerKey:{required:!0,type:String,default:""}},setup(l,{emit:y}){const p=l,o=M(),s=i(!0),e=_({currentKeyword:"",queryType:o.query.queryType}),m=_({queryType:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u641C\u7D22\u7C7B\u578B"}],keyword:[{required:!0,trigger:"blur",message:"\u8BF7\u9009\u62E9\u641C\u7D22\u5173\u952E\u8BCD"}]}),f=i();async function d(){z.replace({path:o.path,query:{...o.query,keyword:e.currentKeyword,queryType:e.queryType}}),y("handleQuery",e)}return C(()=>{e.currentKeyword=o.query.keyword,d(),k({locals:p.bannerKey}).then(n=>{e.banner=n.data[0].images,s.value=!1}).catch(()=>{s.value=!1})}),(n,u)=>{r("el-option"),r("el-select"),r("el-form-item");const h=r("el-button"),v=r("el-input"),g=r("el-form"),b=S("loading");return T((x(),V("div",Q,[t("div",U,[t("div",{class:"banner",style:N([{height:"394px","background-size":"cover","background-color":"#ccc"},{backgroundImage:e.banner?`url(${e.banner})`:""}])},[t("div",$,[t("div",j,R(l.title),1),a(g,{model:e,rules:m,ref_key:"queryRef",ref:f},{default:c(()=>[a(v,{modelValue:e.currentKeyword,"onUpdate:modelValue":u[1]||(u[1]=q=>e.currentKeyword=q),modelModifiers:{trim:!0},placeholder:"\u8BF7\u8F93\u5165\u68C0\u7D22\u8BCD"},B({append:c(()=>[a(h,{disabled:!e.currentKeyword,icon:"Search",onClick:d},{default:c(()=>[E]),_:1},8,["disabled"])]),_:2},[void 0]),1032,["modelValue"])]),_:1},8,["model","rules"])])],4),t("div",F,[D(n.$slots,"default",{},void 0,!0)])]),a(w)])),[[b,s.value]])}}};var L=K(H,[["__scopeId","data-v-54ccf8e0"]]);export{L as s};
