@jvue/jform
Version:
A Vue.js project
1 lines • 110 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("jvue",["vue"],t):"object"==typeof exports?exports.jvue=t(require("vue")):e.jvue=t(e.vue)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=26)}([function(e,t){e.exports=function(e,t,n,r,i,o){var a,l=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(a=e,l=e.default);var c="function"==typeof l?l.options:l;t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0),n&&(c.functional=!0),i&&(c._scopeId=i);var u;if(o?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=u):r&&(u=r),u){var d=c.functional,f=d?c.render:c.beforeCreate;d?(c._injectStyles=u,c.render=function(e,t){return u.call(t),f(e,t)}):c.beforeCreate=f?[].concat(f,u):[u]}return{esModule:a,exports:l,options:c}}},function(e,t){function n(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=r(i);return[n].concat(i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})).concat([o]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){function r(e){for(var t=0;t<e.length;t++){var n=e[t],r=u[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(o(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],i=0;i<n.parts.length;i++)a.push(o(n.parts[i]));u[n.id]={id:n.id,refs:1,parts:a}}}}function i(){var e=document.createElement("style");return e.type="text/css",d.appendChild(e),e}function o(e){var t,n,r=document.querySelector("style["+v+'~="'+e.id+'"]');if(r){if(h)return m;r.parentNode.removeChild(r)}if(g){var o=p++;r=f||(f=i()),t=a.bind(null,r,o,!1),n=a.bind(null,r,o,!0)}else r=i(),t=l.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}function a(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=_(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function l(e,t){var n=t.css,r=t.media,i=t.sourceMap;if(r&&e.setAttribute("media",r),b.ssrId&&e.setAttribute(v,t.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var s="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!s)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var c=n(43),u={},d=s&&(document.head||document.getElementsByTagName("head")[0]),f=null,p=0,h=!1,m=function(){},b=null,v="data-vue-ssr-id",g="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,n,i){h=n,b=i||{};var o=c(e,t);return r(o),function(t){for(var n=[],i=0;i<o.length;i++){var a=o[i],l=u[a.id];l.refs--,n.push(l)}t?(o=c(e,t),r(o)):o=[];for(var i=0;i<n.length;i++){var l=n[i];if(0===l.refs){for(var s=0;s<l.parts.length;s++)l.parts[s]();delete u[l.id]}}}};var _=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){"use strict";function r(e){return"[object string]"===Object.prototype.toString.call(e).toLowerCase()}function i(e){return"[object number]"===Object.prototype.toString.call(e).toLowerCase()}function o(e){return"[object object]"===Object.prototype.toString.call(e).toLowerCase()}function a(e){return"[object array]"===Object.prototype.toString.call(e).toLowerCase()}function l(e){return"[object function]"===Object.prototype.toString.call(e).toLowerCase()}t.e=r,t.c=i,t.d=o,t.a=a,t.b=l},function(e,t,n){"use strict";t.a=function(e){for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t]||{};for(var i in r)if(r.hasOwnProperty(i)){var o=r[i];void 0!==o&&(e[i]=o)}}return e}},function(e,t,n){"use strict";function r(){return i.all([].concat(Array.prototype.slice.call(arguments)).filter(function(e){return e}),{arrayMerge:function(e,t,n){var r=e.slice();return t.forEach(function(t,o){void 0===r[o]?r[o]=n.cloneUnlessOtherwiseSpecified(t,n):n.isMergeableObject(t)?r[o]=i(e[o],t,n):-1===e.indexOf(t)&&r.push(t)}),r}})}t.a=r;var i=n(29)},function(e,t,n){"use strict";var r=n(32);t.a={name:"j-form",inheritAttrs:!1,props:{data:Object,required:!0},data:function(){return{data_:{},forms_:[]}},watch:{data:{immediate:!0,handler:function(e,t){!e||Object.keys(e).length<1||e===t||(this.data_=Object(r.a)(e,this))}}},methods:{validate:function(e){return Promise.all(this.forms_.map(function(t){return t.validate(e)}))},validateField:function(e,t){return Promise.all(this.forms_.map(function(n){return n.validateField(e,t)}))},resetFields:function(){return Promise.all(this.forms_.map(function(e){return e.resetFields()}))},clearValidate:function(e){return Promise.all(this.forms_.map(function(t){return t.clearValidate(e)}))}},mounted:function(){var e=this;this.forms_=Object.keys(this.$refs).reduce(function(t,n){var r=e.$refs[n];return r.$options&&"j-el-form"===r.$options.name&&t.push(r),t},[])}}},function(e,t,n){"use strict";var r=n(3);t.a={name:"JElCheckboxGroup",props:{value:Array,size:String,disabled:Boolean,min:Number,max:Number,textColor:{type:String,default:"#ffffff"},fill:{type:String,default:"#409EFF"},border:Boolean,mode:{type:String,validator:function(e){return-1!==[null,"button"].indexOf(e)}},data:Array,dataProp:{type:Object,default:function(){return{label:"label",value:"value",trueLabel:"trueLabel",falseLabel:"falseLabel",disabled:"disabled",border:"border",checked:"checked",indeterminate:"indeterminate"}},validator:function(e){return Object(r.d)(e)}}},data:function(){return{value_:this.value}},computed:{dataProp__:function(){return{label:this.dataProp.label||"label",value:this.dataProp.value||"value",trueLabel:this.dataProp.trueLabel||"trueLabel",falseLabel:this.dataProp.falseLabel||"falseLabel",disabled:this.dataProp.disabled||"disabled",border:this.dataProp.border||"border",checked:this.dataProp.checked||"checked",indeterminate:this.dataProp.indeterminate||"indeterminate"}},bind__:function(){return{size:this.size,disabled:this.disabled,min:this.min,max:this.max,textColor:this.textColor,fill:this.fill}},data__:function(){var e=this;return(this.data||[]).map(function(t){return{label:t[e.dataProp__.label],value:t[e.dataProp__.value],trueLabel:t[e.dataProp__.trueLabel],falseLabel:t[e.dataProp__.falseLabel],disabled:!!t[e.dataProp__.disabled],border:!!t[e.dataProp__.border],checked:!!t[e.dataProp__.checked],indeterminate:!!t[e.dataProp__.indeterminate]}})}},watch:{value:function(e){this.value_=e},value_:function(e){this.$emit("input",e)}}}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.a={name:"JElCoordinatePicker",inject:{elForm:{default:""},elFormItem:{default:""}},props:{value:Object,disabled:Boolean,size:{type:String,validator:function(e){return-1!==["medium","small","mini"].indexOf(e)}},mapHeight:Number,mapCenter:{type:Object,default:function(){return{lng:116.40405,lat:39.915486}}},mapZoom:{type:Number,default:15}},data:function(){return{value_:r({},this.mapCenter),searchKeyword_:""}},computed:{elFormItemSize__:function(){return(this.elFormItem||{}).elFormItemSize},size__:function(){return this.size||this.elFormItemSize__||(this.$ELEMENT||{}).size}},watch:{value:{immediate:!0,handler:function(e){e&&(this.value_=e)},deep:!0},value_:{immediate:!0,handler:function(e){this.$emit("input",e)},deep:!0}},methods:{onClickMap:function(e){this.disabled||(this.value_.lng=e.point.lng,this.value_.lat=e.point.lat)}}}},function(e,t,n){"use strict";t.a={name:"JElDescription",inject:{elForm:{default:""},elFormItem:{default:""}},props:{value:[String,Number],type:{type:String,validator:function(e){return-1!==["primary","success","info","warning","danger"].indexOf(e)}},size:{type:String,validator:function(e){return-1!==["medium","small","mini"].indexOf(e)}},height:[String,Number],ellipsis:Boolean},computed:{elFormItemSize__:function(){return(this.elFormItem||{}).elFormItemSize},size__:function(){return this.size||this.elFormItemSize__||(this.$ELEMENT||{}).size},class__:function(){var e=[];return this.type&&e.push(this.type),this.size__&&e.push(this.size__),this.height&&e.push("scroll"),this.ellipsis&&e.push("ellipsis"),e},style__:function(){var e={};return!this.ellipsis&&this.height&&(isNaN(this.height)?e.height=this.height:e.height=this.height+"px"),e}}}},function(e,t,n){"use strict";t.a={name:"JElDialog",props:{visible:Boolean,title:String,width:{type:String,default:"50%"},height:Number,fullscreen:Boolean,top:{type:String,default:"15vh"},modal:{type:Boolean,default:!0},modalAppendToBody:{type:Boolean,default:!0},appendToBody:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},customClass:String,closeOnClickModal:{type:Boolean,default:!1},closeOnPressEscape:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},beforeClose:Function,center:Boolean,destroyOnClose:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},inIframe:{type:Boolean,default:function(){return window.frames.length!==window.parent.frames.length}}},data:function(){return{window:{width:window.innerWidth,height:window.innerHeight},visible_:this.visible,headerHeight_:0,footerHeight_:0,fullscreen_:!1}},computed:{width__:function(){return this.fullscreen_?"100%":this.width},height_:function(){var e=this.height;return e||(e=this.window.height-200,e>200?e:200)},bodyHeight__:function(){return(this.fullscreen_?this.window.height:this.height_)-this.headerHeight_-this.footerHeight_},bodySlotHeight__:function(){return this.fullscreen_&&this.inIframe?this.bodyHeight__:this.bodyHeight__-(this.showHeader?0:20)-(this.footerHeight_?0:20)},top__:function(){return this.fullscreen_?"0vh":this.top}},watch:{visible:{handler:function(e){this.visible_=e}},visible_:{handler:function(e){this.$emit("update:visible",e)}},fullscreen:{handler:function(e){this.fullscreen_=e}},fullscreen_:{handler:function(e){this.$emit("update:fullscreen",e)}}},methods:{fullScreen:function(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])){if(!0===this.fullscreen_)return;var e=this.$el.querySelector(".el-dialog");e.dataset.left=e.style.left,e.dataset.top=e.style.top,e.style.left="0px",e.style.top="0px",this.fullscreen_=!0}else{if(!0!==this.fullscreen_)return;var t=this.$el.querySelector(".el-dialog");t.style.left=t.dataset.left,t.style.top=t.dataset.top,this.fullscreen_=!1}},resize:function(){this.window={width:window.innerWidth,height:window.innerHeight}}},updated:function(){this.$refs.header&&(this.headerHeight_=this.$refs.header.offsetHeight),this.$refs.footer&&(this.footerHeight_=this.$refs.footer.offsetHeight)},beforeDestroy:function(){window.removeEventListener("resize",this.resize)},created:function(){window.addEventListener("resize",this.resize)},mounted:function(){this.fullscreen_=this.fullscreen}}},function(e,t,n){"use strict";var r=n(53);t.a={name:"JElDrawer",mixins:[r.a],props:{appendToBody:{type:Boolean,default:!0},beforeClose:Function,closeOnPressEscape:{type:Boolean,default:!0},customClass:String,destroyOnClose:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},modalAppendToBody:{type:Boolean,default:!0},direction:{type:String,default:"rtl"},showClose:{type:Boolean,default:!0},size:{type:[Number,String],default:"30%"},title:String,visible:Boolean,wrapperClosable:{type:Boolean,default:!0}},data:function(){return{visible_:this.visible}},computed:{withHeader__:function(){return!!this.title},height__:function(){return this.withHeader__?this.window.height+88:this.window.height+167}},watch:{visible:{handler:function(e){this.visible_=e}},visible_:{handler:function(e){this.$emit("update:visible",e)}}}}},function(e,t,n){"use strict";var r=n(4);t.a={name:"JElEditor",render:function(e){var t=this;return this.tinymce?this.$options.components&&this.$options.components["tinymce-editor"]?this.visible_?e("tinymce-editor",{props:{value:this.value_,init:this.init__},on:{input:function(e){return t.value_=e}}}):e("span"):e("div",{},["请使用 Vue.component api 将 @tinymce/tinymce-vue 注册为全局组件: tinymce-editor"]):e("div",{},["富文本缺少依赖库: tinymce"])},props:{value:String,init:{type:Object,default:function(){return{}}}},data:function(){return{tinymce:!!window.tinymce,value_:"",init_:{},visible_:!0}},computed:{init__:function(){var e=Object(r.a)({},this.init_);return e.auto_focus=!!e.auto_focus,e.branding=!!e.branding,e.skin_url=e.skin_url||this.$JForm.editor.skin_url,e.language_url=e.language_url||this.$JForm.editor.language_url,e.language=e.language||this.$JForm.editor.language,e.content_css=e.content_css||this.$JForm.editor.content_css,e}},watch:{value:{immediate:!0,handler:function(e){this.value_=e}},value_:{immediate:!0,handler:function(e){this.$emit("input",e)}},init:{immediate:!0,handler:function(e){JSON.stringify(e)!==JSON.stringify(this.init_)&&(this.init_=e)}},init__:{handler:function(e){var t=this;this.visible_=!1,this.$nextTick(function(){return t.visible_=!0})}}}}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}t.a={name:"JElForm",props:{model:Object,rules:Object,inline:Boolean,labelPosition:{type:String,default:"right"},labelWidth:String,labelSuffix:String,hideRequiredAsterisk:Boolean,showMessage:{type:Boolean,default:!0},inlineMessage:Boolean,statusIcon:Boolean,validateOnRuleChange:{type:Boolean,default:!0},size:String,disabled:Boolean},data:function(){return{subForms_:[]}},provide:function(){return{form:this}},computed:{formBind__:function(){return{rules:this.rules,inline:this.inline,labelPosition:this.labelPosition,labelWidth:this.labelWidth,labelSuffix:this.labelSuffix,hideRequiredAsterisk:this.hideRequiredAsterisk,showMessage:this.showMessage,inlineMessage:this.inlineMessage,statusIcon:this.statusIcon,validateOnRuleChange:this.validateOnRuleChange,size:this.size,disabled:this.disabled}}},methods:{validate:function(e){return this.$refs.form&&this.$refs.form.validate(e)},validateField:function(e,t){return this.$refs.form&&this.$refs.form.validateField(e,t)},resetFields:function(){return this.$refs.form&&this.$refs.form.resetFields()},clearValidate:function(e){return this.$refs.form&&this.$refs.form.clearValidate(e)},addSubForm:function(e){this.subForms_.push(e)},getSubForms:function(){return this.subForms_},getForms:function(){return[this].concat(r(this.subForms_))}}}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}t.a={name:"JElArrayForm",inheritAttrs:!1,provide:function(){return{jElArrayForm:this}},model:{prop:"model"},props:{model:{type:Array,default:function(){return[]}},itemDataType:{type:String,default:"string"},itemDefaultValue:[String,Number,Object,Array],rules:[Object,Array],hideRequiredAsterisk:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},size:String,disabled:Boolean,height:[String,Number],maxHeight:[String,Number],stripe:Boolean,border:{type:Boolean,default:!0},minRow:Number,maxRow:Number,appendEnabled:{type:Boolean,default:!0},removeEnabled:{type:Boolean,default:!0}},data:function(){return{initialValue:null,form_:{data:[]},fields_:[]}},inject:{elForm:{default:""},elFormItem:{default:""},form:{default:""}},computed:{elFormItemSize__:function(){return(this.elFormItem||{}).elFormItemSize},size__:function(){return this.size||this.elFormItemSize__||(this.$ELEMENT||{}).size},formBind:function(){return{hideRequiredAsterisk:this.hideRequiredAsterisk,showMessage:this.showMessage,validateOnRuleChange:this.validateOnRuleChange,size:this.size__,disabled:this.disabled}},tableData:function(){return this.form_.data.map(function(){return{visible:!1}})},tableBind:function(){return{height:this.height,maxHeight:this.maxHeight,stripe:this.stripe,border:this.border,size:this.size__,fit:!0,showHeader:!1}},tableOn:function(){return this.removeEnabled?{"cell-mouse-enter":function(e){return e.visible=!0},"cell-mouse-leave":function(e){return e.visible=!1}}:{}},rowCount:function(){return this.tableData.length},appendButtonDisabled:function(){return!!this.maxRow&&this.rowCount>=this.maxRow},removeButtonDisabled:function(){return!!this.minRow&&this.rowCount<=this.minRow},rows:function(){return this.fields_.map(function(e){return{required:e.isRequired||e.$props.required}})},itemDefaultValueStr:function(){return JSON.stringify(this.itemDefaultValue)}},watch:{model:{immediate:!0,handler:function(e){this.form_.data=e||[]},deep:!0},fields_:function(e){if(e.length!==this.form_.data.length)throw new Error("Component template should contain exactly one j-el-array-form-item element. If you are using v-if on multiple elements, use v-else-if to chain them instead.")}},methods:{addField:function(e){return this.fields_.push(e)},removeField:function(e){this.fields_.splice(this.fields_.indexOf(e),1)},append:function(){this.appendButtonDisabled||(this.itemDefaultValue?this.form_.data.push(JSON.parse(this.itemDefaultValueStr)):"string"===this.itemDataType?this.form_.data.push(""):"number"===this.itemDataType?this.form_.data.push(0):"object"===this.itemDataType?this.form_.data.push({}):"array"===this.itemDataType?this.form_.data.push([]):this.form_.data.push(null))},remove:function(e){var t=e.$index;this.removeButtonDisabled||this.form_.data.splice(t,1)},validate:function(e){return this.$refs.form.validate(e)},validateField:function(e,t){return this.$refs.form.validateField(e,t)},resetFields:function(){if(JSON.stringify(this.form_.data)===JSON.stringify(this.initialValue))return this.$refs.form.resetFields();var e;(e=this.form_.data).splice.apply(e,[0,this.form_.data.length].concat(r(JSON.parse(this.initialValue))))},clearValidate:function(e){return this.$refs.form.clearValidate(e)}},created:function(){this.form&&this.form.addSubForm(this)},mounted:function(){this.initialValue=JSON.stringify(this.model||[])}}},function(e,t,n){"use strict";t.a={name:"JElArrayFormItem",inject:{jElArrayForm:{default:""}},props:{required:{type:Boolean,default:void 0},rules:[Object,Array],error:String,showMessage:{type:Boolean,default:!0},size:String},data:function(){return{cellIndex:null,isRequired:null}},computed:{rowIndex:function(){return this.cellIndex},hideMessage:function(){return!this.showMessage||!this.jElArrayForm.showMessage},bind:function(){return{prop:"data."+this.rowIndex,required:this.required,rules:this.getRules(),error:this.error,showMessage:!this.hideMessage,size:this.size}}},methods:{getRules:function(){var e=this.jElArrayForm.rules,t=this.rules,n=void 0!==this.required?{required:!!this.required}:[];return[].concat(t||e||[]).concat(n)},resetField:function(){this.$refs.formItem&&this.$refs.formItem.resetField()},clearValidate:function(){this.$refs.formItem&&this.$refs.formItem.clearValidate()}},created:function(){this.cellIndex=this.jElArrayForm.addField(this)-1;var e=this.getRules(),t=!1;e&&e.length&&e.every(function(e){return!e.required||(t=!0,!1)}),this.isRequired=t},beforeDestroy:function(){this.jElArrayForm.removeField(this)}}},function(e,t,n){"use strict";t.a={name:"JElObjectForm",inheritAttrs:!1,provide:function(){return{jElObjectForm:this}},model:{prop:"model"},props:{model:Object,labelColumn:{type:Object,default:function(){return{}}},valueColumn:{type:Object,default:function(){return{}}},rows:{type:Array,default:function(){return[]}},rules:Object,hideRequiredAsterisk:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},size:String,disabled:Boolean,stripe:Boolean,border:{type:Boolean,default:!0}},data:function(){return{form_:{data:{}},fields_:[]}},inject:{elForm:{default:""},elFormItem:{default:""},form:{default:""}},computed:{elFormItemSize__:function(){return(this.elFormItem||{}).elFormItemSize},size__:function(){return this.size||this.elFormItemSize__||(this.$ELEMENT||{}).size},labelBind:function(){return{width:this.labelColumn.width,minWidth:this.labelColumn.minWidth,headerAlign:this.labelColumn.headerAlign||"center",align:this.labelColumn.align||"center"}},valueBind:function(){return{width:this.valueColumn.width,minWidth:this.valueColumn.minWidth,headerAlign:this.valueColumn.headerAlign||"center",align:this.valueColumn.align||"center"}},tableRows:function(){return this.rows.map(function(e){return{prop:e.prop,label:e.label}})},tableData:function(){var e=this;return this.tableRows.map(function(t){return{value:e.form_.data[t.prop]}})},rows__:function(){return this.fields_.map(function(e){return{required:e.isRequired||e.$props.required}})},formBind:function(){return{hideRequiredAsterisk:this.hideRequiredAsterisk,showMessage:this.showMessage,validateOnRuleChange:this.validateOnRuleChange,size:this.size__,disabled:this.disabled}},tableBind:function(){return{stripe:this.stripe,border:this.border,size:this.size__,fit:!0,showHeader:!1}}},watch:{model:{immediate:!0,handler:function(e){this.form_.data=e||{}},deep:!0}},methods:{addField:function(e){return this.fields_.push(e)},removeField:function(e){this.fields_.splice(this.fields_.indexOf(e),1)},validate:function(e){return this.$refs.form&&this.$refs.form.validate(e)},validateField:function(e,t){return this.$refs.form&&this.$refs.form.validateField(e,t)},resetFields:function(){return this.$refs.form&&this.$refs.form.resetFields()},clearValidate:function(e){return this.$refs.form&&this.$refs.form.clearValidate(e)}},created:function(){this.form&&this.form.addSubForm(this)}}},function(e,t,n){"use strict";t.a={name:"JElObjectFormItem",inject:{jElObjectForm:{default:""}},props:{required:{type:Boolean,default:void 0},rules:[Object,Array],error:String,showMessage:{type:Boolean,default:!0},size:String},data:function(){return{cellIndex:null,isRequired:!1}},computed:{rowIndex:function(){return this.cellIndex},prop:function(){return this.jElObjectForm.tableRows[this.rowIndex]&&this.jElObjectForm.tableRows[this.rowIndex].prop},hideMessage:function(){return!this.showMessage||!this.jElObjectForm.showMessage},bind:function(){return{prop:"data."+this.prop,required:this.required,rules:this.getRules(),error:this.error,showMessage:!this.hideMessage,size:this.size}}},methods:{getRules:function(){var e=this.jElObjectForm.rules?this.jElObjectForm.rules[this.prop]:null,t=this.rules,n=void 0!==this.required?{required:!!this.required}:[];return[].concat(t||e||[]).concat(n)},resetField:function(){this.$refs.formItem&&this.$refs.formItem.resetField()},clearValidate:function(){this.$refs.formItem&&this.$refs.formItem.clearValidate()}},created:function(){this.cellIndex=this.jElObjectForm.addField(this)-1;var e=this.getRules(),t=!1;e&&e.length&&e.every(function(e){return!e.required||(t=!0,!1)}),this.isRequired=t},beforeDestroy:function(){this.jElObjectForm.removeField(this)}}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}t.a={name:"JElObjectArrayForm",inheritAttrs:!1,provide:function(){return{jElObjectArrayForm:this}},model:{prop:"model"},props:{model:{type:Array,default:function(){return[]}},columns:{type:Array,default:function(){return[]}},itemDefaultValue:Object,rules:Object,hideRequiredAsterisk:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},size:String,disabled:Boolean,height:[String,Number],maxHeight:[String,Number],stripe:Boolean,border:{type:Boolean,default:!0},minRow:Number,maxRow:Number,appendEnabled:{type:Boolean,default:!0},removeEnabled:{type:Boolean,default:!0}},data:function(){return{initialValue:null,form_:{data:[]},fields_:[]}},inject:{elForm:{default:""},elFormItem:{default:""},form:{default:""}},computed:{elFormItemSize__:function(){return(this.elFormItem||{}).elFormItemSize},size__:function(){return this.size||this.elFormItemSize__||(this.$ELEMENT||{}).size},formBind:function(){return{hideRequiredAsterisk:this.hideRequiredAsterisk,showMessage:this.showMessage,validateOnRuleChange:this.validateOnRuleChange,size:this.size__,disabled:this.disabled}},tableColumns:function(){return this.columns.map(function(e){return{prop:e.prop,label:e.label,width:e.width,minWidth:e.minWidth,headerAlign:e.headerAlign||"center",align:e.align||"center"}})},tableData:function(){return this.form_.data.map(function(e){return{visible:!1,target:e}})},tableBind:function(){return{height:this.height,maxHeight:this.maxHeight,stripe:this.stripe,border:this.border,size:this.size__,fit:!0,showHeader:!0}},tableOn:function(){return this.removeEnabled?{"cell-mouse-enter":function(e){return e.visible=!0},"cell-mouse-leave":function(e){return e.visible=!1}}:{}},rowCount:function(){return this.tableData.length},appendButtonDisabled:function(){return!!this.maxRow&&this.rowCount>=this.maxRow},removeButtonDisabled:function(){return!!this.minRow&&this.rowCount<=this.minRow},rows:function(){return this.fields_.map(function(e){return{required:e.isRequired||e.$props.required}})},itemDefaultValueStr:function(){return JSON.stringify(this.itemDefaultValue)}},watch:{model:{immediate:!0,handler:function(e){this.form_.data=e||[]},deep:!0},fields_:function(e){if(e.length!==this.tableColumns.length*this.rowCount)throw new Error("Component template should contain exactly one j-el-array-form-item element. If you are using v-if on multiple elements, use v-else-if to chain them instead.")}},methods:{addField:function(e){return this.fields_.push(e)},removeField:function(e){this.fields_.splice(this.fields_.indexOf(e),1)},append:function(){this.appendButtonDisabled||(this.itemDefaultValue?this.form_.data.push(JSON.parse(this.itemDefaultValueStr)):this.form_.data.push(this.tableColumns.reduce(function(e,t){return e[t.prop]=null,e},{})))},remove:function(e){var t=e.$index;this.removeButtonDisabled||this.form_.data.splice(t,1)},validate:function(e){return this.$refs.form&&this.$refs.form.validate(e)},validateField:function(e,t){return this.$refs.form&&this.$refs.form.validateField(e,t)},resetFields:function(){if(JSON.stringify(this.form_.data)===JSON.stringify(this.initialValue))return this.$refs.form.resetFields();var e;(e=this.form_.data).splice.apply(e,[0,this.form_.data.length].concat(r(JSON.parse(this.initialValue))))},clearValidate:function(e){return this.$refs.form&&this.$refs.form.clearValidate(e)}},created:function(){this.form&&this.form.addSubForm(this)},mounted:function(){this.initialValue=JSON.stringify(this.model||[])}}},function(e,t,n){"use strict";t.a={name:"JElObjectArrayFormItem",inject:{jElObjectArrayForm:{default:""}},props:{required:{type:Boolean,default:void 0},rules:[Object,Array],error:String,showMessage:{type:Boolean,default:!0},size:String},data:function(){return{cellIndex:null}},computed:{columnIndex:function(){var e=this.jElObjectArrayForm.tableColumns.length;return this.cellIndex%e},prop:function(){return this.jElObjectArrayForm.tableColumns[this.columnIndex]&&this.jElObjectArrayForm.tableColumns[this.columnIndex].prop},hideMessage:function(){return!this.showMessage||!this.jElObjectArrayForm.showMessage},rowIndex:function(){var e=this.jElObjectArrayForm.tableColumns.length;return Math.floor(this.cellIndex/e)},isRequired:function(){var e=this.getRules(),t=!1;return e&&e.length&&e.every(function(e){return!e.required||(t=!0,!1)}),t},bind:function(){return{prop:"data."+this.rowIndex+"."+this.prop,required:this.required,rules:this.getRules(),error:this.error,showMessage:!this.hideMessage,size:this.size}}},methods:{getRules:function(){var e=this.jElObjectArrayForm.rules?this.jElObjectArrayForm.rules[this.prop]:null,t=this.rules,n=void 0!==this.required?{required:!!this.required}:[];return[].concat(t||e||[]).concat(n)},resetField:function(){this.$refs.formItem&&this.$refs.formItem.resetField()},clearValidate:function(){this.$refs.formItem&&this.$refs.formItem.clearValidate()}},created:function(){this.cellIndex=this.jElObjectArrayForm.addField(this)-1},beforeDestroy:function(){this.jElObjectArrayForm.removeField(this)}}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}t.a={name:"JElIconPicker",components:{JElIconPickerPane:{name:"JElIconPickerPane",functional:!0,props:{value:String,data:{type:Array,default:function(){return[]}},query:String},render:function(e,t){return e("ul",{class:"icon-list-mini"},t.props.data.filter(function(e){return!t.props.query||-1!==e.indexOf(t.props.query)}).map(function(n){return e("li",{key:n,class:{active:t.props.value===n},on:{click:function(){t.listeners.input(n)}}},[e("div",{class:"icon-one"},[e("i",{class:[n],attrs:{title:n}})])])}))}}},inject:{elForm:{default:""},elFormItem:{default:""}},props:{value:String,maxlength:Number,minlength:Number,placeholder:String,clearable:Boolean,disabled:Boolean,size:String,prefixIcon:String,suffixIcon:String,autocomplete:{type:String,default:"off"},name:String,readonly:Boolean,max:Number,min:Number,step:Number,autofocus:Boolean,form:String,label:String,tabindex:String,validateEvent:{type:Boolean,default:!0},popoverHeight:Number,active:String,initDefault:Boolean,icons:Array,filterable:{type:Boolean,default:!0}},data:function(){return{value_:"",popoverVisible_:!1,popoverWidth_:0,query_:""}},computed:{elFormItemSize__:function(){return(this.elFormItem||{}).elFormItemSize},size__:function(){return this.size||this.elFormItemSize__||(this.$ELEMENT||{}).size},bind__:function(){return{maxlength:this.maxlength,minlength:this.minlength,placeholder:this.placeholder,clearable:this.clearable,disabled:this.disabled,size:this.size__,prefixIcon:this.prefixIcon,suffixIcon:this.suffixIcon,autocomplete:this.autocomplete,name:this.name,readonly:this.readonly,max:this.max,min:this.min,step:this.step,autofocus:this.autofocus,form:this.form,label:this.label,tabindex:this.tabindex,validateEvent:this.validateEvent}},popoverHeight__:function(){var e=this.popoverHeight||this.popoverWidth_/3;return e<138&&(e=138),e},elIcons__:function(){return["el-icon-platform-eleme","el-icon-eleme","el-icon-delete-solid","el-icon-delete","el-icon-s-tools","el-icon-setting","el-icon-user-solid","el-icon-user","el-icon-phone","el-icon-phone-outline","el-icon-more","el-icon-more-outline","el-icon-star-on","el-icon-star-off","el-icon-s-goods","el-icon-goods","el-icon-warning","el-icon-warning-outline","el-icon-question","el-icon-info","el-icon-remove","el-icon-circle-plus","el-icon-success","el-icon-error","el-icon-zoom-in","el-icon-zoom-out","el-icon-remove-outline","el-icon-circle-plus-outline","el-icon-circle-check","el-icon-circle-close","el-icon-s-help","el-icon-help","el-icon-minus","el-icon-plus","el-icon-check","el-icon-close","el-icon-picture","el-icon-picture-outline","el-icon-picture-outline-round","el-icon-upload","el-icon-upload2","el-icon-download","el-icon-camera-solid","el-icon-camera","el-icon-video-camera-solid","el-icon-video-camera","el-icon-message-solid","el-icon-bell","el-icon-s-cooperation","el-icon-s-order","el-icon-s-platform","el-icon-s-fold","el-icon-s-unfold","el-icon-s-operation","el-icon-s-promotion","el-icon-s-home","el-icon-s-release","el-icon-s-ticket","el-icon-s-management","el-icon-s-open","el-icon-s-shop","el-icon-s-marketing","el-icon-s-flag","el-icon-s-comment","el-icon-s-finance","el-icon-s-claim","el-icon-s-custom","el-icon-s-opportunity","el-icon-s-data","el-icon-s-check","el-icon-s-grid","el-icon-menu","el-icon-share","el-icon-d-caret","el-icon-caret-left","el-icon-caret-right","el-icon-caret-bottom","el-icon-caret-top","el-icon-bottom-left","el-icon-bottom-right","el-icon-back","el-icon-right","el-icon-bottom","el-icon-top","el-icon-top-left","el-icon-top-right","el-icon-arrow-left","el-icon-arrow-right","el-icon-arrow-down","el-icon-arrow-up","el-icon-d-arrow-left","el-icon-d-arrow-right","el-icon-video-pause","el-icon-video-play","el-icon-refresh","el-icon-refresh-right","el-icon-refresh-left","el-icon-finished","el-icon-sort","el-icon-sort-up","el-icon-sort-down","el-icon-rank","el-icon-loading","el-icon-view","el-icon-c-scale-to-original","el-icon-date","el-icon-edit","el-icon-edit-outline","el-icon-folder","el-icon-folder-opened","el-icon-folder-add","el-icon-folder-remove","el-icon-folder-delete","el-icon-folder-checked","el-icon-tickets","el-icon-document-remove","el-icon-document-delete","el-icon-document-copy","el-icon-document-checked","el-icon-document","el-icon-document-add","el-icon-printer","el-icon-paperclip","el-icon-takeaway-box","el-icon-search","el-icon-monitor","el-icon-attract","el-icon-mobile","el-icon-scissors","el-icon-umbrella","el-icon-headset","el-icon-brush","el-icon-mouse","el-icon-coordinate","el-icon-magic-stick","el-icon-reading","el-icon-data-line","el-icon-data-board","el-icon-pie-chart","el-icon-data-analysis","el-icon-collection-tag","el-icon-film","el-icon-suitcase","el-icon-suitcase-1","el-icon-receiving","el-icon-collection","el-icon-files","el-icon-notebook-1","el-icon-notebook-2","el-icon-toilet-paper","el-icon-office-building","el-icon-school","el-icon-table-lamp","el-icon-house","el-icon-no-smoking","el-icon-smoking","el-icon-shopping-cart-full","el-icon-shopping-cart-1","el-icon-shopping-cart-2","el-icon-shopping-bag-1","el-icon-shopping-bag-2","el-icon-sold-out","el-icon-sell","el-icon-present","el-icon-box","el-icon-bank-card","el-icon-money","el-icon-coin","el-icon-wallet","el-icon-discount","el-icon-price-tag","el-icon-news","el-icon-guide","el-icon-male","el-icon-female","el-icon-thumb","el-icon-cpu","el-icon-link","el-icon-connection","el-icon-open","el-icon-turn-off","el-icon-set-up","el-icon-chat-round","el-icon-chat-line-round","el-icon-chat-square","el-icon-chat-dot-round","el-icon-chat-dot-square","el-icon-chat-line-square","el-icon-message","el-icon-postcard","el-icon-position","el-icon-turn-off-microphone","el-icon-microphone","el-icon-close-notification","el-icon-bangzhu","el-icon-time","el-icon-odometer","el-icon-crop","el-icon-aim","el-icon-switch-button","el-icon-full-screen","el-icon-copy-document","el-icon-mic","el-icon-stopwatch","el-icon-medal-1","el-icon-medal","el-icon-trophy","el-icon-trophy-1","el-icon-first-aid-kit","el-icon-discover","el-icon-place","el-icon-location","el-icon-location-outline","el-icon-location-information","el-icon-add-location","el-icon-delete-location","el-icon-map-location","el-icon-alarm-clock","el-icon-timer","el-icon-watch-1","el-icon-watch","el-icon-lock","el-icon-unlock","el-icon-key","el-icon-service","el-icon-mobile-phone","el-icon-bicycle","el-icon-truck","el-icon-ship","el-icon-basketball","el-icon-football","el-icon-soccer","el-icon-baseball","el-icon-wind-power","el-icon-light-rain","el-icon-lightning","el-icon-heavy-rain","el-icon-sunrise","el-icon-sunrise-1","el-icon-sunset","el-icon-sunny","el-icon-cloudy","el-icon-partly-cloudy","el-icon-cloudy-and-sunny","el-icon-moon","el-icon-moon-night","el-icon-dish","el-icon-dish-1","el-icon-food","el-icon-chicken","el-icon-fork-spoon","el-icon-knife-fork","el-icon-burger","el-icon-tableware","el-icon-sugar","el-icon-dessert","el-icon-ice-cream","el-icon-hot-water","el-icon-water-cup","el-icon-coffee-cup","el-icon-cold-drink","el-icon-goblet","el-icon-goblet-full","el-icon-goblet-square","el-icon-goblet-square-full","el-icon-refrigerator","el-icon-grape","el-icon-watermelon","el-icon-cherry","el-icon-apple","el-icon-pear","el-icon-orange","el-icon-coffee","el-icon-ice-tea","el-icon-ice-drink","el-icon-milk-tea","el-icon-potato-strips","el-icon-lollipop","el-icon-ice-cream-square","el-icon-ice-cream-round"]},icons__:function(){var e=this.initDefault||!!(this.$JForm||{}).iconPicker.initDefault,t=this.icons||(this.$JForm||{}).iconPicker.icons;return e?[{label:"ElementUI",data:this.elIcons__}].concat(r(t)):t},active__:function(){return this.active||this.icons__[0]?this.icons__[0].label:null}},watch:{value:{immediate:!0,handler:function(e){this.value_=e}},value_:{handler:function(e){this.$emit("input",e)}}},methods:{onBlur:function(e){this.$emit("blur",e)},onFocus:function(e){this.$emit("focus",e)},onChange:function(e){this.$emit("change",e)},onInput:function(e){this.$emit("input",e)},onClear:function(){this.$emit("clear")},onClick:function(e){this.value_=e},computedPopoverWidth:function(){var e=this.$refs.reference.$el.offsetWidth-24;e-=e%46,e<184&&(e=184),this.popoverWidth_=e}},mounted:function(){var e=this;this.$nextTick(function(){return e.computedPopoverWidth()})}}},function(e,t,n){"use strict";var r=n(3);t.a={name:"JElRadioGroup",props:{value:[String,Number,Boolean],size:String,disabled:Boolean,textColor:{type:String,default:"#ffffff"},fill:{type:String,default:"#409EFF"},border:Boolean,mode:{type:String,validator:function(e){return-1!==[null,"button"].indexOf(e)}},data:Array,dataProp:{type:Object,default:function(){return{label:"label",value:"value",disabled:"disabled",border:"border"}},validator:function(e){return Object(r.d)(e)}}},data:function(){return{value_:this.value}},computed:{dataProp__:function(){return{label:this.dataProp.label||"label",value:this.dataProp.value||"value",disabled:this.dataProp.disabled||"disabled",border:this.dataProp.border||"border"}},bind__:function(){return{size:this.size,disabled:this.disabled,textColor:this.textColor,fill:this.fill}},data__:function(){var e=this;return(this.data||[]).map(function(t){return{label:t[e.dataProp__.label],value:t[e.dataProp__.value],disabled:!!t[e.dataProp__.disabled],border:!!t[e.dataProp__.border]}})}},watch:{value:function(e){this.value_=e},value_:function(e){this.$emit("input",e)}}}},function(e,t,n){"use strict";var r=n(3);t.a={name:"JElSelect",props:{value:[String,Number,Array],multiple:Boolean,disabled:Boolean,valueKey:{type:String,default:"value"},size:String,clearable:Boolean,collapseTags:Boolean,multipleLimit:{type:Number,default:0},name:String,autocomplete:{type:String,default:"off"},placeholder:{type:String,default:"请选择"},filterable:Boolean,allowCreate:Boolean,filterMethod:Function,remote:Boolean,remoteMethod:Function,loading:Boolean,loadingText:{type:String,default:"加载中"},noMatchText:{type:String,default:"无匹配数据"},noDataText:{type:String,default:"无数据"},popperClass:String,reserveKeyword:Boolean,defaultFirstOption:Boolean,popperAppendToBody:{type:Boolean,default:!0},automaticDropdown:Boolean,data:Array,dataProp:{type:Object,default:function(){return{label:"label",value:"value",disabled:"disabled"}},validator:function(e){return Object(r.d)(e)}}},data:function(){return{value_:this.value}},computed:{dataProp__:function(){return{label:this.dataProp.label||"label",value:this.dataProp.value||"value",disabled:this.dataProp.disabled||"disabled"}},bind__:function(){return{multiple:this.multiple,disabled:this.disabled,valueKey:this.valueKey,size:this.size,clearable:this.clearable,collapseTags:this.collapseTags,multipleLimit:this.multipleLimit,name:this.name,autocomplete:this.autocomplete,placeholder:this.placeholder,filterable:this.filterable,allowCreate:this.allowCreate,filterMethod:this.filterMethod,remote:this.remote,remoteMethod:this.remoteMethod,loading:this.loading,loadingText:this.loadingText,noMatchText:this.noMatchText,noDataText:this.noDataText,popperClass:this.popperClass,reserveKeyword:this.reserveKeyword,defaultFirstOption:this.defaultFirstOption,popperAppendToBody:this.popperAppendToBody,automaticDropdown:this.automaticDropdown}},data__:function(){var e=this;return(this.data||[]).map(function(t){return{label:t[e.dataProp__.label],value:t[e.dataProp__.value],disabled:!!t[e.dataProp__.disabled]}})}},watch:{value:function(e){this.value_=e},value_:function(e){this.$emit("input",e)}},methods:{focus:function(){this.$refs.select.focus()},blur:function(){this.$refs.select.blur()}}}},function(e,t,n){"use strict";var r=n(3);t.a={name:"JElSelectGroup",props:{value:[String,Number,Array],multiple:Boolean,disabled:Boolean,valueKey:{type:String,default:"value"},size:String,clearable:Boolean,collapseTags:Boolean,multipleLimit:{type:Number,default:0},name:String,autocomplete:{type:String,default:"off"},placeholder:{type:String,default:"请选择"},filterable:Boolean,allowCreate:Boolean,filterMethod:Function,remote:Boolean,remoteMethod:Function,loading:Boolean,loadingText:{type:String,default:"加载中"},noMatchText:{type:String,default:"无匹配数据"},noDataText:{type:String,default:"无数据"},popperClass:String,reserveKeyword:Boolean,defaultFirstOption:Boolean,popperAppendToBody:{type:Boolean,default:!0},automaticDropdown:Boolean,data:Array,dataProp:{type:Object,default:function(){return{groupLabel:"label",groupDisabled:"disabled",groupData:"data",label:"label",value:"value",disabled:"disabled"}},validator:function(e){return Object(r.d)(e)}}},data:function(){return{value_:this.value}},computed:{dataProp__:function(){return{groupLabel:this.dataProp.groupLabel||"label",groupDisabled:this.dataProp.groupDisabled||"disabled",groupData:this.dataProp.groupData||"data",label:this.dataProp.label||"label",value:this.dataProp.value||"value",disabled:this.dataProp.disabled||"disabled"}},bind__:function(){return{multiple:this.multiple,disabled:this.disabled,valueKey:this.valueKey,size:this.size,clearable:this.clearable,collapseTags:this.collapseTags,multipleLimit:this.multipleLimit,name:this.name,autocomplete:this.autocomplete,placeholder:this.placeholder,filterable:this.filterable,allowCreate:this.allowCreate,filterMethod:this.filterMethod,remote:this.remote,remoteMethod:this.remoteMethod,loading:this.loading,loadingText:this.loadingText,noMatchText:this.noMatchText,noDataText:this.noDataText,popperClass:this.popperClass,reserveKeyword:this.reserveKeyword,defaultFirstOption:this.defaultFirstOption,popperAppendToBody:this.popperAppendToBody,automaticDropdown:this.automaticDropdown}},data__:function(){var e=this;return(this.data||[]).map(function(t){return{label:t[e.dataProp__.groupLabel],disabled:!!t[e.dataProp__.groupDisabled],data:(t[e.dataProp__.groupData]||[]).map(function(t){return{label:t[e.dataProp__.label],value:t[e.dataProp__.value],disabled:!!t[e.dataProp__.disabled]}})}})}},watch:{value:function(e){this.value_=e},value_:function(e){this.$emit("input",e)}},methods:{focus:function(){this.$refs.select.focus()},blur:function(){this.$refs.select.blur()}}}},function(e,t,n){"use strict";t.a={name:"JElSelectTree",props:{multiple:Boolean,disabled:Boolean,size:String,clearable:Boolean,collapseTags:Boolean,multipleLimit:{type:Number,default:0},name:String,autocomplete:{type:String,default:"off"},placeholder:{type:String,default:"请选择"},filterable:Boolean,loading:Boolean,loadingText:{type:String,default:"加载中"},popperClass:String,reserveKeyword:Boolean,popperAppendToBody:{type:Boolean,default:!0},automaticDropdown:Boolean,data:[Object,Array],treeData:{type:Array,default:function(){return[]}},emptyText:String,nodeKey:String,props:{type:Object,default:function(){return{label:"label",value:"value",disabled:"disabled",isLeaf:"leaf",children:"children"}}},renderAfterExpand:{type:Boolean,default:!0},load:Function,renderContent:Function,highlightCurrent:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,autoExpandParent:{type:Boolean,default:!0},defaultExpandedKeys:Array,checkStrictly:{type:Boolean,default:!0},filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:16},iconClass:String,lazy:{type:Boolean,default:function(){return!!this.load}}},data:function(){return{data_:this.multiple?[]:{}}},computed:{selectValue__:function(){var e=this;return this.data_?this.multiple?this.data_.map(function(t){return t[e.props.value]}):void 0===this.data_[this.props.value]?"":this.data_[this.props.value]:this.multiple?[]:null},selectOptions__:function(){var e=this;return this.multiple?this.isArray(this.data_)?this.data_.map(function(t){return{label:t[e.props.label],value:t[e.props.value]}}):[]:this.data_?{label:this.data_[this.props.label],value:this.data_[this.props.value]}:null},selectBind__:function(){var e=this;return{multiple:this.multiple,disabled:this.disabled,size:this.size,clearable:this.clearable,collapseTags:this.collapseTags,multipleLimit:this.multipleLimit,name:this.name,autocomplete:this.autocomplete,placeholder:this.placeholder,filterable:this.filterable,filterMethod:function(t){return e.$refs.tree.filter(t)},loading:this.loading,loadingText:this.loadingText,popperClass:this.popperClass,reserveKeyword:this.reserveKeyword,popperAppendToBody:this.popperAppendToBody,automaticDropdown:this.automaticDropdown}},nodeKey__:function(){return this.nodeKey||this.props.value},checkKeys__:function(){var e=this;return this.multiple&&this.data_&&this.isArray(this.data_)?this.data_.map(function(t){return t[e.nodeKey__]}):[]},multipleLimit__:function(){return!!this.multiple&&(!(this.multipleLimit<1)&&(!!this.data_&&this.data_.length>=this.multipleLimit))},treeBind__:function(){var e=this;return{data:this.load?null:this.treeData,emptyText:this.emptyText,nodeKey:this.nodeKey__,props:this.props,renderAfterExpand:this.renderAfterExpand,load:this.load?function(t,n){return e.load(t,function(t){t.forEach(function(t){t.$disabled=!!t[e.props.disabled],e.multipleLimit__&&-1===e.checkKeys__.indexOf(t[e.nodeKey__])?t[e.props.disabled]=!0:t[e.props.disabled]=t.$disabled}),n(t),e.multiple&&!e.checkStrictly&&e.initTag()})}:null,renderContent:this.renderContent,highlightCurrent:this.highlightCurrent,defaultExpandAll:this.defaultExpandAll,expandOnClickNode:this.expandOnClickNode,checkOnClickNode:this.checkOnClickNode,autoExpandParent:this.autoExpandParent,defaultExpandedKeys:this.defaultExpandedKeys,showCheckbox:this.multiple,checkStrictly:this.checkStrictly,defaultCheckedKeys:this.checkKeys__,currentNodeKey:this.multiple?null:this.data_?this.data_[this.nodeKey__]:null,filterNodeMethod:this.filterNodeMethod||function(){return!0},accordion:this.accordion,indent:this.indent,iconClass:this.iconClass,lazy:this.lazy}}},watch:{data:{immediate:!0,handler:function(e){var t=this;this.$refs.tree?this.__init(e):this.$nextTick(function(){return t.__init(e)})}},data_:{handler:function(e){var t=this;JSON.stringify(e)!==JSON.stringify(this.data)&&(this.$emit("update:data",e),this.$emit("input",e?this.multiple?e.map(function(e){return e[t.nodeKey__]}):e[this.nodeKey__]:e))}},multipleLimit__:{immediate:!0,handler:function(e){var t=this;this.$refs.tree?this.__initDisabled(e):this.$nextTick(function(){return t.__initDisabled(e)})}}},methods:{__init:function(e){var t=this;if(!e)return void(this.data_=this.multiple?[]:Object.keys(this.data_).length>0?{}:this.data_);if(this.multiple){var n=this.isArray(e)?e.map(function(e){var n=t.$refs.tree.getNode(e[t.nodeKey__]);return n?n.data:e}):[];if(JSON.stringify(n)===JSON.stringify(this.data_))return;return void(this.data_=n)}if(Object.keys(e).length<1)return void(this.data_=Object.keys(this.data_).length>0?{}:this.data_);var r=this.$refs.tree.getNode(e[this.nodeKey__]);this.data_=r?r.data:e,this.$refs.tree.setCurrentKey(this.data_[this.nodeKey__])},__initDisabled:function(e){var t=this,n=this.$refs.tree.store.nodesMap;Object.keys(n).forEach(function(r){var i=n[r];if(-1!==t.checkKeys__.indexOf(i.data[t.nodeKey__]))return!0;e?(i.data.$disabled=i.data[t.props.disabled],i.data[t.props.disabled]=e):i.data[t.props.disabled]=i.data.$disabled||i.data[t.props.disabled]})},onChange:function(e){this.$emit("change",e)},onVisibleChange:function(e){this.$emit("visible-change",e)},getAllNodes:function(){var e=this.$refs.tree;if(!e)return[];var t=e.store.nodesMap;return Object.keys(t).reduce(function(e,n){return e.push(t[n]),e},[])},getCheckedNodes:function(){return this.getAllNodes().filter(function(e){return!!e.checked})},getUncheckedNodes:function(){return this.getAllNodes().filter(function(e){return!e.checked})},initTag:function(){var e=this,t=this.getCheckedNodes(),n=t.map(function(t){return t.data[e.nodeKey__]}),r=[];this.data_.forEach(function(t){n.includes(t[e.nodeKey__])||r.push(t)}),this.data_=t.map(function(e){return e.data}).concat(r)},onRemoveTag:function(e){var t=this;if(this.$emit("remove-tag",e),this.multiple){this.$refs.tree.setChecked(e,!1,!this.checkStrictly);var n=this.getUncheckedNodes(),r=n.map(function(e){return e.data[t.nodeKey__]}),i=[];this.data_.forEach(function(n){if(n[t.nodeKey__]===e||r.includes(n[t.nodeKey__]))return!0;i.push(n)}),this.data_=i}},onClear:function(){var e=this;if(this.$emit("clear"),this.multiple)return this.data_.forEach(function(t){return e.$refs.tree.setChecked(t[e.nodeKey__],!1,!e.checkStrictly)}),void(this.data_=[]);this.$refs.t