webpackJsonp([16],{301:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(4),n=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=window.exparser.registerElement({is:"wx-form",template:'\n    <span id="wrapper"><slot></slot></span>\n  ',behaviors:["wx-base"],properties:{reportSubmit:{type:Boolean,value:!1,public:!0}},listeners:{"this.formSubmit":"submitHandler","this.formReset":"resetHandler"},resetDfs:function(t){if(t.childNodes)for(var e=0;e<t.childNodes.length;++e){var a=t.childNodes[e];a instanceof exparser.Element&&(a.hasBehavior("wx-data-Component")&&a.resetFormData(),this.resetDfs(a))}},getFormData:function(t,e){return t.name&&t.hasBehavior("wx-data-Component")?"WX-INPUT"===t.__domElement.tagName||"WX-PICKER"===t.__domElement.tagName||"WX-TEXTAREA"===t.__domElement.tagName?t.getFormData(function(t){e(t)}):e(t.getFormData()):e()},asyncDfs:function(t,e){var a=this,r=function(){"function"==typeof e&&e(),e=void 0};if(!t.childNodes)return r();for(var n=t.childNodes.length,o=0;o<t.childNodes.length;++o){var s=t.childNodes[o];s instanceof exparser.Element?function(t){a.getFormData(t,function(e){void 0!==e&&(a._data[t.name]=e),a.asyncDfs(t,function(){0==--n&&r()})})}(s):--n}0==n&&r()},submitHandler:function(t){var e=this,a={id:t.target.__domElement.id,dataset:t.target.dataset,offsetTop:t.target.__domElement.offsetTop,offsetLeft:t.target.__domElement.offsetLeft};return this._data=(0,n.default)(null),this.asyncDfs(this,function(){e.reportSubmit?e.triggerEvent("submit",{value:e._data,formId:"the formId is subscribe mock one",target:a}):e.triggerEvent("submit",{value:e._data,target:a})}),!1},resetHandler:function(t){var e={id:t.target.__domElement.id,dataset:t.target.dataset,offsetTop:t.target.__domElement.offsetTop,offsetLeft:t.target.__domElement.offsetLeft};return this._data=(0,n.default)(null),this.resetDfs(this),this.triggerEvent("reset",{target:e}),!1}})}});