var e=(e,l,a)=>new Promise((t,r)=>{var s=e=>{try{u(a.next(e))}catch(l){r(l)}},o=e=>{try{u(a.throw(e))}catch(l){r(l)}},u=e=>e.done?t(e.value):Promise.resolve(e.value).then(s,o);u((a=a.apply(e,l)).next())});import{_ as l}from"./index-B5zmPfFG.js";import{q as a,r as t,c as r,R as s,D as o,v as u,u as n,h as p}from"./vendor-core-Di0OO4oJ.js";const i=a({__name:"user-search",props:{modelValue:{}},emits:["update:modelValue","search","reset"],setup(a,{emit:i}){const c=a,m=i,d=t(),v=r({get:()=>c.modelValue,set:e=>m("update:modelValue",e)}),h={},y=t([]);s(()=>e(null,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=r(()=>[{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(){m("reset")}function V(){return e(this,null,function*(){yield d.value.validate(),m("search",v.value)})}return(e,a)=>{const t=l;return u(),o(t,{ref_key:"searchBarRef",ref:d,modelValue:n(v),"onUpdate:modelValue":a[0]||(a[0]=e=>p(v)?v.value=e:null),items:n(b),rules:h,onReset:f,onSearch:V},null,8,["modelValue","items"])}}});export{i as _};
