1 |
- !function(){var e=document.createElement("style");e.innerHTML=".van-search{padding-left:.37333rem;padding-right:.37333rem}.van-search input{-webkit-user-select:text!important;-moz-user-select:text!important;user-select:text!important}.van-search .van-search__field{background:transparent!important}._col-search_19l4u_12{--van-cell-background-color: transparent;padding-left:.34667rem;padding-right:.34667rem}._col-search_19l4u_12 .van-field__left-icon{display:flex;align-items:center}._col-search_19l4u_12 .van-field__right-icon{font-size:0;padding-right:0}._col-search_19l4u_12 .van-search__action{display:flex}._col-search_19l4u_12 .van-field__control{font-size:.34667rem}._col-search_19l4u_12 .van-field__control::-moz-placeholder{color:#aaa}._col-search_19l4u_12 .van-field__control::placeholder{color:#aaa}._col-search_19l4u_12 .van-search__content{padding-left:0}._col-search_19l4u_12 ._leftIcon_19l4u_37{font-size:.42667rem;margin-top:-.08rem}._col-search_19l4u_12._default_19l4u_41 .van-search__content{background:#f6f6f6!important}._col-search_19l4u_12._white_19l4u_44 .van-search__content{background:#fff!important}._col-search_19l4u_12._transparent_19l4u_47 .van-search__content{background:rgba(255,255,255,.16)}._col-search_19l4u_12._transparent_19l4u_47 .van-search__content input::-moz-placeholder{color:#fff}._col-search_19l4u_12._transparent_19l4u_47 .van-search__content input::placeholder{color:#fff}._col-search_19l4u_12._transparent_19l4u_47 .van-search__content input,._col-search_19l4u_12._transparent_19l4u_47 .van-search__content .van-field__clear{color:#fff}._col-search_19l4u_12 ._searchBtn_19l4u_59{width:1.49333rem;height:.74667rem;padding:0;font-size:.37333rem;--van-button-mini-height: .74667rem;--van-font-size-xs: .37333rem}\n",document.head.appendChild(e),System.register(["./index-legacy.eb062188.js","./index-legacy.3a3e070a.js"],(function(e){"use strict";var a,t,l,n,c,o,r,s,i,u,m,d,Z,h,A,_,f,p;return{setters:[function(e){a=e.t,t=e.N,l=e.u,n=e.v,c=e.d,o=e.Q,r=e.R,s=e.W,i=e.c,u=e.am,m=e.E,d=e.a4,Z=e.D,h=e.a5,A=e.B,_=e.q},function(e){f=e.f,p=e.F}],execute:function(){const[g,k,b]=a("search"),v=t({},f,{label:String,shape:l("square"),leftIcon:l("search"),clearable:n,actionText:String,background:String,showAction:Boolean});var B=c({name:g,props:v,emits:["blur","focus","clear","search","cancel","clickInput","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:a,slots:l,attrs:n}){const c=o(),Z=r(),h=()=>{l.action||(a("update:modelValue",""),a("cancel"))},A=t=>{13===t.keyCode&&(d(t),a("search",e.modelValue))},_=()=>e.id||`${c}-input`,g=()=>{if(l.label||e.label)return i("label",{class:k("label"),for:_()},[l.label?l.label():e.label])},v=()=>{if(e.showAction){const a=e.actionText||b("cancel");return i("div",{class:k("action"),role:"button",tabindex:0,onClick:h},[l.action?l.action():a])}},B=e=>a("blur",e),y=e=>a("focus",e),S=e=>a("clear",e),W=e=>a("clickInput",e),L=e=>a("clickLeftIcon",e),q=e=>a("clickRightIcon",e),C=Object.keys(f),V=()=>{const c=t({},n,u(e,C),{id:_()});return i(p,m({ref:Z,type:"search",class:k("field"),border:!1,onBlur:B,onFocus:y,onClear:S,onKeypress:A,onClickInput:W,onClickLeftIcon:L,onClickRightIcon:q,"onUpdate:modelValue":e=>a("update:modelValue",e)},c),u(l,["left-icon","right-icon"]))};return s({focus:()=>{var e;return null==(e=Z.value)?void 0:e.focus()},blur:()=>{var e;return null==(e=Z.value)?void 0:e.blur()}}),()=>{var a;return i("div",{class:k({"show-action":e.showAction}),style:{background:e.background}},[null==(a=l.left)?void 0:a.call(l),i("div",{class:k("content",e.shape)},[g(),V()]),v()])}}});const y=Z(B);var S={"col-search":"_col-search_19l4u_12",leftIcon:"_leftIcon_19l4u_37",default:"_default_19l4u_41",white:"_white_19l4u_44",transparent:"_transparent_19l4u_47",searchBtn:"_searchBtn_19l4u_59"};e("O",c({name:"ColSearch",props:{modelValue:{type:String,default:""},showAction:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},placeholder:{type:String,default:"请输入搜索关键词"},background:{type:String,default:"#fff"},inputBackground:{type:String,default:"default"},onSearch:{type:Function,default:e=>{}},onFilter:{type:Function,default:()=>{}},filterDot:{type:Boolean,default:!1},leftIcon:{type:String,default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABEtJREFUWEe9l2toXFUQx39zE2LB2tQHJfZDfUsrSFW0GI0PEC2ilSZl925rRLFVoWg1pSLWuHs2rVURqjSgYolQg2HvpprWBxbqBysEHxi1ii3YqiiKEhXpB5u2yd6R+9jNTXY3u0kW99NyzpyZ3/mfOXPmCtP46Rb7InIsBRaBzgXrBLh/YFnf4S4+KMa403Dnm0qlBWpiTVC3AXQ1cH5Ze+EfVAYg1y2m/+tKfvPzZQHUxLwdPg5sBOZW6xBwQfqotzqls+/nSutKAqhpvxgdfQdhyUQHehwYBPkFZBh0PrAQtBlkwQRb5RgWqyXlfDAVRBGAdiVuwNU9wFmRhUOIPMMZuX2ysX9kskM1xsI61IzLY8AqkLzfHEKHpJzuchATAPydM/pZIbjyL8J6jNMroJXk9ObV2NcCbwIXhvYuonFJZd8qtb4A4J+5Wp+Py66/gq6YTkLlA+i21rM51fA2cKM/5m2kzm2WZP+3kyEiAHYaSBYWiNsyk+AFiCdijcyxPols6ICY7M0lAYKrZh2JZPu9Ypw3qpF8Khs19qWg34CcFlx6uVNSmfeja3wF1CS2gT4ZTgxhnGuqPfNKkGoS20E7AgAGJeW0lACwfyoUGZE2SWUGKjmudl5N6wJo+A2o97Ohvu6CaH2QsLweDRzqcebpOaWuWrUBS9mpiX8EclMwJ2vFZF7P24kauw0Ir4juF5O9bTbBSgKk7adQtoab3CEm++g4QDLegSXbw4EeMc662gMk7kE1n9R7xDitEQXinSBbQnmeFZPZXHuA+HJU9oV+PxTj3BoBSGwCfSEceEWMs772AAkb1Uzo9z0xzoqoAu0gveHAXjHOytoDxDvQ8JhFdkoq8+A4QFfiSlz9MkyQYbjs3Jk0FlNBa9rejXqPlP/rEOO8FFHAWMjhv1DO9ActbZFkdrBWKqi5bw6M/FmospZcJcnMVwUA74+aRA/o/aEKu8VkY7UDsB8G8s/xUTHOJVHfYSmOXQHWkLd/UAW5Tozz6Wwh1Nw9D0aPFJoVYcPk3iDyGiZ6QdvDoD/ScGqZbB74e6YQqghp23uSg6QWfqCpcYk89NpokQL+MWxdcx6juYMIjaHBx4y4d8nz/cemC+EH77JfRMlXPAVtE5P1Oq0Jv4kdUdq+HeVdoM63Ug4jrBTjfF8tRCD72K7CzoOFX5BylokUd1XFPWHafgTFuyZWmJQnwXoZTj4nZmC4HEiY7etAny5qUP0jkB6SmQcmQ5TuitPxVbiyC+H0SMAx0EFE9gddsTtMTudTJwtx5XqE5ZPad6+H9BL76oKPEhDlvwu6YpfjSvf4M1rtIYQJp7qJVHYvXYmdqK4tB1H5yyiduANV74FqruJL6ijCDpoaX81ne5CQ5SEqAuTJ/Vsy5t4C7lKQRaHcJxD5HdVDWHIgWuGiek0JMQ1hZ2VaGoL2qhWYVfRwcRGE/M8AfmkJitQanynp9P0Hjfiwkos1FzsAAAAASUVORK5CYII="}},emits:["click"],watch:{modelValue(){this.search=this.modelValue}},data(){return{search:this.modelValue||""}},render(){return i("div",null,[i(y,{class:[S["col-search"],S[this.inputBackground]],modelValue:this.search,"onUpdate:modelValue":e=>this.search=e,background:this.background,showAction:this.showAction,shape:"round",placeholder:this.placeholder,disabled:this.disabled,autofocus:this.autofocus,onSearch:e=>{this.onSearch(e)},onClear:()=>{this.search="",this.onSearch()},onClick:()=>this.$emit("click")},{left:()=>this.$slots.left&&this.$slots.left(),"left-icon":()=>i(h,{name:this.leftIcon,class:S.leftIcon},null),"right-icon":()=>i(A,{class:S.searchBtn,round:!0,type:"primary",size:"mini",onClick:()=>{this.onSearch(this.search)}},{default:()=>[_("搜索")]}),action:()=>i(h,{name:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAMAAACfWMssAAAAAXNSR0IArs4c6QAAAWtQTFRFAAAAAAAAAIC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