form-create.min.js 89 KB

12
  1. /*! form-create v1.5.4 | github https://github.com/xaboy/form-create | author xaboy */
  2. !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue"),require("iview")):"function"==typeof define&&define.amd?define("formCreate",["vue","iview"],e):"object"==typeof exports?exports.formCreate=e(require("vue"),require("iview")):t.formCreate=e(t.Vue,t.iview)}("undefined"!=typeof self?self:this,function(t,e){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=13)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._toString=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.$nt=function(t){r.default.nextTick(t)},e.$set=o,e.$del=function(t,e){r.default.delete(t,e)},e.toRawType=function(t){return a.call(t).slice(8,-1)},e.isUndef=function(t){return void 0===t||null===t},e.toString=function(t){return null==t?"":"object"===(void 0===t?"undefined":i(t))?JSON.stringify(t,null,2):String(t)},e.extend=function(t,e){for(var n in e)o(t,n,e[n]);return t},e.debounce=function(t,e){var n=null;return function(){for(var i=this,r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];null!==n&&clearTimeout(n),n=setTimeout(function(){return function(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}(this,i),t.apply(void 0,o)}.bind(this),e)}},e.isDate=function(t){return"[object Date]"===a.call(t)},e.isPlainObject=u,e.isFunction=function(t){return"[object Function]"===a.call(t)},e.isString=function(t){return"[object String]"===a.call(t)},e.isBool=function(t){return"[object Boolean]"===a.call(t)},e.toLine=function(t){var e=t.replace(/([A-Z])/g,"-$1").toLowerCase();0===e.indexOf("-")&&(e=e.substr(1));return e},e.isNumeric=function(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)},e.toArray=function(t){return Array.isArray(t)?t:[t]},e.ATS=function(t){return Array.isArray(t)?t[0]||"":t},e.isElement=function(t){return"object"===(void 0===t?"undefined":i(t))&&null!==t&&1===t.nodeType&&!u(t)},e.deepExtend=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i=!1;for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var a=n[r];if((i=Array.isArray(a))||u(a)){var s=void 0===e[r];i?(i=!1,s&&o(e,r,[])):s&&o(e,r,{}),t(e[r],a)}else o(e,r,a)}return e},e.uniqueId=function(){return++s},e.dateFormat=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));for(var i in n)new RegExp("("+i+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?n[i]:("00"+n[i]).substr((""+n[i]).length)));return t},e.errMsg=function(){return"\ngithub:https://github.com/xaboy/form-create\ndocument:http://www.form-create.com"};var r=function(t){return t&&t.__esModule?t:{default:t}}(n(5));function o(t,e,n){r.default.set(t,e,n)}var a=e._toString=Object.prototype.toString;function u(t){return"[object Object]"===a.call(t)}var s=0},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();e.defRule=s,e.parseRule=l,e.parseOn=c,e.parseArray=f,e.parseEmit=h,e.parseEvent=p,e.parseProps=d,e.parseCol=v;var r=n(0),o=n(4);function a(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var u=function(){function t(e,n,i,a,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var s=l(n,e,u);this.rule=s,this.noValue=u,this.type=(0,r.toString)(s.type).toLowerCase(),this.isDef=!0,!s.field&&u?(this.field="tmp"+(0,r.uniqueId)(),this.isDef=!1):this.field=s.field,(0,o.isComponent)(this.type)||s.col.labelWidth||(s.col.labelWidth=1),this.vm=e;var c=(0,r.uniqueId)();this.id=c,this.unique="fc_"+c,this.refName="__"+this.field+c,this.key="key_"+c,this.el={},this.watch=[],this.root=[],this.origin=[],(0,r.isUndef)(s.props.elementId)&&(0,r.$set)(s.props,"elementId",this.unique),this.init(),this.parseValue=this.toFormValue(this.rule.value),this.render=new i(e,this,a)}return i(t,[{key:"init",value:function(){}},{key:"toFormValue",value:function(t){return t}},{key:"toValue",value:function(t){return t}},{key:"setValue",value:function(t){this.rule.value=t,this.vm._changeValue(this.field,t)}},{key:"getValue",value:function(){return this.vm._value(this.field)}},{key:"watchValue",value:function(t){(0,r.$set)(this.rule,"value",t),this.vm._changeFormData(this.field,this.toFormValue(t))}},{key:"watchFormValue",value:function(t){}},{key:"reset",value:function(){this.vm._changeValue(this.field,this.defaultValue)}},{key:"mounted",value:function(){var t=this,e="fItem"+this.refName,n=this.vm,i=this.rule.children;this.el=n.$refs[this.refName],this.defaultValue=this.toValue(n.$refs[e]?n.$refs[e].initialValue:(0,r.deepExtend)({},{value:this.rule.value}).value),Array.isArray(i)&&i.length>0&&i.forEach(function(e){return a(this,t),!(0,r.isString)(e)&&e.__handler__.mounted()}.bind(this))}}]),t}();function s(){return{validate:[],event:{},col:{},emit:[],props:[],on:{},options:[],title:"",value:"",field:"",className:""}}function l(t,e,n){var i=this,o={validate:[],event:{},col:{},emit:[],props:[],on:{},options:[],title:"",value:"",field:"",className:""};Object.keys(o).forEach(function(e){a(this,i),(0,r.isUndef)(t[e])&&(0,r.$set)(t,e,o[e])}.bind(this));var u={col:v(t.col),props:d(t.props),emitEvent:h(t.field,t.emitPrefix,t.emit,e),validate:f(t.validate),options:f(t.options)};return u.event=(0,r.extend)(p(t.event),u.emitEvent),u.on=c(t.on,u.emitEvent),Object.keys(u).forEach(function(e){a(this,i),(0,r.$set)(t,e,u[e])}.bind(this)),t.field||n||console.error("规则的 field 字段不能空"+(0,r.errMsg)()),t}function c(t,e){return Object.keys(e).length>0&&(0,r.extend)(t,e),t}function f(t){return Array.isArray(t)?t:[]}function h(t,e,n,i){var o=this,u={};return Array.isArray(n)?(n.forEach(function(n){a(this,o);var s=(0,r.toLine)(String(t)+"-"+String(n)).replace("_","-"),l=e?(String(e)+"-").toLowerCase()+(0,r.toLine)(n):e;u["on-"+String(n)]=u[n]=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];a(this,o),i.$emit.apply(i,[s].concat(e)),l&&s!==l&&i.$emit.apply(i,[l].concat(e))}.bind(this)}.bind(this)),u):u}function p(t){return Object.keys(t).forEach(function(e){var n=0===(0,r.toString)(e).indexOf("on-")?e:"on-"+String(e);n!==e&&(0,r.$set)(t,n,t[e])}),t}function d(t){return(0,r.isUndef)(t.hidden)&&(0,r.$set)(t,"hidden",!1),(0,r.isUndef)(t.visibility)&&(0,r.$set)(t,"visibility",!1),t}function v(t){return(0,r.isNumeric)(t)?{span:t}:(void 0===t.span&&(0,r.$set)(t,"span",24),t)}e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(0),a=l(n(8)),u=l(n(6)),s=l(n(5));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function f(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var h=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.vm=e,this.handler=n,this.options=i,this.vNode=new a.default(e),this.vData=new u.default,this.cache=null,this.$tickEvent=[],this.init()}return r(t,[{key:"init",value:function(){}},{key:"cacheParse",value:function(t,e){var n=this,i=this.handler,r=i.noValue,a=i.noCache;this.cache&&!0!==r&&!0!==a||(this.cache=e?e.parse.call(this,t):this.parse(t));var u=[].concat(f(this.$tickEvent));return this.$tickEvent=[],u.length&&(0,o.$nt)(function(){c(this,n),u.forEach(function(t){return c(this,n),t()}.bind(this))}.bind(this)),this.cache}},{key:"sync",value:function(t){(0,o.isFunction)(t)&&this.$tickEvent.push(t),this.clearCache(),this.vm._sync()}},{key:"clearCache",value:function(){var t=this;this.cache=null;var e=this.handler.rule.children;Array.isArray(e)&&e.length>0&&e.forEach(function(e){return c(this,t),!(0,o.isString)(e)&&e.__handler__.render.clearCache()}.bind(this))}},{key:"parse",value:function(t){var e=this,n=this.handler,r=n.type,a=n.rule,u=n.refName,l=n.key,h=n.noValue,p=n.origin,d=n.root,v=n.vm;if("template"===a.type){if(void 0!==s.default.compile){(0,o.isUndef)(a.vm)&&(a.vm=new s.default);var y=s.default.compile(a.template,{}).render.call(a.vm);return void 0===y.data&&(y.data={}),(0,o.extend)(y.data,a),y.key=l,[y]}return console.error("使用的 Vue 版本不支持 compile"+(0,o.errMsg)()),[]}if(h){a.ref=u,(0,o.isUndef)(a.key)&&(a.key="def"+(0,o.uniqueId)());var b=this.vNode.make(r,i({},a),function(){c(this,e);var n=[],i=a.children||[];return Array.isArray(i)&&i.length>0&&(n=i.map(function(n){return c(this,e),(0,o.isString)(n)?[n]:(n.__handler__||v._fComponent.createHandler([n],!0),n.__handler__.render.cacheParse(t,this))}.bind(this))),n}.bind(this));return b.key=l,[b]}return p.forEach(function(t){c(this,e),-1===d.indexOf(t)&&v._fComponent.removeField(t.__field__)}.bind(this)),this.handler.origin=[].concat(f(d)),t.makeComponent(this.handler.render)}},{key:"inputProps",value:function(){var t=this,e=this.handler,n=e.refName,i=e.key,r=e.field,a=e.rule,u=a.props,s=a.event,l=this.vData.props(u).props({value:this.vm._formData(r)}).ref(n).key(i+"fc"+r).on(s).on("input",function(e){c(this,t),this.onInput(e)}.bind(this));return(0,o.isUndef)(u.size)&&l.props({size:this.options.form.size}),l}},{key:"onInput",value:function(t){this.vm._changeFormData(this.handler.field,t)}}]),t}();e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();e.baseRule=u,e.creatorFactory=function(t){var e=this;return function(n,i,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a(this,e),new s(t,n,i,r,o)}.bind(this)},e.creatorTypeFactory=function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return function(o,u,l){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};a(this,n);var f=new s(t,o,u,l,c);return(0,r.isFunction)(e)?e(f):f.props(i,e),f}.bind(this)};var r=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(n(6));function a(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function u(){return{event:{},validate:[],options:[],col:{},children:[],emit:[],template:null,emitPrefix:null}}var s=function(t){function e(t,n,i,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var u=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return u.rule=(0,r.extend)({event:{},validate:[],options:[],col:{},children:[],emit:[],template:null,emitPrefix:null},{type:t,title:n,field:i,value:o}),u.props({hidden:!1,visibility:!1}),(0,r.isPlainObject)(a)&&u.props(a),u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),i(e,[{key:"type",value:function(t){return this.props("type",t),this}},{key:"get",value:function(){return this._data}},{key:"getRule",value:function(){return(0,r.extend)(this.rule,this.get())}},{key:"setValue",value:function(t){return(0,r.$set)(this.rule,"value",t),this}}]),e}();e.default=s;["emitPrefix","className","defaultSlot"].forEach(function(t){a(void 0,void 0),s.prototype[t]=function(e){return(0,r.$set)(this.rule,t,e),this}}.bind(void 0));["event","col"].forEach(function(t){a(void 0,void 0),s.prototype[t]=function(e){return(0,r.$set)(this.rule,t,(0,r.extend)(this.rule[t],e)),this}}.bind(void 0));["validate","options","children","emit"].forEach(function(t){a(void 0,void 0),s.prototype[t]=function(e){return Array.isArray(e)||(e=[e]),(0,r.$set)(this.rule,t,this.rule[t].concat(e)),this}}.bind(void 0))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.componentCommon=e.getGlobalApi=e.formCreateStyle=e.iviewConfig=e.iview3=e.iview2=void 0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};e.getComponent=function(t,e,n){var i=(0,r.toString)(e.type).toLowerCase(),o=d(i)?u.default[i]:v();return new o.handler(t,e,o.render,n,o.noValue)},e.isComponent=d,e.getUdfComponent=v,e.getConfig=function(){var t=this;return{el:null,iframeHelper:!1,switchMaker:!0,form:{inline:!1,labelPosition:"right",labelWidth:125,showMessage:!0,autocomplete:"off",size:void 0},row:{gutter:0,type:void 0,align:void 0,justify:void 0,className:void 0},upload:{beforeUpload:function(){c(this,t)}.bind(this),onProgress:function(e,n,i){c(this,t)}.bind(this),onSuccess:function(e,n,i){c(this,t)}.bind(this),onError:function(e,n,i){c(this,t)}.bind(this),onPreview:function(e){c(this,t)}.bind(this),onRemove:function(e,n){c(this,t)}.bind(this),onFormatError:function(e,n){c(this,t)}.bind(this),onExceededSize:function(e,n){c(this,t)}.bind(this),handleIcon:"ios-eye-outline",allowRemove:!0},submitBtn:{type:"primary",size:"large",shape:void 0,long:!0,htmlType:"button",disabled:!1,icon:p.submitBtnIcon,innerText:"提交",loading:!1,show:!0,col:void 0},resetBtn:{type:p.resetBtnType,size:"large",shape:void 0,long:!0,htmlType:"button",disabled:!1,icon:p.resetBtnIcon,innerText:"重置",loading:!1,show:!1,col:void 0},mounted:function(e){c(this,t)}.bind(this),onReload:function(e){c(this,t)}.bind(this),onSubmit:function(e){c(this,t)}.bind(this)}},e.toDefSlot=function(t,e,n){return[t&&(0,r.isFunction)(t)?t.call(n,e):t]},e.timeStampToDate=function(t){if((0,r.isDate)(t))return t;var e=new Date(t);return"Invalid Date"===e.toString()?t:e};var r=n(0),o=l(n(1)),a=l(n(2)),u=l(n(9)),s=l(n(11));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var f=e.iview2={_v:2,resetBtnType:"ghost",resetBtnIcon:"refresh",submitBtnIcon:"ios-upload",fileIcon:"document-text",fileUpIcon:"folder",imgUpIcon:"image"},h=e.iview3={_v:3,resetBtnType:"default",resetBtnIcon:"md-refresh",submitBtnIcon:"ios-share",fileIcon:"md-document",fileUpIcon:"ios-folder-open",imgUpIcon:"md-images"},p=e.iviewConfig=void 0===s.default?f:s.default.version&&3==s.default.version.split(".")[0]?h:f;function d(t){return void 0!==u.default[t]}function v(){return{handler:o.default,render:a.default,noValue:!0}}e.formCreateStyle=".form-create{padding:25px;} .fc-upload-btn,.fc-files{display: inline-block;width: 58px;height: 58px;text-align: center;line-height: 58px;border: 1px solid #c0ccda;border-radius: 4px;overflow: hidden;background: #fff;position: relative;box-shadow: 2px 2px 5px rgba(0,0,0,.1);margin-right: 4px;box-sizing: border-box;}.__fc_h{display:none;}.__fc_v{visibility:hidden;} .fc-files>.ivu-icon{vertical-align: middle;}.fc-files img{width:100%;height:100%;display:inline-block;vertical-align: top;}.fc-upload .ivu-upload{display: inline-block;}.fc-upload-btn{border: 1px dashed #c0ccda;}.fc-upload-btn>ivu-icon{vertical-align:sub;}.fc-upload .fc-upload-cover{opacity: 0; position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.6); transition: opacity .3s;}.fc-upload .fc-upload-cover i{ color: #fff; font-size: 20px; cursor: pointer; margin: 0 2px; }.fc-files:hover .fc-upload-cover{opacity: 1; }.fc-hide-btn .ivu-upload .ivu-upload{display:none;}.fc-upload .ivu-upload-list{margin-top: 0;}.fc-spin-icon-load{animation: ani-fc-spin 1s linear infinite;} @-webkit-keyframes ani-fc-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes ani-fc-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}";e.getGlobalApi=function(t){var e=this,n=this,o=t.vm;return{formData:function(){return c(this,e),o._formField().reduce(function(t,n){return c(this,e),t[n]=o._value(n),t}.bind(this),{})}.bind(this),getValue:function(t){if(c(this,e),t=(0,r.toString)(t),void 0===o._formField(t))throw new Error(String(t)+" 字段不存在!"+(0,r.errMsg)());return o._value(t)}.bind(this),changeValue:function(t,e){this.changeField(t,e)},changeField:function(n,i){c(this,e),n=(0,r.toString)(n);var a=t.handlers[n];if(void 0===a)throw new Error(String(n)+" 字段不存在!"+(0,r.errMsg)());(0,r.isFunction)(i)?i(o._trueData(n),function(t){c(this,e),this.changeField(n,t)}.bind(this)):a.setValue(i)}.bind(this),removeField:function(n){c(this,e);var i=t.handlers[n];if(!i)throw new Error(String(n)+" 字段不存在"+(0,r.errMsg)());var a=i.root.map(function(t){return c(this,e),t.__field__}.bind(this)).indexOf((0,r.toString)(n));if(-1===a)throw new Error(String(n)+" 字段不存在"+(0,r.errMsg)());i.root.splice(a,1),o._refresh()}.bind(this),validate:function(n,i){c(this,e),t.getFormRef().validate(function(t){c(this,e),!0===t?n&&n():i&&i()}.bind(this))}.bind(this),validateField:function(n,i){if(c(this,e),t.notField(n))throw new Error(String(n)+"字段不存在"+(0,r.errMsg)());t.getFormRef().validateField(n,i)}.bind(this),resetFields:function(){var e=this,n=t.handlers;o._formField().forEach(function(t){c(this,e),n[t].reset()}.bind(this)),this.refresh()},destroy:function(){c(this,e),o.$el.parentNode.removeChild(o.$el),o.$destroy()}.bind(this),fields:function(){return c(this,e),o._formField()}.bind(this),append:function(n,i){c(this,e);var o=t.fieldList,a=o.indexOf((0,r.toString)(i));if((0,r.isUndef)(i))a=o.length;else if(-1===a)throw new Error(String(i)+" 字段不存在"+(0,r.errMsg)());t.rules.splice(a,0,n)}.bind(this),prepend:function(n,i){c(this,e);var o=t.fieldList.indexOf((0,r.toString)(i));if((0,r.isUndef)(i))o=0;else{if(-1===o)throw new Error(String(i)+" 字段不存在"+(0,r.errMsg)());o--}t.rules.splice(o,0,n)}.bind(this),submit:function(e,n){var i=this;this.validate(function(){c(this,i);var n=this.formData();(0,r.isFunction)(e)?e(n):t.options.onSubmit&&t.options.onSubmit(n)}.bind(this),function(){return c(this,i),n&&n()}.bind(this))},hidden:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t?Array.isArray(t)||(t=[t]):t=this.fields(),t.forEach(function(t){c(this,e),o.$set(o._trueData(t).rule.props,"hidden",!!n)}.bind(this))},visibility:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t?Array.isArray(t)||(t=[t]):t=this.fields(),t.forEach(function(t){c(this,e),o.$set(o._trueData(t).rule.props,"visibility",!!n)}.bind(this))},model:function(t){var e=this,n={},i=this.fields();return t?Array.isArray(t)||(t=[t]):t=i,t.forEach(function(t){if(c(this,e),-1===i.indexOf(t))return console.error(String(t)+"字段不存在"+(0,r.errMsg)());n[t]=o._trueData(t)}.bind(this)),n},component:function(){return i({},o.components)},bind:function(t){var e=this,n={},i={},a=this.fields();return t?Array.isArray(t)||(t=[t]):t=a,t.forEach(function(t){if(c(this,e),-1===a.indexOf(t))return console.error(String(t)+"字段不存在"+(0,r.errMsg)());var n=o._trueData(t);i[t]={get:function(){return n.value},set:function(t){o.$set(n,"value",t)},enumerable:!0,configurable:!0}}.bind(this)),Object.defineProperties(n,i),n},submitStatus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,e),o._buttonProps(t)}.bind(this),resetStatus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,e),o._resetProps(t)}.bind(this),btn:{loading:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];c(this,n),o._buttonProps({loading:t})}.bind(this),finish:function(){this.loading(!1)},disabled:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];c(this,n),o._buttonProps({disabled:t})}.bind(this)},resetBtn:{loading:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];c(this,n),o._resetProps({loading:t})}.bind(this),finish:function(){this.loading(!1)},disabled:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];c(this,n),o._resetProps({disabled:t})}.bind(this)},closeModal:function(){c(this,n),o.$Modal.remove()}.bind(this),set:function(t,e,i){c(this,n),o.$set(t,e,i)}.bind(this),reload:function(e){return c(this,n),t.reload(e)}.bind(this),options:function(e){c(this,n),(0,r.deepExtend)(t.options,e),o._sync()}.bind(this),onSuccess:function(t){this.onSubmit(t)},onSubmit:function(t){this.options({onSubmit:t})},sync:function(e,i){if(c(this,n),!t.handlers[e])throw new Error(String(e)+"字段不存在"+(0,r.errMsg)());t.handlers[e].render.sync(i)}.bind(this),refresh:function(){c(this,n),o._refresh()}.bind(this)}};e.componentCommon={data:function(){return c(void 0,void 0),{rules:{},components:{},cptData:{},buttonProps:{},resetProps:{},trueData:{},jsonData:{},$f:{},isShow:!0,watchs:[],unique:1}}.bind(void 0),methods:{_formField:function(){return Object.keys(this.trueData)},_changeFormData:function(t,e){-1!==Object.keys(this.cptData).indexOf(t)&&this.$set(this.cptData,t,e)},_changeValue:function(t,e){this.$set(this.trueData[t],"value",e)},_value:function(t){return void 0===this.trueData[t]?void 0:this.trueData[t].value},_trueData:function(t){return this.trueData[t]},_formData:function(t){return this.cptData[t]},_removeField:function(t){(0,r.$del)(this.cptData,t),(0,r.$del)(this.trueData,t),(0,r.$del)(this.jsonData,t),void 0!==this.components[t]&&(0,r.$del)(this.components,t)},_buttonProps:function(t){this.$set(this,"buttonProps",(0,r.deepExtend)(this.buttonProps,t))},_resetProps:function(t){this.$set(this,"resetProps",(0,r.deepExtend)(this.resetProps,t))},init:function(){var t=this,e=this._fComponent._type;this[e].forEach(function(n,i){c(this,t);var r=this.$watch(String(e)+"."+String(i)+".value",function(e){if(c(this,t),void 0===this.trueData[n.field])return r();this._changeValue(n.field,e)}.bind(this));this.watchs.push(r)}.bind(this))},_unWatch:function(){var t=this;this.watchs.forEach(function(e){return c(this,t),e()}.bind(this)),this.watchs=[]},_refresh:function(){this.unique+=1},_sync:function(){this.unique+=1,this._fComponent.fRender.cacheUnique=this.unique},_change:function(t,e){return this.jsonData[t]!==e&&(this.jsonData[t]=e,!0)}}}},function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();e.defVData=a;var r=n(0);function o(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function a(){return{class:{},style:{},attrs:{},props:{},domProps:{},on:{},nativeOn:{},directives:[],scopedSlots:{},slot:void 0,key:void 0,ref:void 0}}var u=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init()}return i(t,[{key:"class",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(0,r.isUndef)(t)?this:(Array.isArray(t)?t.forEach(function(t){o(this,e),(0,r.$set)(this._data.class,(0,r.toString)(t),!0)}.bind(this)):(0,r.isPlainObject)(t)?(0,r.$set)(this._data,"class",(0,r.extend)(this._data.class,t)):(0,r.$set)(this._data.class,(0,r.toString)(t),void 0===n||n),this)}},{key:"directives",value:function(t){return(0,r.isUndef)(t)?this:((0,r.$set)(this._data,"directives",this._data.directives.concat((0,r.toArray)(t))),this)}},{key:"init",value:function(){return this._data={class:{},style:{},attrs:{},props:{},domProps:{},on:{},nativeOn:{},directives:[],scopedSlots:{},slot:void 0,key:void 0,ref:void 0},this}},{key:"get",value:function(){return this._prev=this._data,this.init(),this._prev}}]),t}();e.default=u;["ref","key","slot"].forEach(function(t){o(void 0,void 0),u.prototype[t]=function(e){return(0,r.$set)(this._data,t,e),this}}.bind(void 0)),["scopedSlots","nativeOn","on","domProps","props","attrs","style"].forEach(function(t){o(void 0,void 0),u.prototype[t]=function(e,n){return(0,r.isUndef)(e)?this:((0,r.isPlainObject)(e)?(0,r.$set)(this._data,t,(0,r.extend)(this._data[t],e)):(0,r.$set)(this._data[t],(0,r.toString)(e),n),this)}}.bind(void 0))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();e.margeGlobal=v,e.getRule=y,e.bindHandler=b,e.initStyle=m;var r=n(0),o=n(4),a=f(n(30)),u=f(n(31)),s=n(12),l=f(n(32)),c=f(n(5));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function p(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var d="form-create-style";function v(t){(0,r.isBool)(t.sumbitBtn)&&(0,r.$set)(t,"sumbitBtn",{show:t.sumbitBtn}),(0,r.isBool)(t.resetBtn)&&(0,r.$set)(t,"resetBtn",{show:t.resetBtn});var e=(0,r.deepExtend)((0,o.getConfig)(),t);return(0,r.$set)(e,"el",e.el?(0,r.isElement)(e.el)?e.el:document.querySelector(e.el):window.document.body),e}function y(t){return(0,r.isFunction)(t.getRule)?t.getRule():t}function b(t,e){Object.defineProperties(t,{__field__:{value:e.field,enumerable:!1,configurable:!1},__handler__:{value:e,enumerable:!1,configurable:!1}})}function m(){if(null===document.getElementById(d)){var t=document.createElement("style");t.id=d,t.innerText=o.formCreateStyle,document.getElementsByTagName("head")[0].appendChild(t)}}var g=function(){function t(e){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=v(i),this.rules=Array.isArray(e)?e:[],this.origin=[].concat(p(this.rules)),this.handlers={},this.fRender={},this.formData={},this.validate={},this.trueData={},this.components={},this.fieldList=[],this.switchMaker=this.options.switchMaker,this.id=(0,r.uniqueId)(),m(),this.$tick=(0,r.debounce)(function(t){return h(this,n),t()}.bind(this),150)}return i(t,[{key:"init",value:function(t){this.vm=t,this.createHandler(this.rules),t.$set(t,"cptData",this.formData),t.$set(t,"trueData",this.trueData),t.$set(t,"buttonProps",this.options.submitBtn),t.$set(t,"resetProps",this.options.resetBtn),t.$set(t,"rules",this.rules),t.$set(t,"components",this.components),void 0===this.fCreateApi&&(this.fCreateApi=(0,o.getGlobalApi)(this)),this.fCreateApi.rule=this.rules,this.fRender=new a.default(this)}},{key:"setHandler",value:function(t){var e=t.rule,n=t.field,i=t.isDef;this.handlers[n]=t,!0!==t.noValue?((0,r.$set)(this.formData,n,t.parseValue),(0,r.$set)(this.validate,n,e.validate),(0,r.$set)(this.trueData,n,{value:t.rule.value,rule:e})):!0===i&&(0,r.$set)(this.components,n,e)}},{key:"notField",value:function(t){return void 0===this.handlers[t]}},{key:"createHandler",value:function(t,e){var n=this;t.forEach(function(i,a){if(h(this,n),!e||!(0,r.isString)(i)){if(!i.type)return console.error("未定义生成规则的 type"+(0,r.errMsg)());var u=y(i),s=i.__handler__||(0,o.getComponent)(this.vm,u,this.options),l=s.rule.children;if(!this.notField(s.field))return console.error(String(u.field)+" 字段已存在"+(0,r.errMsg)());this.switchMaker&&(t[a]=u,e||(this.origin[a]=u),i=u),this.setHandler(s),i.__handler__||b(i,s),Array.isArray(l)&&l.length>0&&this.createHandler(l,!0),e||this.fieldList.push(s.field)}}.bind(this)),t.forEach(function(e){h(this,n),e.__handler__.root=t,e.__handler__.origin=[].concat(p(t))}.bind(this))}},{key:"create",value:function(t){var e=(new(t.extend(this.component()))).$mount();return this.options.el.appendChild(e.$el),e}},{key:"mounted",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.vm=t;var i=this.options,o=i.mounted,a=i.onReload;setTimeout(function(){h(this,e),(0,r.$nt)(function(){h(this,e),Object.keys(this.handlers).forEach(function(n){h(this,e);var i=this.handlers[n];void 0!==t._formData(n)&&this.addHandlerWatch(i),i.mounted()}.bind(this)),n&&o&&o(this.fCreateApi),a&&a(this.fCreateApi)}.bind(this))}.bind(this))}},{key:"component",value:function(){return(0,u.default)(this)}},{key:"removeField",value:function(t){var e=this;if(void 0===this.handlers[t])throw new Error(String(t)+"字段不存在"+(0,r.errMsg)());var n=this.handlers[t].watch,i=this.fieldList.indexOf(t);(0,r.$del)(this.handlers,t),(0,r.$del)(this.validate,t),-1!==i&&this.fieldList.splice(i,1),n&&n.forEach(function(t){return h(this,e),t()}.bind(this)),this.vm._removeField(t)}},{key:"addHandlerWatch",value:function(t){var e=this;if(!0!==t.noValue){var n=t.field,i=this.vm,o=i.$watch("cptData."+String(n),function(r){if(h(this,e),void 0!==this.handlers[n]){var a=t.toValue(r),u=JSON.stringify(a);i._change(n,u)&&(t.setValue(a),t.watchFormValue(r))}else o()}.bind(this),{deep:!0}),a=i.$watch("trueData."+String(n)+".value",function(o){if(h(this,e),void 0!==o)if(void 0!==this.handlers[n]){var u=JSON.stringify(o);i._change(n,u)&&(t.watchValue(o),(0,r.$nt)(function(){return h(this,e),t.render.sync()}.bind(this)))}else a()}.bind(this),{deep:!0});t.watch.push(o,a);var u=function(){h(this,e),void 0!==this.handlers[n]&&this.$tick(function(){return h(this,e),t.render.sync()}.bind(this))}.bind(this);Object.keys(i._trueData(n).rule).forEach(function(r){h(this,e),"value"!==r&&t.watch.push(i.$watch("trueData."+String(n)+".rule."+String(r),u,{deep:!0}))}.bind(this))}}},{key:"isNotChange",value:function(t){var e=this;return t.reduce(function(t,n,i){return h(this,e),t&&n===this.origin[i]}.bind(this),!0)&&this.origin.reduce(function(n,i,r){return h(this,e),n&&i===t[r]}.bind(this),!0)}},{key:"reload",value:function(t){var e=this,n=this.vm;if(t){if(this.isNotChange(t))return void this.fCreateApi.refresh();this.origin.length||this.fCreateApi.refresh(),this.origin=[].concat(p(t)),n._unWatch(),Object.keys(this.handlers).forEach(function(t){return h(this,e),this.removeField(t)}.bind(this)),this.constructor(t,this.options),this.init(n),n.init(),(0,r.$nt)(function(){h(this,e),this.mounted(n,!1)}.bind(this))}else this.reload(this.rules);n.$f=this.fCreateApi}},{key:"getFormRef",value:function(){return this.vm.$refs[this.fRender.refName]}}],[{key:"create",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.default,o=new t(e,(0,r.isElement)(n)?{el:n}:n);o.create(i);return o.fCreateApi}},{key:"install",value:function(e){e.prototype.$formCreate=function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.create(n,i,e)},e.prototype.$formCreate.version="1.5.4",e.prototype.$formCreate.maker=l.default,e.component(s.formCreateName,e.extend((0,s.$FormCreate)()))}}]),t}();e.default=g,g.maker=l.default,g.version="1.5.4"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();e.parseVData=o,e.getVNode=a;var r=n(0);function o(t){return(0,r.isString)(t)?t={domProps:{innerHTML:t}}:t&&(0,r.isFunction)(t.get)&&(t=t.get()),t}function a(t){return(0,r.isFunction)(t)?t():t||[]}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.setVm(e)}return i(t,[{key:"setVm",value:function(t){this.vm=t,this.$h=t.$createElement}},{key:"make",value:function(t,e,n){var i=this.$h(t,o(e),a(n));return i.context=this.vm,i}}]),t}();e.default=u;var s={modal:"Modal",progress:"i-progress",button:"i-button",icon:"Icon",span:"span",slider:"Slider",rate:"Rate",upload:"Upload",cascader:"Cascader",colorPicker:"Color-Picker",timePicker:"Time-Picker",datePicker:"Date-Picker",switch:"i-switch",option:"i-option",select:"i-select",checkbox:"Checkbox",checkboxGroup:"Checkbox-Group",radio:"Radio",radioGroup:"Radio-Group",inputNumber:"Input-Number",input:"i-input",formItem:"Form-Item",form:"i-form",col:"i-col",row:"row",tree:"Tree",AutoComplete:"AutoComplete"};Object.keys(s).forEach(function(t){!function(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}(void 0,void 0),u.prototype[t]=function(e,n){return this.make(s[t],e,n)}}.bind(void 0))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=_(n(14)),r=_(n(15)),o=_(n(16)),a=_(n(17)),u=_(n(18)),s=_(n(19)),l=_(n(20)),c=_(n(21)),f=_(n(22)),h=_(n(23)),p=_(n(10)),d=_(n(24)),v=_(n(25)),y=_(n(26)),b=_(n(27)),m=_(n(28)),g=_(n(29));function _(t){return t&&t.__esModule?t:{default:t}}var w={hidden:i.default,input:r.default,radio:o.default,checkbox:a.default,switch:u.default,select:s.default,datepicker:l.default,timepicker:c.default,inputnumber:f.default,colorpicker:h.default,upload:p.default,cascader:d.default,rate:v.default,slider:y.default,frame:b.default,tree:m.default,autocomplete:g.default};e.default=w},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0};e.getFileName=y,e.parseValue=b;var a=f(n(1)),u=f(n(2)),s=n(0),l=n(4),c=n(3);function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function y(t){return(0,s.toString)(t).split("/").pop()}function b(t){return Array.isArray(t)?t:t?[t]:[]}var m=function(t){function e(){return p(this,e),d(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return v(e,a.default),r(e,[{key:"init",value:function(){var t=this.rule.props;(0,s.$set)(t,"defaultFileList",[]),(0,s.isUndef)(t.showUploadList)&&(0,s.$set)(t,"showUploadList",!1),(0,s.isUndef)(t.uploadType)&&(0,s.$set)(t,"uploadType","file"),void 0===t.maxLength&&(0,s.$set)(t,"maxLength",0),void 0===t.action&&(0,s.$set)(t,"action",""),"file"===t.uploadType&&void 0===t.handleIcon&&(0,s.$set)(t,"handleIcon",!1),(0,s.$set)(this.rule,"value",b(this.rule.value)),this.parseValue=[]}},{key:"toFormValue",value:function(t){var e=this,n=b(t);return this.parseValue.splice(0,this.parseValue.length),n.forEach(function(t){return h(this,e),this.push(t)}.bind(this)),(0,s.$set)(this.rule.props,"defaultFileList",this.parseValue),this.parseValue}},{key:"mounted",value:function(){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"mounted",this).call(this),(0,s.$set)(this.rule.props,"defaultFileList",this.parseValue),this.changeParseValue(this.el.fileList)}},{key:"push",value:function(t){this.parseValue.push({url:t,name:y(t)})}},{key:"toValue",value:function(t){var e=this;if((0,s.isUndef)(t))return[];var n=t.map(function(t){return h(this,e),t.url}.bind(this)).filter(function(t){return h(this,e),void 0!==t}.bind(this));return 1===this.rule.props.maxLength?n[0]||"":n}},{key:"changeParseValue",value:function(t){this.parseValue=t,this.vm._changeFormData(this.field,t)}},{key:"watchValue",value:function(t){var n=this,i=!0;this.rule.props.defaultFileList.forEach(function(t){h(this,n),i=i&&(void 0===t.percentage||"finished"===t.status)}.bind(this)),i&&o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"watchValue",this).call(this,t)}}]),e}(),g=function(t){function e(){return p(this,e),d(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return v(e,u.default),r(e,[{key:"init",value:function(){var t=this,e=this.handler;this.uploadOptions=(0,s.extend)(i({},this.options.upload),this.handler.rule.props),this.issetIcon=this.uploadOptions.allowRemove||this.uploadOptions.handleIcon,this.propsData=this.vData.props(this.uploadOptions).props("onSuccess",function(){return h(this,t),this.onSuccess.apply(this,arguments)}.bind(this)).props("onRemove",function(){return h(this,t),this.onRemove.apply(this,arguments)}.bind(this)).ref(e.refName).key("fip"+String(e.unique)).get()}},{key:"onRemove",value:function(){var t;this.handler.changeParseValue(this.handler.el.fileList),this.uploadOptions.onRemove&&(t=this.uploadOptions).onRemove.apply(t,arguments),this.sync()}},{key:"onSuccess",value:function(t,e,n){var i=this.uploadOptions.onSuccess.call(null,t,e,n);if((0,s.isUndef)(i)){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}else e.url=i,e.showProgress=!1;this.handler.changeParseValue(this.handler.el.fileList)}},{key:"defaultOnHandle",value:function(t){var e=this;this.vm.$Modal.remove(),setTimeout(function(){h(this,e),this.vm.$Modal.info({title:"预览",render:function(n){return h(this,e),n("img",{attrs:{src:t},style:"width: 100%",key:"ifmd"+(0,s.uniqueId)()})}.bind(this),showCancel:!0,closable:!0,scrollable:!0})}.bind(this),301)}},{key:"onHandle",value:function(t){var e=this.uploadOptions.onHandle;if(e)return e(t);this.defaultOnHandle(t)}},{key:"parse",value:function(){var t=this,e=this.handler,n=e.unique,i=e.field;this.init(),!0===this.uploadOptions.handleIcon&&(this.uploadOptions.handleIcon="ios-eye-outline");var r=this.vm._formData(i),o=this.uploadOptions.showUploadList?[]:[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(r.map(function(e,i){return h(this,t),e.showProgress?this.makeProgress(e,"uppg"+String(i)+String(n)):void 0===e.status||"finished"===e.status?this.makeUploadView(e.url,"upview"+String(i)+String(n),i):void 0}.bind(this)))),a=!this.uploadOptions.maxLength||this.uploadOptions.maxLength>r.length;return o.push(this.makeUploadBtn(n,a)),[this.vNode.make("div",{key:"div4"+String(n),class:{"fc-upload":!0,"fc-hide-btn":!a}},o)]}},{key:"cacheParse",value:function(t){return this.cache=null,o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"cacheParse",this).call(this,t)}},{key:"makeUploadView",value:function(t,e,n){var i=this;return this.vNode.make("div",{key:"div1"+String(e),class:{"fc-files":!0}},function(){h(this,i);var r=[];return"image"===this.handler.rule.props.uploadType?r.push(this.vNode.make("img",{key:"img"+String(e),attrs:{src:t}})):r.push(this.vNode.icon({key:"file"+String(e),props:{type:l.iviewConfig.fileIcon,size:40}})),this.issetIcon&&r.push(this.makeIcons(t,e,n)),r}.bind(this))}},{key:"makeIcons",value:function(t,e,n){var i=this;return this.vNode.make("div",{key:"div2"+String(e),class:{"fc-upload-cover":!0}},function(){h(this,i);var r=[];return this.uploadOptions.handleIcon&&r.push(this.makeHandleIcon(t,e,n)),!0===this.uploadOptions.allowRemove&&r.push(this.makeRemoveIcon(t,e,n)),r}.bind(this))}},{key:"makeProgress",value:function(t,e){return this.vNode.make("div",{key:"div3"+String(e),class:{"fc-files":!0}},[this.vNode.progress({key:"upp"+String(e),props:{percent:t.percentage,hideInfo:!0},style:{width:"90%"}})])}},{key:"makeUploadBtn",value:function(t,e){return this.vNode.upload(this.propsData,!0===e?[this.vNode.make("div",{key:"div5"+String(t),class:{"fc-upload-btn":!0}},[this.vNode.icon({key:"upi"+String(t),props:{type:"file"===this.handler.rule.props.uploadType?"ios-cloud-upload-outline":l.iviewConfig.imgUpIcon,size:20}})])]:[])}},{key:"makeRemoveIcon",value:function(t,e,n){var i=this;return this.vNode.icon({key:"upri"+String(e)+String(n),props:{type:"ios-trash-outline"},nativeOn:{click:function(){h(this,i);var t=this.handler.el.fileList,e=t[n];t.splice(n,1),this.onRemove(e,t)}.bind(this)}})}},{key:"makeHandleIcon",value:function(t,e,n){var i=this;return this.vNode.icon({key:"uphi"+String(e)+String(n),props:{type:(0,s.toString)(this.uploadOptions.handleIcon)},nativeOn:{click:function(){h(this,i),this.onHandle(t)}.bind(this)}})}}]),e}(),_={image:["image",0],file:["file",0],uploadFileOne:["file",1],uploadImageOne:["image",1]},w=Object.keys(_).reduce(function(t,e){return h(void 0,void 0),t[e]=(0,c.creatorTypeFactory)("upload",function(t){return h(void 0,void 0),t.props({uploadType:_[e][0],maxLength:_[e][1]})}.bind(void 0)),t}.bind(void 0),{});w.uploadImage=w.image,w.uploadFile=w.file,e.default={handler:m,render:g,maker:w,name:"upload"}},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formCreateName=e.$FormCreate=void 0;var i=function(t){return t&&t.__esModule?t:{default:t}}(n(7)),r=n(4);function o(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var a=function(){return o(void 0,void 0),{name:"FormCreate",props:{rule:{type:Array,required:!0,default:function(){return o(void 0,void 0),{}}.bind(void 0)},option:{type:Object,default:function(){return o(void 0,void 0),{}}.bind(void 0),required:!1},value:Object},data:r.componentCommon.data,methods:r.componentCommon.methods,render:function(){return this._fComponent.fRender.render(this._fComponent.vm)},created:function(){this._fComponent=new i.default(this.rule,this.option),this._fComponent._type="rule",this._fComponent.init(this),this.$emit("input",this._fComponent.fCreateApi)},mounted:function(){var t=this;this._fComponent.mounted(this),this.$f=this._fComponent.fCreateApi,this.$watch("rule",function(e){o(this,t),this._fComponent.reload(e),this.$emit("input",this.$f)}.bind(this)),this.$emit("input",this.$f),this.init()}}}.bind(void 0);e.$FormCreate=a,e.formCreateName="FormCreate"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.install=r;var i=function(t){return t&&t.__esModule?t:{default:t}}(n(7));function r(t){!0!==t._installedFormCreate&&(t._installedFormCreate=!0,t.use(i.default))}"undefined"!=typeof window&&window.Vue&&r(Vue),t.exports.default=t.exports=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=u(n(1)),o=u(n(2)),a=n(3);function u(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return c(e,r.default),e}(),h=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return c(e,o.default),i(e,[{key:"parse",value:function(){return[]}}]),e}(),p=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},"hidden",function(t,e){return function(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}(void 0,void 0),(0,a.creatorFactory)("hidden")("",t,e)}.bind(void 0));e.default={handler:f,render:h,name:"hidden",maker:p}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.render=e.handler=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=s(n(1)),o=s(n(2)),a=n(3),u=n(0);function s(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=e.handler=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,r.default),i(e,[{key:"init",value:function(){var t=this.rule.props;t.autosize&&t.autosize.minRows&&(0,u.$set)(t,"rows",t.autosize.minRows||2)}},{key:"toFormValue",value:function(t){return(0,u.toString)(t)}}]),e}(),p=e.render=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,o.default),i(e,[{key:"parse",value:function(){return[this.vNode.input(this.inputProps().get())]}}]),e}(),d=["password","url","email","text"].reduce(function(t,e){return function(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}(void 0,void 0),t[e]=(0,a.creatorTypeFactory)("input",e),t}.bind(void 0),{});d.idate=(0,a.creatorTypeFactory)("input","date"),e.default={render:p,handler:h,name:"input",maker:d}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=u(n(1)),a=u(n(2));n(0);function u(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,o.default),r(e,[{key:"toFormValue",value:function(t){var e=this;return this.rule.options.filter(function(n){return s(this,e),n.value===t}.bind(this)).reduce(function(t,n){return s(this,e),n.label}.bind(this),"")}},{key:"toValue",value:function(t){var e=this;return this.rule.options.filter(function(n){return s(this,e),n.label===t}.bind(this)).reduce(function(t,n){return s(this,e),n.value}.bind(this),"")}}]),e}(),p=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,a.default),r(e,[{key:"parse",value:function(){var t=this,e=this.handler,n=e.unique,r=e.rule.options;return[this.vNode.radioGroup(this.inputProps().get(),function(){return s(this,t),r.map(function(e,r){s(this,t);var o=i({},e);return delete o.value,this.vNode.radio({props:o,key:"ropt"+String(r)+String(n)})}.bind(this))}.bind(this))]}}]),e}();e.default={handler:h,render:p,name:"radio"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=u(n(1)),a=u(n(2));n(0);function u(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,o.default),r(e,[{key:"toFormValue",value:function(t){var e=this;return t?Array.isArray(t)||(t=[t]):t=[],this.rule.options.filter(function(n){return s(this,e),-1!==t.indexOf(n.value)}.bind(this)).map(function(t){return s(this,e),t.label}.bind(this))}},{key:"toValue",value:function(t){var e=this,n=this.rule.options.filter(function(n){return s(this,e),-1!==t.indexOf(n.label)}.bind(this)).map(function(t){return s(this,e),t.value}.bind(this));return 1===this.rule.options.length?void 0===n[0]?"":n[0]:n}},{key:"watchFormValue",value:function(t){(function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"watchFormValue",this).call(this,t),this.render.sync()}}]),e}(),p=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,a.default),r(e,[{key:"parse",value:function(){var t=this,e=this.handler,n=e.unique,r=e.rule.options,o=e.key;return[this.vNode.checkboxGroup(this.inputProps().key(o).get(),function(){return s(this,t),r.map(function(e,r){s(this,t);var o=i({},e);return delete o.value,this.vNode.checkbox({props:o,key:"copt"+String(r)+String(n)})}.bind(this))}.bind(this))]}}]),e}();e.default={handler:h,render:p,name:"checkbox"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=u(n(1)),o=u(n(2)),a=n(0);function u(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,r.default),i(e,[{key:"init",value:function(){void 0===this.rule.slot&&(0,a.$set)(this.rule,"slot",{})}}]),e}(),p=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,o.default),i(e,[{key:"parse",value:function(){var t=this,e=this.handler.rule,n=(0,a.isUndef)(e.props.slot)?e.slot:e.props.slot;return[this.vNode.switch(this.inputProps().scopedSlots({open:function(){return s(this,t),n.open}.bind(this),close:function(){return s(this,t),n.close}.bind(this)}).style({margin:"4.5px 0px"}).get())]}}]),e}();e.default={handler:h,render:p,name:"switch"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=s(n(1)),o=s(n(2)),a=n(3),u=n(4);function s(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var p=function(t){function e(){return c(this,e),f(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,r.default),i(e,[{key:"toFormValue",value:function(t){var e=Array.isArray(t);return!0===this.rule.props.multiple?!0===e?t:[t]:!0===e?t[0]||"":t}}]),e}(),d=function(t){function e(){return c(this,e),f(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,o.default),i(e,[{key:"parse",value:function(){var t=this,e=this.handler,n=e.unique,i=e.rule;return[this.vNode.select(this.inputProps().get(),function(){return l(this,t),i.options.map(function(e,r){return l(this,t),this.vNode.option({props:e,key:"sopt"+String(r)+String(n)},(0,u.toDefSlot)(e.slot,this.vm.$createElement,i))}.bind(this))}.bind(this))]}}]),e}(),v={selectMultiple:(0,a.creatorTypeFactory)("select",!0,"multiple"),selectOne:(0,a.creatorTypeFactory)("select",!1,"multiple")};e.default={handler:p,render:d,name:"select",maker:v}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=l(n(1)),o=l(n(2)),a=n(4),u=n(3),s=n(0);function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var d=function(t){function e(){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,r.default),i(e,[{key:"init",value:function(){var t=this.rule.props;(0,s.$set)(t,"type",t.type?(0,s.toString)(t.type).toLowerCase():"date"),(0,s.isUndef)(t.startDate)&&(0,s.$set)(t,"startDate",(0,a.timeStampToDate)(t.startDate))}},{key:"toFormValue",value:function(t){var e=this,n=Array.isArray(t),i=this.rule.props,r=void 0;return r=-1!==["daterange","datetimerange"].indexOf(i.type)?n?t.map(function(t){return c(this,e),t?(0,a.timeStampToDate)(t):""}.bind(this)):["",""]:"date"===i.type&&!0===i.multiple?(0,s.toString)(t):(r=n?t[0]||"":t)?(0,a.timeStampToDate)(r):""}},{key:"toValue",value:function(){return this.el.publicStringValue}},{key:"mounted",value:function(){(function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"mounted",this).call(this),this.rule.value=this.el.publicStringValue,this.vm._changeFormData(this.field,this.toFormValue(this.el.publicStringValue))}}]),e}(),v=function(t){function e(){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,o.default),i(e,[{key:"parse",value:function(){var t=this.handler,e=t.key,n=t.rule,i=t.vm;return[this.vNode.datePicker(this.inputProps().key(e).get(),(0,a.toDefSlot)(n.defaultSlot,i.$createElement,n))]}}]),e}(),y=["date","dateRange","dateTime","dateTimeRange","year","month"].reduce(function(t,e){return c(void 0,void 0),t[e]=(0,u.creatorTypeFactory)("datePicker",e.toLowerCase()),t}.bind(void 0),{});e.default={handler:d,render:v,name:"datePicker",maker:y}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();e.getTime=d;var r=l(n(1)),o=l(n(2)),a=n(0),u=n(4),s=n(3);function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var p="timePicker";function d(t){return(0,a.isDate)(t)?(0,a.dateFormat)("hh:mm:ss",t):t}var v=function(t){function e(){return c(this,e),f(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,r.default),i(e,[{key:"init",value:function(){var t=this.rule.props;t.type||(0,a.$set)(t,"type","time"),(0,a.isUndef)(t.confirm)&&(0,a.$set)(t,"confirm",!0)}},{key:"toFormValue",value:function(t){var e=this,n=void 0,i=Array.isArray(t);return"timerange"===this.rule.props.type?n=i?t.map(function(t){return function(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}(this,e),t?d((0,u.timeStampToDate)(t)):""}.bind(this)):["",""]:(i&&(t=t[0]),n=t?d((0,u.timeStampToDate)(t)):""),n}},{key:"mounted",value:function(){(function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"mounted",this).call(this),this.rule.value=this.el.publicStringValue,this.vm._changeFormData(this.field,this.toFormValue(this.el.publicStringValue))}}]),e}(),y=function(t){function e(){return c(this,e),f(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,o.default),i(e,[{key:"parse",value:function(){var t=this.handler,e=t.key,n=t.rule,i=t.vm;return[this.vNode.timePicker(this.inputProps().key(e).get(),(0,u.toDefSlot)(n.defaultSlot,i.$createElement,n))]}}]),e}(),b={time:(0,s.creatorTypeFactory)(p,"time"),timeRange:(0,s.creatorTypeFactory)(p,"timerange")};e.default={handler:v,render:y,maker:b,name:p}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=u(n(1)),o=u(n(2)),a=n(3);function u(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return c(e,r.default),i(e,[{key:"toFormValue",value:function(t){var e=parseFloat(t);return Number.isNaN(e)&&(e=0),e}}]),e}(),h=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return c(e,o.default),i(e,[{key:"parse",value:function(){return[this.vNode.inputNumber(this.inputProps().get())]}}]),e}(),p={number:(0,a.creatorFactory)("inputNumber")};e.default={handler:f,render:h,name:"inputNumber",maker:p}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=u(n(1)),o=u(n(2)),a=n(3);function u(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return c(e,r.default),i(e,[{key:"watchFormValue",value:function(t){(function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"watchFormValue",this).call(this,t),this.render.sync()}}]),e}(),h=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return c(e,o.default),i(e,[{key:"parse",value:function(){return[this.vNode.colorPicker(this.inputProps().key(this.handler.key).get())]}}]),e}(),p={color:(0,a.creatorFactory)("colorPicker")};e.default={handler:f,render:h,name:"colorPicker",maker:p}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=u(n(1)),o=u(n(2)),a=n(0);function u(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return c(e,r.default),i(e,[{key:"init",value:function(){var t=this.rule;t.props.data||(0,a.$set)(t.props,"data",[]),Array.isArray(this.rule.value)||(0,a.$set)(t,"value",[])}},{key:"toFormValue",value:function(t){return Array.isArray(t)?t:[]}},{key:"mounted",value:function(){(function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"mounted",this).call(this),this.vm._changeFormData(this.field,this.toFormValue(this.el.value))}}]),e}(),h=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return c(e,o.default),i(e,[{key:"parse",value:function(){return[this.vNode.cascader(this.inputProps().get())]}}]),e}();e.default={handler:f,render:h,name:"cascader"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=a(n(1)),o=a(n(2));function a(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var c=function(t){function e(){return u(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,r.default),i(e,[{key:"toFormValue",value:function(t){var e=parseFloat(t);return Number.isNaN(e)&&(e=0),e}}]),e}(),f=function(t){function e(){return u(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,o.default),i(e,[{key:"parse",value:function(){return[this.vNode.rate(this.inputProps().get())]}}]),e}();e.default={handler:c,render:f,name:"rate"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=s(n(1)),o=s(n(2)),a=n(3),u=n(0);function s(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,r.default),i(e,[{key:"init",value:function(){var t=this.rule;(0,u.$set)(t.props,"min",void 0===t.props.min?0:parseFloat(t.props.min)||0)}},{key:"toFormValue",value:function(t){var e=this.rule,n=Array.isArray(t),i=e.props,r=i.min;return!0===i.range?n?t:[r,parseFloat(t)||r]:n?parseFloat(t[0])||r:parseFloat(t)}}]),e}(),p=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,o.default),i(e,[{key:"parse",value:function(){return[this.vNode.slider(this.inputProps().get())]}}]),e}(),d={sliderRange:(0,a.creatorTypeFactory)("slider",!0,"range")};e.default={handler:h,render:p,name:"slider",maker:d}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0};e.parseRule=b;var o=h(n(1)),a=h(n(2)),u=n(0),s=h(n(10)),l=n(4),c=n(3),f=h(n(11));function h(t){return t&&t.__esModule?t:{default:t}}function p(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function b(t){var e=t.props;e.type||(0,u.$set)(e,"type","input"),e.icon||(0,u.$set)(e,"icon",l.iviewConfig.fileUpIcon),e.width||(0,u.$set)(e,"width","500px"),e.height||(0,u.$set)(e,"height","370px"),(0,u.isUndef)(e.spin)&&(0,u.$set)(e,"spin",!0),e.title||(0,u.$set)(e,"title","请选择"+t.title),e.maxLength||(0,u.$set)(e,"maxLength",0);var n=e.handleIcon;n=("file"!==e.type||void 0!==e.handleIcon)&&(!0===e.handleIcon||void 0===e.handleIcon?"ios-eye-outline":e.handleIcon),(0,u.$set)(e,"handleIcon",n),void 0===e.allowRemove&&(0,u.$set)(e,"allowRemove",!0)}var m=function(t){function e(){return d(this,e),v(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return y(e,o.default),i(e,[{key:"init",value:function(){b(this.rule),this.multiple=1!=this.rule.props.maxLength}},{key:"toFormValue",value:function(t){var e=void 0,n=t,i=Array.isArray(n);return e=""===n?[]:i?n:[n],this.parseValue=e,e}},{key:"toValue",value:function(t){return!0===this.multiple?t:void 0===t[0]?"":t[0]}},{key:"watchValue",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"watchValue",this).call(this,t),this.render.onChange(t),this.render.sync()}},{key:"watchFormValue",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"watchFormValue",this).call(this,t),this.parseValue=t,this.render.sync()}}]),e}(),g={onOpen:"on-open",onChange:"on-change",onCancel:"on-cancel",onOk:"on-ok"},_=function(t){function e(){return d(this,e),v(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return y(e,a.default),i(e,[{key:"init",value:function(){this._props=this.handler.rule.props,this.issetIcon=!1!==this._props.handleIcon||!0===this._props.allowRemove}},{key:"parse",value:function(){var t=this._props.type;return"image"===t?this.makeGroup(this.makeImage()):"file"===t?this.makeGroup(this.makeFile()):this.makeInput()}},{key:"makeInput",value:function(t){var e=this,n=this.handler.unique,i=this.inputProps().props({type:"text",value:this.handler.parseValue.toString(),icon:this._props.icon,readonly:!0,clearable:!0}).on("on-click",function(){p(this,e),this.showModel()}.bind(this)).key("ifit"+n).style({display:!0===t?"none":"inline-block"}).get();return[this.vNode.input(i)]}},{key:"makeGroup",value:function(t){var e=this.handler.unique,n=this.handler.field;return[this.vNode.make("div",{key:"ifgp1"+String(e),class:{"fc-upload fc-frame":!0},ref:this.handler.refName,props:{value:this.vm._formData(n)}},t),this.makeInput(!0)]}},{key:"makeImage",value:function(){var t=this,e=this.handler.unique,n=this.handler.parseValue.map(function(n,i){return p(this,t),this.vNode.make("div",{key:"ifid1"+String(e)+String(i),class:{"fc-files":!0}},[this.vNode.make("img",{key:"ifim"+String(e)+String(i),attrs:{src:n}}),this.makeIcons(n,e,i)])}.bind(this));return n.push(this.makeBtn()),n}},{key:"makeFile",value:function(){var t=this,e=this.handler.unique,n=this.handler.parseValue.map(function(n,i){return p(this,t),this.vNode.make("div",{key:"iffd2"+String(e)+String(i),class:{"fc-files":!0}},[this.vNode.icon({key:"iff"+String(e)+String(i),props:{type:l.iviewConfig.fileIcon,size:40}}),this.makeIcons(n,e,i)])}.bind(this));return n.push(this.makeBtn()),n}},{key:"makeBtn",value:function(){var t=this,e=this.handler.rule.props;if(!(e.maxLength>0&&this.handler.parseValue.length>=e.maxLength)){var n=this.handler.unique;return this.vNode.make("div",{key:"ifbd3"+String(n),class:{"fc-upload-btn":!0},on:{click:function(){p(this,t),this.showModel()}.bind(this)}},[this.vNode.icon({key:"ifbi3"+String(n),props:{type:this._props.icon,size:20}})])}}},{key:"makeSpin",value:function(){if(!0===this._props.spin){var t=this.handler.unique;return this.vNode.make("Spin",{props:{fix:!0},key:"ifsp"+t,class:{"fc-spin":!0}},[this.vNode.icon({props:{type:"load-c",size:18},class:{"fc-spin-icon-load":!0},key:"ifspi"+t}),this.vNode.make("div",{domProps:{innerHTML:"加载中..."},key:"ifspd"+t})])}}},{key:"makeIcons",value:function(t,e,n){var i=this;if(!0===this.issetIcon)return this.vNode.make("div",{key:"ifis"+String(e)+String(n),class:{"fc-upload-cover":!0}},function(){p(this,i);var r=[];return!1!==this._props.handleIcon&&r.push(this.makeHandleIcon(t,e,n)),!0===this._props.allowRemove&&r.push(this.makeRemoveIcon(t,e,n)),r}.bind(this))}},{key:"makeRemoveIcon",value:function(t,e,n){var i=this;return this.vNode.icon({key:"ifri"+String(e)+String(n),props:{type:"ios-trash-outline"},nativeOn:{click:function(){p(this,i),!1!==this.onRemove(t)&&(this.handler.parseValue.splice(n,1),this.sync())}.bind(this)}})}},{key:"makeHandleIcon",value:function(t,e,n){var i=this,r=this._props;return this.vNode.icon({key:"ifhi"+String(e)+String(n),props:{type:toString(r.handleIcon)},nativeOn:{click:function(){p(this,i),this.onHandle(t)}.bind(this)}})}},{key:"onRemove",value:function(t){var e=this.handler.rule.event["on-remove"];if(e)return e(t,this.handler.getValue())}},{key:"onHandle",value:function(t){var e=this.handler.rule.event["on-handle"];if(e)return e(t);this.defaultOnHandle(t)}},{key:"valid",value:function(t){if(t!==this.handler.field)throw new Error("无效的表单字段"+(0,u.errMsg)())}},{key:"showModel",value:function(){var t=this,e=!1!==this.onOpen(),n=this._props,i=n.width,r=n.height,o=n.src,a=n.title;e&&(this.vm.$Modal.remove(),setTimeout(function(){p(this,t),this.vm.$Modal.confirm({title:a,render:function(){return p(this,t),[this.makeSpin(),this.vNode.make("iframe",{attrs:{src:o},style:{height:r,border:"0 none",width:"100%"},on:{load:function(e){if(p(this,t),!0===this._props.spin){var n=document.getElementsByClassName("fc-spin")[0];n&&n.parentNode.removeChild(n)}try{if(!0===this.options.iframeHelper){var i=e.path[0].contentWindow;i[String(this.handler.field)+"_change"]=function(e){p(this,t),this.handler.setValue(e)}.bind(this),i.form_create_helper={close:function(e){p(this,t),this.valid(e),f.default.Modal.remove()}.bind(this),set:function(e,n){p(this,t),this.valid(e),i[String(e)+"_change"](n)}.bind(this),get:function(e){return p(this,t),this.valid(e),this.handler.rule.value}.bind(this)}}}catch(e){}}.bind(this)},key:"ifmd"+(0,u.uniqueId)()})]}.bind(this),onOk:function(){return p(this,t),this.onOk()}.bind(this),onCancel:function(){return p(this,t),this.onCancel()}.bind(this),showCancel:!0,closable:!0,scrollable:!0,width:i})}.bind(this),301))}}]),e}();_.prototype.defaultOnHandle=s.default.render.prototype.defaultOnHandle,Object.keys(g).forEach(function(t){p(void 0,void 0),_.prototype[t]=function(){var e=this.handler.rule.event[g[t]];if(e)return e(this.handler.getValue())}}.bind(void 0));var w={frameInputs:["input",0],frameFiles:["file",0],frameImages:["image",0],frameInputOne:["input",1],frameFileOne:["file",1],frameImageOne:["image",1]},k=Object.keys(w).reduce(function(t,e){return p(void 0,void 0),t[e]=(0,c.creatorTypeFactory)("frame",function(t){return p(void 0,void 0),t.props({type:w[e][0],maxLength:w[e][1]})}.bind(void 0)),t}.bind(void 0),{});k.frameInput=k.frameInputs,k.frameFile=k.frameFiles,k.frameImage=k.frameImages,e.default={handler:m,render:_,name:"frame",maker:k}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();e.parseRule=d,e.isMultiple=v;var r=s(n(1)),o=s(n(2)),a=n(0),u=n(3);function s(t){return t&&t.__esModule?t:{default:t}}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function d(t){var e=t.props;return void 0===e.data&&(0,a.$set)(e,"data",[]),void 0===e.type&&(0,a.$set)(e,"type","checked"),void 0===e.multiple&&(0,a.$set)(e,"multiple",!1),t}function v(t){return!t.props.multiple&&"selected"===t.props.type}var y=function(t){function e(){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,r.default),i(e,[{key:"init",value:function(){d(this.rule),this._data={},this.data(this.rule.props.data),(0,a.$set)(this.rule,"value",this._parseValue())}},{key:"_parseValue",value:function(){var t=this;this.rule.value.forEach("selected"===this.rule.props.type?function(e){return c(this,t),this.selected(e)}.bind(this):function(e){return c(this,t),this.checked(e)}.bind(this));var e=[];return"selected"===this.rule.props.type?Object.keys(this._data).forEach(function(n){c(this,t);var i=this._data[n];!0===i.selected&&e.push(i.id)}.bind(this)):Object.keys(this._data).forEach(function(n){c(this,t);var i=this._data[n];!0===i.checked&&e.push(i.id)}.bind(this)),e}},{key:"toFormValue",value:function(t){return t=(0,a.toArray)(t),this.choose(t),this.parseValue=t,t}},{key:"choose",value:function(t){var e=this,n=this.rule,i=this._data;"selected"===n.props.type?Object.keys(i).forEach(function(n){c(this,e),(0,a.$set)(i[n],"selected",-1!==t.indexOf(i[n].id))}.bind(this)):Object.keys(i).forEach(function(n){c(this,e),(0,a.$set)(i[n],"checked",-1!==t.indexOf(i[n].id))}.bind(this))}},{key:"checked",value:function(t){void 0!==this._data[t]&&(0,a.$set)(this._data[t],"checked",!0)}},{key:"selected",value:function(t){void 0!==this._data[t]&&(0,a.$set)(this._data[t],"selected",!0)}},{key:"toValue",value:function(t){var e=t;return v(this.rule)?e[0]||"":e}},{key:"watchFormValue",value:function(t){this.choose(t)}},{key:"selectedValue",value:function(t){var e=this,n=[];return t.forEach(function(t){c(this,e),!0===t.selected&&n.push(t.id)}.bind(this)),n}},{key:"checkedValue",value:function(t){var e=this,n=[];return t.forEach(function(t){c(this,e),!0===t.checked&&n.push(t.id)}.bind(this)),n}},{key:"_toValue",value:function(){return"selected"===this.rule.props.type?this.selectedValue(this.el.getSelectedNodes()):this.checkedValue(this.el.getCheckedNodes())}},{key:"data",value:function(t){var e=this;t.forEach(function(t){c(this,e),this._data[t.id]=t,void 0!==t.children&&Array.isArray(t.children)&&this.data(t.children)}.bind(this))}}]),e}(),b="on-select-change",m="on-check-change",g=function(t){function e(){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,o.default),i(e,[{key:"parse",value:function(){var t,e=this,n=this.handler,i=n.rule,r=n.refName,o=n.field,a=n.unique,u=this.vData.on(i.event).on((t={},l(t,b,function(t){c(this,e),this.vm._changeFormData(o,this.handler._toValue()),i.event[b]&&i.event[b](t)}.bind(this)),l(t,m,function(t){c(this,e),this.vm._changeFormData(o,this.handler._toValue()),i.event[m]&&i.event[m](t)}.bind(this)),t)).props(i.props).ref(r).key("fip"+String(a)).get(),s=this.inputProps().props({type:"text",value:this.handler.parseValue.toString(),disable:!0}).key("fipit"+a).style({display:"none"}).ref(String(r)+"it").get();return[this.vNode.tree(u),this.vNode.input(s)]}}]),e}(),_={treeSelected:"selected",treeChecked:"checked"},w=Object.keys(_).reduce(function(t,e){return c(void 0,void 0),t[e]=(0,u.creatorTypeFactory)("tree",_[e]),t}.bind(void 0),{});e.default={handler:y,render:g,name:"tree",maker:w}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handler=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=s(n(1)),o=s(n(2)),a=n(3),u=n(0);function s(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=e.handler=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,r.default),i(e,[{key:"init",value:function(){var t=this.rule;Array.isArray(t.data)||(0,u.$set)(t,"data",[])}}]),e}(),p=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,o.default),i(e,[{key:"parse",value:function(){return[this.vNode.AutoComplete(this.inputProps().key(this.handler.key).get())]}}]),e}(),d={auto:(0,a.creatorFactory)("autoComplete")};e.default={handler:h,render:p,name:"autoComplete",maker:d}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();e.preventDefault=l;var r=n(0),o=u(n(8)),a=u(n(6));function u(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function l(t){t.preventDefault()}var c=function(){function t(e){var n=e.vm,i=e.options,u=e.fieldList,s=e.handlers,l=e.formData,c=e.validate,f=e.fCreateApi;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.vm=n,this.options=i,this.handlers=s,this.renderSort=u,this.form={model:l,rules:c,key:"form"+(0,r.uniqueId)()},this.fCreateApi=f,this.vNode=new o.default(n),this.vData=new a.default,this.unique=(0,r.uniqueId)(),this.refName="cForm"+String(this.unique),this.cacheUnique=0}return i(t,[{key:"getRender",value:function(t){return this.handlers[t].render}},{key:"render",value:function(t){var e=this;if(this.vNode.setVm(t),t.isShow){this.cacheUnique!==t.unique&&(this.renderSort.forEach(function(t){s(this,e),this.getRender(t).clearCache()}.bind(this)),this.cacheUnique=t.unique),this.propsData=this.vData.props(this.options.form).props(this.form).ref(this.refName).nativeOn({submit:l}).class("form-create",!0).key(this.unique).get();var n=this.unique,i=this.renderSort.map(function(t){s(this,e);var n=this.getRender(t);if("hidden"!==n.handler.type)return this.makeComponent(n)}.bind(this));return i.length>0&&i.push(this.makeFormBtn(n)),this.vNode.form(this.propsData,[this.vNode.row((0,r.extend)({props:this.options.row||{}},{key:"row"+n}),i)])}}},{key:"makeComponent",value:function(t){return this.makeFormItem(t.handler,t.cacheParse(this),"fItem"+String(t.handler.key)+String(this.unique))}},{key:"makeFormItem",value:function(t,e,n){var i=t.rule,r=t.unique,o=t.field,a=t.refName,u=i.className,s=this.vData.props({prop:o,label:i.title,labelFor:r,rules:i.validate,labelWidth:i.col.labelWidth,required:i.props.required}).key(n).ref("fItem"+a).class(u).get(),l=this.vNode.formItem(s,e);return!0===this.propsData.props.inline?[l]:this.makeCol(i,n,[l])}},{key:"makeCol",value:function(t,e,n){return this.vNode.col({props:t.col,class:{__fc_h:!0===t.props.hidden,__fc_v:!0===t.props.visibility},key:String(e)+"col1"},n)}},{key:"makeFormBtn",value:function(t){var e=[],n=!1!==this.vm.buttonProps&&!1!==this.vm.buttonProps.show,i=!1!==this.vm.resetProps&&!1!==this.vm.resetProps.show;return n&&e.push(this.makeSubmitBtn(t,i?19:24)),i&&e.push(this.makeResetBtn(t,4)),this.vNode.col({props:{span:24},key:String(this.unique)+"col2"},e)}},{key:"makeResetBtn",value:function(t,e){var n=this,i=(0,r.isUndef)(this.options.resetBtn.col)?{span:e,push:1}:this.options.resetBtn.col;return this.vNode.col({props:i,key:String(this.unique)+"col3"},[this.vNode.button({key:"frsbtn"+String(t),props:this.vm.resetProps,on:{click:function(){s(this,n),this.fCreateApi.resetFields()}.bind(this)}},[this.vm.resetProps.innerText])])}},{key:"makeSubmitBtn",value:function(t,e){var n=this,i=(0,r.isUndef)(this.options.submitBtn.col)?{span:e}:this.options.submitBtn.col;return this.vNode.col({props:i,key:String(this.unique)+"col4"},[this.vNode.button({key:"fbtn"+String(t),props:this.vm.buttonProps,on:{click:function(){s(this,n),this.fCreateApi.submit()}.bind(this)}},[this.vm.buttonProps.innerText])])}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=this;return{name:String(i.formCreateName)+"Core",data:r.componentCommon.data,render:function(){return o(this,e),t.fRender.render(t.vm)}.bind(this),methods:r.componentCommon.methods,created:function(){this._fComponent=t,this._fComponent._type="rules",t.init(this)},mounted:function(){var e=this;t.mounted(this),this.$f=t.fCreateApi,this.init(),this.$watch("rules",function(t){o(this,e),this._fComponent.reload(t)}.bind(this))}}};var i=n(12),r=n(4);function o(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),r=function(t){return t&&t.__esModule?t:{default:t}}(n(9)),o=n(0);function a(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var u=function(){a(void 0,void 0);var t={};Object.keys(r.default).forEach(function(e){a(void 0,void 0);var n=r.default[e],u=(0,o.isUndef)(n.maker);(u||void 0===n.maker[n.name])&&(t[n.name]=(0,i.creatorFactory)(n.name)),u||(0,o.extend)(t,n.maker)}.bind(void 0));var e=(0,i.creatorFactory)("");return(0,o.extend)(t,{create:function(t,n){var i=e("",n);return i.rule.type=t,i},createTmp:function(t,n,i){var r=e("",i);return r.rule.type="template",r.rule.template=t,r.rule.vm=n,r}}),t.template=t.createTmp,t}.bind(void 0)();e.default=u}])});