import{d as _,M as x,O as b,a4 as a,Y as o,u as t,ak as B,W as C,_ as r,ab as c,$ as d,n as V}from"./vue-BQyCGvUQ.js";import{m as g,e as k,d as i,l as I}from"./element-plus-DXXGg0hD.js";import{_ as T}from"./index-design-C8wrC2s6.js";const v={class:"gx-search-bar"},y=_({name:"GxSearchBar",__name:"GxSearchBar",props:{modelValue:{default:""},placeholder:{default:"请输入关键字"},searchButtonText:{default:"查询"},clearButtonText:{default:"清空"}},emits:["update:modelValue","search","clear"],setup(l,{emit:m}){const e=m;function p(s){e("update:modelValue",s)}function n(){V(()=>{e("search")})}function h(){e("update:modelValue",""),e("clear"),n()}function f(){e("update:modelValue",""),n()}return(s,u)=>(b(),x("div",v,[a(t(I),{class:"gx-search-bar__form","label-width":"auto",inline:!0,onSubmit:u[0]||(u[0]=r(()=>{},["prevent"]))},{default:o(()=>[a(t(g),{class:"!mb-0 !mr-2"},{default:o(()=>[a(t(k),{class:C(["gx-search-bar__input"]),"model-value":l.modelValue,placeholder:l.placeholder,clearable:"",onInput:p,onKeyup:B(n,["enter"]),onClear:f},null,8,["model-value","placeholder"])]),_:1}),a(t(i),{type:"primary",bg:"",onClick:r(n,["stop"])},{default:o(()=>[c(d(l.searchButtonText),1)]),_:1}),a(t(i),{plain:"",onClick:r(h,["stop"])},{default:o(()=>[c(d(l.clearButtonText),1)]),_:1})]),_:1})]))}}),F=T(y,[["__scopeId","data-v-e8aae7a2"]]);export{F as _};
