var e=(e,l,a)=>new Promise((t,s)=>{var r=e=>{try{u(a.next(e))}catch(l){s(l)}},o=e=>{try{u(a.throw(e))}catch(l){s(l)}},u=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,o);u((a=a.apply(e,l)).next())});import{_ as l}from"./index-C4Je2wdo.js";import{d as a,a as t,c as s,o as r,y as o,f as u,u as n,I as p}from"./index-ip5gDR6L.js";const i=a({__name:"user-search",props:{modelValue:{}},emits:["update:modelValue","search","reset"],setup(a,{emit:i}){const c=a,d=i,m=t(),h=s({get:()=>c.modelValue,set:e=>d("update:modelValue",e)}),v={},y=t([]);r(()=>e(this,null,function*(){y.value=yield new Promise(e=>{setTimeout(()=>{e([{label:"在线",value:"1"},{label:"离线",value:"2"},{label:"异常",value:"3"},{label:"注销",value:"4"}])},1e3)})}));const b=s(()=>[{label:"用户名",key:"userName",type:"input",placeholder:"请输入用户名",clearable:!0},{label:"手机号",key:"userPhone",type:"input",props:{placeholder:"请输入手机号",maxlength:"11"}},{label:"邮箱",key:"userEmail",type:"input",props:{placeholder:"请输入邮箱"}},{label:"状态",key:"status",type:"select",props:{placeholder:"请选择状态",options:y.value}},{label:"性别",key:"userGender",type:"radiogroup",props:{options:[{label:"男",value:"1"},{label:"女",value:"2"}]}}]);function f(){d("reset")}function V(){return e(this,null,function*(){yield m.value.validate(),d("search",h.value)})}return(e,a)=>{const t=l;return u(),o(t,{ref_key:"searchBarRef",ref:m,modelValue:n(h),"onUpdate:modelValue":a[0]||(a[0]=e=>p(h)?h.value=e:null),items:n(b),rules:v,onReset:f,onSearch:V},null,8,["modelValue","items"])}}});export{i as _};
