You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
7.4 KiB
1 lines
7.4 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0e4542b7"],{"0d2b":function(e,t,i){"use strict";var a=i("2a95");function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var a=i.call(e,t||"default");if("object"!=n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i("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 i=e.find((function(e){return e.field===t.field}));this.errorMessage=i?i.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 i=new a.a(this.validate),n=l({},this.field,this.valueModel);i.validate(n,(function(e,i){if(e){var a=e.find((function(e){return e.field===t.field}));t.errorMessage=a?a.message:""}else t.errorMessage=""}))}}}}},3696:function(e,t,i){},a3ce:function(e,t,i){"use strict";i.r(t);var a=i("b0e7"),n=i("0d2b"),l={name:"diyTabelBuild",components:{uploadPictures:a.a},mixins:[n.a],watch:{valueModel:{handler:function(e){this.changeValue()},deep:!0}},data:function(){return{gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},data:[],modalPic:!1,isChoice:"单选",tableIndex:0,keyName:"icon"}},mounted:function(){},methods:{modalPicTap:function(e,t){this.modalPic=!0,this.tableIndex=t,this.keyName=e.key},getPic:function(e){this.valueModel[this.tableIndex][this.keyName]=e.att_dir,this.modalPic=!1},add:function(){var e={};this.options.map((function(t){"sort"===t.key?e[t.key]=0:e[t.key]=""})),this.valueModel.push(e)},del:function(e){this.valueModel.splice(e,1)},changeValue:function(){this.$emit("changeValue",{field:this.field,value:this.valueModel}),this.on.change&&this.on.change(this.valueModel)}},computed:{columns:function(){var e=[];return this.options.map((function(t){e.push({title:t.name,slot:t.key,align:t.alert||"left"})})),e.push({title:"操作",slot:"action",width:100,align:"left"}),e}}},s=(i("b04d"),i("2877")),o=Object(s.a)(l,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"diy-table"},[t("FormItem",{staticClass:"input-build",class:e.getClassName(),attrs:{label:e.title}},[t("Table",{staticClass:"diy_table",attrs:{columns:e.columns,data:e.valueModel,width:750},scopedSlots:e._u([e._l(e.options,(function(i){return{key:i.key,fn:function(a){a.row;var n=a.index;return["image"===i.type?[t("div",{on:{click:function(t){return e.modalPicTap(i,n)}}},[e.valueModel[n][i.key]?t("div",{staticClass:"pictrueTab"},[t("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.valueModel[n][i.key],expression:"valueModel[index][item.key]"}]})]):t("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[t("Icon",{attrs:{type:"ios-camera-outline",size:"21"}})],1)])]:"input"===i.type?[t("Input",{staticStyle:{width:"150px"},attrs:{type:"text"},model:{value:e.valueModel[n][i.key],callback:function(t){e.$set(e.valueModel[n],i.key,t)},expression:"valueModel[index][item.key]"}})]:"select"===i.type?[t("Select",{model:{value:e.valueModel[n][i.key],callback:function(t){e.$set(e.valueModel[n],i.key,t)},expression:"valueModel[index][item.key]"}},e._l(i.props.options||[],(function(i){return t("Option",{key:i.value,attrs:{value:i.value}},[e._v(e._s(i.label))])})),1)]:"inputNumber"===i.type?[t("InputNumber",{staticStyle:{width:"150px"},attrs:{editable:i.props.editable||!1,name:e.field,min:0},model:{value:e.valueModel[n][i.key],callback:function(t){e.$set(e.valueModel[n],i.key,t)},expression:"valueModel[index][item.key]"}})]:"switch"===i.type?[t("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:e.valueModel[n][i.key],callback:function(t){e.$set(e.valueModel[n],i.key,t)},expression:"valueModel[index][item.key]"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v("开启")]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v("关闭")])])]:e._e()]}}})),{key:"action",fn:function(i){i.row;var a=i.index;return[t("span",{staticClass:"delete",on:{click:function(t){return e.del(a)}}},[e._v("删除")])]}}],null,!0)}),t("div",{staticClass:"diy-button"},[t("Button",{attrs:{type:"primary"},on:{click:e.add}},[e._v("添加")])],1)],1),t("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传商品图","mask-closable":!1,"z-index":1},model:{value:e.modalPic,callback:function(t){e.modalPic=t},expression:"modalPic"}},[e.modalPic?t("uploadPictures",{attrs:{isChoice:e.isChoice,gridBtn:e.gridBtn,gridPic:e.gridPic},on:{getPic:e.getPic}}):e._e()],1)],1)}),[],!1,null,"19119d20",null);t.default=o.exports},b04d:function(e,t,i){"use strict";i("3696")}}]); |