1 |
- !function(){function e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,a,c,o,l=[],s=!0,u=!1;try{if(c=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;s=!1}else for(;!(s=(r=c.call(t)).done)&&(l.push(r.value),l.length!==n);s=!0);}catch(i){u=!0,a=i}finally{try{if(!s&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}System.register(["./index-legacy-ce25a501.js","./index-legacy-46c61774.js"],(function(n,t){"use strict";var r,a,c,o,l,s,u,i,f,d,h,_,p,m,A,g,b,v,y,q,k=document.createElement("style");return k.textContent="._m-search_q4sn4_1{--van-cell-background-color: transparent}._m-search_q4sn4_1 input::-moz-placeholder{color:var(--k-gray-4)}._m-search_q4sn4_1 input::placeholder{color:var(--k-gray-4)}._m-search_q4sn4_1 .van-field__control{-webkit-user-select:text!important;-moz-user-select:text!important;user-select:text!important;font-size:.34667rem}._m-search_q4sn4_1 .van-search__field{background:transparent!important;padding:0 var(--van-padding-xs) 0 0}._m-search_q4sn4_1 .van-field__right-icon{display:flex;align-items:center;justify-content:center;padding-right:.10667rem}._m-search_q4sn4_1._default_q4sn4_22 .van-search__content{background:#f8f9fc!important}._m-search_q4sn4_1._white_q4sn4_25 .van-search__content{background:#fff!important}._m-search_q4sn4_1._transparent_q4sn4_28 .van-search__content{background:rgba(255,255,255,.16)}._m-search_q4sn4_1._transparent_q4sn4_28 .van-search__content input::-moz-placeholder{color:#fff}._m-search_q4sn4_1._transparent_q4sn4_28 .van-search__content input::placeholder{color:#fff}._m-search_q4sn4_1._transparent_q4sn4_28 .van-search__content input,._m-search_q4sn4_1._transparent_q4sn4_28 .van-search__content .van-field__clear{color:#fff}._m-search_q4sn4_1 ._searchBtn_q4sn4_40{width:1.49333rem;height:.72rem;padding:0;font-size:.37333rem;font-weight:500;--van-button-mini-height: .74667rem;--van-font-size-xs: .37333rem}\n",document.head.appendChild(k),{setters:[function(e){r=e.f,a=e.F},function(e){c=e.j,o=e.A,l=e.n,s=e.v,u=e.d,i=e.aJ,f=e.i,d=e.g,h=e.p,_=e.m,p=e.an,m=e.aj,A=e.D,g=e.O,b=e.w,v=e.I,y=e.B,q=e.h}],execute:function(){var t=e(c("search"),3),k=t[0],B=t[1],S=t[2],I=o({},r,{label:String,shape:l("square"),leftIcon:l("search"),clearable:s,actionText:String,background:String,showAction:Boolean}),x=u({name:k,props:I,emits:["blur","focus","clear","search","cancel","clickInput","clickLeftIcon","clickRightIcon","update:modelValue"],setup:function(e,n){var t=n.emit,c=n.slots,l=n.attrs,s=i(),u=f(),A=function(){c.action||(t("update:modelValue",""),t("cancel"))},g=function(n){13===n.keyCode&&(m(n),t("search",e.modelValue))},b=function(){return e.id||"".concat(s,"-input")},v=function(){if(c.label||e.label)return d("label",{class:B("label"),for:b()},[c.label?c.label():e.label])},y=function(){if(e.showAction){var n=e.actionText||S("cancel");return d("div",{class:B("action"),role:"button",tabindex:0,onClick:A},[c.action?c.action():n])}},q=function(e){return t("blur",e)},k=function(e){return t("focus",e)},I=function(e){return t("clear",e)},x=function(e){return t("clickInput",e)},C=function(e){return t("clickLeftIcon",e)},w=function(e){return t("clickRightIcon",e)},z=Object.keys(r);return p({focus:function(){var e;return null==(e=u.value)?void 0:e.focus()},blur:function(){var e;return null==(e=u.value)?void 0:e.blur()}}),function(){var n,r;return d("div",{class:B({"show-action":e.showAction}),style:{background:e.background}},[null==(n=c.left)?void 0:n.call(c),d("div",{class:B("content",e.shape)},[v(),(r=o({},l,h(e,z),{id:b()}),d(a,_({ref:u,type:"search",class:B("field"),border:!1,onBlur:q,onFocus:k,onClear:I,onKeypress:g,onClickInput:x,onClickLeftIcon:C,onClickRightIcon:w,"onUpdate:modelValue":function(e){return t("update:modelValue",e)}},r),h(c,["left-icon","right-icon"])))]),y()])}}}),C=A(x),w={"m-search":"_m-search_q4sn4_1",default:"_default_q4sn4_22",white:"_white_q4sn4_25",transparent:"_transparent_q4sn4_28",searchBtn:"_searchBtn_q4sn4_40"};n("M",u({name:"m-search",props:{modelValue:{type:String,default:""},shape:{type:String,default:"round"},disabled:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},placeholder:{type:String,default:"请输入搜索关键词"},background:{type:String,default:"#fff"},inputBackground:{type:String,default:"default"}},emits:["search"],setup:function(e,n){var t=n.slots,r=n.emit,a=g({search:e.modelValue||""});return b((function(){return e.modelValue}),(function(){a.search=e.modelValue})),function(){return d(C,{class:[w["m-search"],w[e.inputBackground]],shape:e.shape,background:e.background,placeholder:e.placeholder,disabled:e.disabled,autofocus:e.autofocus,autocomplete:"off",modelValue:a.search,"onUpdate:modelValue":function(e){return a.search=e},clearTrigger:"always",onClear:function(){console.log("clear"),a.search="",r("search",a.search)},onSearch:function(){return r("search",a.search)}},{left:function(){return t.left&&t.left()},"left-icon":function(){return d(v,{name:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABG1JREFUWEe9l22IVGUUx///O1uKLqkVi/lBKyvwQ1ixWe7LHaVs23s1TMkwjCCtD1LWhn2oLIheITBRqEA2MEkiLLX23t1QGOfuTmlkZVFBWpEUxVaEkLuuzjz/uDN3dq6zszu77uLzbe5zXn7Pec5zzhliLCvjz0XWzAet2ZBqAZ0G8Sdkf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cAyTeMImaV9HY0jssSCo1GYn+dZSerTCghj2g3djOQ+UQlafiwFtJYQeAqTGH2fCiBO2HxROQ1QtpOqhZFBoBtpSN7+EMGSZ2fezJDYEY/n9B2rueQPh88m10TCtMOGAjmlv3WYG/XcDa4SCq/zPKdLnM5sIGFc7+VeR5XMRWTKl7azDbJY4EUR2giJ7x5sDwNstovsjZMKqFhdME/zDA9xDS8Qp3TsRGgBg9wJjuoIJwBQiBay4cQMhUBnHhASIIBJ335WNkt+76Hw4CxdKCzADsAAAAAElFTkSuQmCC",class:w.leftIcon},null)},"right-icon":function(){return d(y,{disabled:e.disabled,class:w.searchBtn,round:!0,type:"primary",size:"mini",onClick:function(){return r("search",a.search)}},{default:function(){return[q("搜索")]}})}})}}}))}}}))}();
|