1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-25d508e2"],{"0af0":function(e,t,a){"use strict";var i=a("c4c7");a.n(i).a},"0d2b":function(e,t,a){"use strict";var i=a("2a95");a("8237"),t.a={props:{options:{type:Array,default:function(){return[]}},value:{type:String|Number|Array,default:""},placeholder:{type:String,default:""},title:{type:String,default:""},type:{type:String,default:"text"},suffix:{type:String,default:""},prefix:{type:String,default:""},styleModel:{type:String,default:""},className:{type:String,default:""},field:{type:String,default:""},timerType:{type:String,default:"timerange"},timerFormat:{type:String,default:"HH:mm:ss"},info:{type:String,default:""},on:{type:Object,default:function(){return{}}},validate:{type:Object,default:function(){return{}}},errorsValidate:{type:Array,default:function(){return[]}}},data:function(){return{valueModel:this.value,errorMessage:"",exampleImage:{site_logo:"/statics/system/adminSet01.png",site_logo_square:"/statics/system/adminSet02.png",login_logo:"/statics/system/adminSet03.png",admin_login_slide:"/statics/system/adminSet04.png",start_login_logo:"/statics/system/adminSet05.png",wap_login_logo:"/statics/system/mobileSet01.png",wechat_share_img:"/statics/system/mobileSet02.png",pc_logo:"/statics/system/pcSet01.png",pay_weixin_client_cert:{text:'更多详情请查看:<br><a href="https://kf.qq.com/faq/161222NneAJf161222U7fARv.html" target="_blank" rel="noopener noreferrer">https://kf.qq.com/faq/161222NneAJf161222U7fARv.html</a>',image:"/statics/system/wxSet01.png"},pay_weixin_client_key:{text:'更多详情请查看:<br><a href="https://kf.qq.com/faq/161222NneAJf161222U7fARv.html" target="_blank" rel="noopener noreferrer">https://kf.qq.com/faq/161222NneAJf161222U7fARv.html</a>',image:"/statics/system/wxSet01.png"},terminal_number:"/statics/system/yilianyunPrinter.png",config_export_siid:"/statics/system/kuadi100Dump.png",product_poster_title:"/statics/system/productSharePoster.png",product_video_status:"/statics/system/productVideo.png"},exampleSize:{site_logo:364,site_logo_square:364,login_logo:364,admin_login_slide:364,start_login_logo:364,wap_login_logo:256,wechat_share_img:256,pc_logo:364,terminal_number:364,config_export_siid:364,product_poster_title:256}}},watch:{errorsValidate:{handler:function(e){var t=this;if(e){var a=e.find((function(e){return e.field===t.field}));this.errorMessage=a?a.message:""}else this.errorMessage=""},deep:!0}},methods:{getClassName:function(){var e=["input-build-"+this.field];return this.errorMessage&&e.push("ivu-form-item-error"),(this.validate[this.field]?this.validate[this.field].filter((function(e){return!0===e.required})):[]).length&&e.push("ivu-form-item-required"),e},changeEvent:function(e,t){"change"===e&&this.$emit("changeValue",{field:this.field,value:this.valueModel}),this.on[e]&&this.on[e](t),this.validator(e)},validator:function(e){var t=this;if((this.validate[this.field]?this.validate[this.field].filter((function(t){return t.trigger===e})):[]).length){var a,n,s,l=new i.a(this.validate),r=(a={},n=this.field,s=this.valueModel,n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a);l.validate(r,(function(e,a){if(e){var i=e.find((function(e){return e.field===t.field}));t.errorMessage=i?i.message:""}else t.errorMessage=""}))}}}}},c4c7:function(e,t,a){},fdc7d:function(e,t,a){"use strict";a.r(t);var i=a("0d2b"),n=a("8ec4"),s=a("d708"),l={name:"switchBuild",mixins:[i.a,n.a],components:{useComponent:function(){return Promise.resolve().then(a.bind(null,"05f7"))}},props:{control:{type:Array,default:function(){return[]}}},data:function(){return{baseURL:s.a.apiBaseURL.replace(/adminapi/,"")}},created:function(){this.valueModel=null===this.valueModel?0:this.valueModel},methods:{changeValue:function(e){this.$emit("changeValue",{field:e.field,value:e.value})},getSwitch:function(e,t){var a=null;return this.options.length?(this.options.map((function(i){e&&void 0!==i.trueValue?a=t?i.label:i.trueValue:e||void 0===i.falseValue||(a=t?i.label:i.falseValue)})),a):e?t?"开启":1:t?"关闭":0}}},r=(a("0af0"),a("2877")),o=Object(r.a)(l,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("FormItem",{staticClass:"input-build",class:e.getClassName(),attrs:{label:e.title}},[a("i-switch",{attrs:{size:"large","true-value":e.getSwitch(!0),"false-value":e.getSwitch(!1)},on:{"on-change":function(t){return e.changeEvent("change",t)}},model:{value:e.valueModel,callback:function(t){e.valueModel=t},expression:"valueModel"}},[a("span",{attrs:{slot:"open"},slot:"open"},[e._v(e._s(e.getSwitch(!0,!0)))]),a("span",{attrs:{slot:"close"},slot:"close"},[e._v(e._s(e.getSwitch(!1,!0)))])]),e.info?a("div",{staticClass:"info-wrapper"},[e._v(e._s(e.info)+"\n "),e.exampleImage[e.field]?a("Poptip",{attrs:{placement:"bottom",trigger:"hover",width:e.exampleSize[e.field],transfer:!0}},[a("a",[e._v("查看示例")]),a("div",{staticClass:"exampleImg",class:364==e.exampleSize[e.field]?"on":"",attrs:{slot:"content"},slot:"content"},[a("img",{attrs:{src:e.baseURL+e.exampleImage[e.field],alt:""}})])]):e._e()],1):e._e()],1),e._l(e.control,(function(t){return[t.value===e.valueModel?[a("use-component",{attrs:{validate:e.validate,errorsValidate:e.errorsValidate,rules:t.componentsModel},on:{changeValue:e.changeValue}})]:e._e()]}))],2)}),[],!1,null,"e18d2330",null);t.default=o.exports}}]);
|