(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-16315759"],{"233c":function(e,t,i){"use strict";i.r(t);var n=(i("68ef"),i("e3b3"),i("d9d2"),i("d282")),a=i("ea8e"),c={size:[Number,String],value:null,loading:Boolean,disabled:Boolean,activeColor:String,inactiveColor:String,activeValue:{type:null,default:!0},inactiveValue:{type:null,default:!1}},s=i("78eb"),l=i("543e"),o=Object(n.a)("switch"),r=o[0],d=o[1],h=r({mixins:[s.a],props:c,computed:{checked:function(){return this.value===this.activeValue},style:function(){return{fontSize:Object(a.a)(this.size),backgroundColor:this.checked?this.activeColor:this.inactiveColor}}},methods:{onClick:function(e){if(this.$emit("click",e),!this.disabled&&!this.loading){var t=this.checked?this.inactiveValue:this.activeValue;this.$emit("input",t),this.$emit("change",t)}},genLoading:function(){var e=this.$createElement;if(this.loading){var t=this.checked?this.activeColor:this.inactiveColor;return e(l.a,{class:d("loading"),attrs:{color:t}})}}},render:function(){var e=arguments[0],t=this.checked,i=this.loading,n=this.disabled;return e("div",{class:d({on:t,loading:i,disabled:n}),attrs:{role:"switch","aria-checked":String(t)},style:this.style,on:{click:this.onClick}},[e("div",{class:d("node")},[this.genLoading()])])}}),u=i("2b0e");u.a.use(h);var v=u.a.extend({name:"SwitchCell",components:{},props:{title:String,checked:{type:Boolean,default:!1},className:{type:String,default:"bg-white"}},methods:{change:function(e){this.$emit("update:checked",e),this.$emit("change",e)}}}),f=i("2877"),g=Object(f.a)(v,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"mb-px flex text-text-primary items-center justify-between px-4 py-3 rounded",class:e.className},[i("div",{staticClass:"flex items-center justify-between flex-1 mr-1.5"},[i("div",{staticClass:"title flex-shrink-0 mr-4"},[e._v(e._s(e.title))])]),i("van-switch",{attrs:{"active-color":"#4F62C1",value:e.checked,size:"20px"},on:{change:e.change}})],1)}),[],!1,null,null,null);t.default=g.exports},"78eb":function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var n={inject:{vanField:{default:null}},watch:{value:function(){var e=this.vanField;e&&(e.resetValidation(),e.validateWithTrigger("onChange"))}},created:function(){var e=this.vanField;e&&!e.children&&(e.children=this)}}},d9d2:function(e,t,i){}}]);
//# sourceMappingURL=chunk-16315759.f0c37e29.js.map