4606.5585ab0e.js 25 KB

1
  1. (self["webpackChunkuview2_0_cli"]=self["webpackChunkuview2_0_cli"]||[]).push([[4606],{32813:function(e,t,r){var n=r(66337);n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals);var i=r(56).Z;i("4d0ae131",n,!0,{sourceMap:!1,shadowMode:!1})},92863:function(e,t,r){var n=r(54422);n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals);var i=r(56).Z;i("04301087",n,!0,{sourceMap:!1,shadowMode:!1})},90587:function(e,t,r){"use strict";var n;r.d(t,{Z:function(){return he}});var i,a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("uvForm",{ref:"uForm",attrs:{model:e.model,rules:e.rules,errorType:e.errorType,borderBottom:e.borderBottom,labelPosition:e.labelPosition,labelWidth:e.labelWidth,labelAlign:e.labelAlign,labelStyle:e.labelStyle,customStyle:e.customStyle}},[e._t("default")],2)},o=[],s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-uni-view",{staticClass:"u-form"},[e._t("default")],2)},u=[],l=r(66407),f=r(18334),d=r(7028),c=r(4587),p=(r(21249),r(47941),r(92222),r(26699),r(32023),r(74916),r(77601),r(57658),r(41539),r(9653),{props:{model:{type:Object,default:uni.$u.props.form.model},rules:{type:[Object,Function,Array],default:uni.$u.props.form.rules},errorType:{type:String,default:uni.$u.props.form.errorType},borderBottom:{type:Boolean,default:uni.$u.props.form.borderBottom},labelPosition:{type:String,default:uni.$u.props.form.labelPosition},labelWidth:{type:[String,Number],default:uni.$u.props.form.labelWidth},labelAlign:{type:String,default:uni.$u.props.form.labelAlign},labelStyle:{type:Object,default:uni.$u.props.form.labelStyle}}}),m=r(41541),h=r(96257);r(54747),r(47042),r(15306),r(38862),r(82772),r(24603),r(28450),r(88386),r(39714),r(4723),r(21703),r(96647),r(33948),r(40561);var y=/%[sdj%]/g,g=function(){};function v(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var r=e.field;t[r]=t[r]||[],t[r].push(e)})),t}function b(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=1,i=t[0],a=t.length;if("function"===typeof i)return i.apply(null,t.slice(1));if("string"===typeof i){for(var o=String(i).replace(y,(function(e){if("%%"===e)return"%";if(n>=a)return e;switch(e){case"%s":return String(t[n++]);case"%d":return Number(t[n++]);case"%j":try{return JSON.stringify(t[n++])}catch(r){return"[Circular]"}break;default:return e}})),s=t[n];n<a;s=t[++n])o+=" ".concat(s);return o}return i}function _(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"pattern"===e}function x(e,t){return void 0===e||null===e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!_(t)||"string"!==typeof e||e))}function w(e,t,r){var n=[],i=0,a=e.length;function o(e){n.push.apply(n,e),i++,i===a&&r(n)}e.forEach((function(e){t(e,o)}))}function q(e,t,r){var n=0,i=e.length;function a(o){if(o&&o.length)r(o);else{var s=n;n+=1,s<i?t(e[s],a):r([])}}a([])}function $(e){var t=[];return Object.keys(e).forEach((function(r){t.push.apply(t,e[r])})),t}function F(e,t,r,n){if(t.first){var i=new Promise((function(t,i){var a=function(e){return n(e),e.length?i({errors:e,fields:v(e)}):t()},o=$(e);q(o,r,a)}));return i.catch((function(e){return e})),i}var a=t.firstFields||[];!0===a&&(a=Object.keys(e));var o=Object.keys(e),s=o.length,u=0,l=[],f=new Promise((function(t,i){var f=function(e){if(l.push.apply(l,e),u++,u===s)return n(l),l.length?i({errors:l,fields:v(l)}):t()};o.length||(n(l),t()),o.forEach((function(t){var n=e[t];-1!==a.indexOf(t)?q(n,r,f):w(n,r,f)}))}));return f.catch((function(e){return e})),f}function P(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:"function"===typeof t?t():t,field:t.field||e.fullField}}}function S(e,t){if(t)for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];"object"===(0,h.Z)(n)&&"object"===(0,h.Z)(e[r])?e[r]=(0,m.Z)((0,m.Z)({},e[r]),n):e[r]=n}return e}function O(e,t,r,n,i,a){!e.required||r.hasOwnProperty(e.field)&&!x(t,a||e.type)||n.push(b(i.messages.required,e.fullField))}function Z(e,t,r,n,i){(/^\s+$/.test(t)||""===t)&&n.push(b(i.messages.whitespace,e.fullField))}var A={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},j={integer:function(e){return/^(-)?\d+$/.test(e)},float:function(e){return/^(-)?\d+(\.\d+)?$/.test(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(t){return!1}},date:function(e){return"function"===typeof e.getTime&&"function"===typeof e.getMonth&&"function"===typeof e.getYear},number:function(e){return!isNaN(e)&&"number"===typeof+e},object:function(e){return"object"===(0,h.Z)(e)&&!j.array(e)},method:function(e){return"function"===typeof e},email:function(e){return"string"===typeof e&&!!e.match(A.email)&&e.length<255},url:function(e){return"string"===typeof e&&!!e.match(A.url)},hex:function(e){return"string"===typeof e&&!!e.match(A.hex)}};function C(e,t,r,n,i){if(e.required&&void 0===t)O(e,t,r,n,i);else{var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=e.type;a.indexOf(o)>-1?j[o](t)||n.push(b(i.messages.types[o],e.fullField,e.type)):o&&(0,h.Z)(t)!==e.type&&n.push(b(i.messages.types[o],e.fullField,e.type))}}function D(e,t,r,n,i){var a="number"===typeof e.len,o="number"===typeof e.min,s="number"===typeof e.max,u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=t,f=null,d="number"===typeof t,c="string"===typeof t,p=Array.isArray(t);if(d?f="number":c?f="string":p&&(f="array"),!f)return!1;p&&(l=t.length),c&&(l=t.replace(u,"_").length),a?l!==e.len&&n.push(b(i.messages[f].len,e.fullField,e.len)):o&&!s&&l<e.min?n.push(b(i.messages[f].min,e.fullField,e.min)):s&&!o&&l>e.max?n.push(b(i.messages[f].max,e.fullField,e.max)):o&&s&&(l<e.min||l>e.max)&&n.push(b(i.messages[f].range,e.fullField,e.min,e.max))}var k="enum";function I(e,t,r,n,i){e[k]=Array.isArray(e[k])?e[k]:[],-1===e[k].indexOf(t)&&n.push(b(i.messages[k],e.fullField,e[k].join(", ")))}function E(e,t,r,n,i){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||n.push(b(i.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"===typeof e.pattern){var a=new RegExp(e.pattern);a.test(t)||n.push(b(i.messages.pattern.mismatch,e.fullField,t,e.pattern))}}var M={required:O,whitespace:Z,type:C,range:D,enum:I,pattern:E};function T(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t,"string")&&!e.required)return r();M.required(e,t,n,a,i,"string"),x(t,"string")||(M.type(e,t,n,a,i),M.range(e,t,n,a,i),M.pattern(e,t,n,a,i),!0===e.whitespace&&M.whitespace(e,t,n,a,i))}r(a)}function B(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&M.type(e,t,n,a,i)}r(a)}function W(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(""===t&&(t=void 0),x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&(M.type(e,t,n,a,i),M.range(e,t,n,a,i))}r(a)}function R(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&M.type(e,t,n,a,i)}r(a)}function V(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),x(t)||M.type(e,t,n,a,i)}r(a)}function z(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&(M.type(e,t,n,a,i),M.range(e,t,n,a,i))}r(a)}function N(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&(M.type(e,t,n,a,i),M.range(e,t,n,a,i))}r(a)}function U(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t,"array")&&!e.required)return r();M.required(e,t,n,a,i,"array"),x(t,"array")||(M.type(e,t,n,a,i),M.range(e,t,n,a,i))}r(a)}function L(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&M.type(e,t,n,a,i)}r(a)}var J="enum";function H(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&M[J](e,t,n,a,i)}r(a)}function Y(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t,"string")&&!e.required)return r();M.required(e,t,n,a,i),x(t,"string")||M.pattern(e,t,n,a,i)}r(a)}function X(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();var s;if(M.required(e,t,n,a,i),!x(t))s="number"===typeof t?new Date(t):t,M.type(e,s,n,a,i),s&&M.range(e,s.getTime(),n,a,i)}r(a)}function G(e,t,r,n,i){var a=[],o=Array.isArray(t)?"array":(0,h.Z)(t);M.required(e,t,n,a,i,o),r(a)}function K(e,t,r,n,i){var a=e.type,o=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(x(t,a)&&!e.required)return r();M.required(e,t,n,o,i,a),x(t,a)||M.type(e,t,n,o,i)}r(o)}function Q(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i)}r(a)}var ee={string:T,method:B,number:W,boolean:R,regexp:V,integer:z,float:N,array:U,object:L,enum:H,pattern:Y,date:X,url:K,hex:K,email:K,required:G,any:Q};function te(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var re=te();function ne(e){this.rules=null,this._messages=re,this.define(e)}ne.prototype={messages:function(e){return e&&(this._messages=S(te(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==(0,h.Z)(e)||Array.isArray(e))throw new Error("Rules must be an object");var t,r;for(t in this.rules={},e)e.hasOwnProperty(t)&&(r=e[t],this.rules[t]=Array.isArray(r)?r:[r])},validate:function(e,t,r){var n=this;void 0===t&&(t={}),void 0===r&&(r=function(){});var i,a,o=e,s=t,u=r;if("function"===typeof s&&(u=s,s={}),!this.rules||0===Object.keys(this.rules).length)return u&&u(),Promise.resolve();function l(e){var t,r=[],n={};function i(e){var t;Array.isArray(e)?r=(t=r).concat.apply(t,e):r.push(e)}for(t=0;t<e.length;t++)i(e[t]);r.length?n=v(r):(r=null,n=null),u(r,n)}if(s.messages){var f=this.messages();f===re&&(f=te()),S(f,s.messages),s.messages=f}else s.messages=this.messages();var d={},c=s.keys||Object.keys(this.rules);c.forEach((function(t){i=n.rules[t],a=o[t],i.forEach((function(r){var i=r;"function"===typeof i.transform&&(o===e&&(o=(0,m.Z)({},o)),a=o[t]=i.transform(a)),i="function"===typeof i?{validator:i}:(0,m.Z)({},i),i.validator=n.getValidationMethod(i),i.field=t,i.fullField=i.fullField||t,i.type=n.getType(i),i.validator&&(d[t]=d[t]||[],d[t].push({rule:i,value:a,source:o,field:t}))}))}));var p={};return F(d,s,(function(e,t){var r,n=e.rule,i=("object"===n.type||"array"===n.type)&&("object"===(0,h.Z)(n.fields)||"object"===(0,h.Z)(n.defaultField));function a(e,t){return(0,m.Z)((0,m.Z)({},t),{},{fullField:"".concat(n.fullField,".").concat(e)})}function o(r){void 0===r&&(r=[]);var o=r;if(Array.isArray(o)||(o=[o]),!s.suppressWarning&&o.length&&ne.warning("async-validator:",o),o.length&&n.message&&(o=[].concat(n.message)),o=o.map(P(n)),s.first&&o.length)return p[n.field]=1,t(o);if(i){if(n.required&&!e.value)return o=n.message?[].concat(n.message).map(P(n)):s.error?[s.error(n,b(s.messages.required,n.field))]:[],t(o);var u={};if(n.defaultField)for(var l in e.value)e.value.hasOwnProperty(l)&&(u[l]=n.defaultField);for(var f in u=(0,m.Z)((0,m.Z)({},u),e.rule.fields),u)if(u.hasOwnProperty(f)){var d=Array.isArray(u[f])?u[f]:[u[f]];u[f]=d.map(a.bind(null,f))}var c=new ne(u);c.messages(s.messages),e.rule.options&&(e.rule.options.messages=s.messages,e.rule.options.error=s.error),c.validate(e.value,e.rule.options||s,(function(e){var r=[];o&&o.length&&r.push.apply(r,o),e&&e.length&&r.push.apply(r,e),t(r.length?r:null)}))}else t(o)}i=i&&(n.required||!n.required&&e.value),n.field=e.field,n.asyncValidator?r=n.asyncValidator(n,e.value,o,e.source,s):n.validator&&(r=n.validator(n,e.value,o,e.source,s),!0===r?o():!1===r?o(n.message||"".concat(n.field," fails")):r instanceof Array?o(r):r instanceof Error&&o(r.message)),r&&r.then&&r.then((function(){return o()}),(function(e){return o(e)}))}),(function(e){l(e)}))},getType:function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!==typeof e.validator&&e.type&&!ee.hasOwnProperty(e.type))throw new Error(b("Unknown rule type %s",e.type));return e.type||"string"},getValidationMethod:function(e){if("function"===typeof e.validator)return e.validator;var t=Object.keys(e),r=t.indexOf("message");return-1!==r&&t.splice(r,1),1===t.length&&"required"===t[0]?ee.required:ee[this.getType(e)]||!1}},ne.register=function(e,t){if("function"!==typeof t)throw new Error("Cannot register a validator by type, validator is not a function");ee[e]=t},ne.warning=g,ne.messages=re;var ie=ne;ie.warning=function(){};var ae,oe,se={name:"u-form",mixins:[uni.$u.mpMixin,uni.$u.mixin,p],provide:function(){return{uForm:this}},data:function(){return{formRules:{},validator:{},originalModel:null}},watch:{rules:{immediate:!0,handler:function(e){this.setRules(e)}},propsChange:function(e){var t;null!==(t=this.children)&&void 0!==t&&t.length&&this.children.map((function(e){"function"==typeof e.updateParentData&&e.updateParentData()}))},model:{immediate:!0,handler:function(e){this.originalModel||(this.originalModel=uni.$u.deepClone(e))}}},computed:{propsChange:function(){return[this.errorType,this.borderBottom,this.labelPosition,this.labelWidth,this.labelAlign,this.labelStyle]}},created:function(){this.children=[]},methods:{setRules:function(e){0!==Object.keys(e).length&&(this.formRules=e,this.validator=new ie(e))},resetFields:function(){this.resetModel()},resetModel:function(e){var t=this;this.children.map((function(e){var r=null===e||void 0===e?void 0:e.prop,n=uni.$u.getProperty(t.originalModel,r);uni.$u.setProperty(t.model,r,n)}))},clearValidate:function(e){e=[].concat(e),this.children.map((function(t){(void 0===e[0]||e.includes(t.prop))&&(t.message=null)}))},validateField:function(e,t){var r=arguments,n=this;return(0,c.Z)((0,l.Z)().mark((function i(){var a;return(0,l.Z)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:a=r.length>2&&void 0!==r[2]?r[2]:null,n.$nextTick((function(){var r=[];e=[].concat(e),n.children.map((function(t){var i=[];if(e.includes(t.prop)){var o=uni.$u.getProperty(n.model,t.prop),s=t.prop.split("."),u=s[s.length-1],l=n.formRules[t.prop];if(!l)return;for(var c=[].concat(l),p=0;p<c.length;p++){var m=c[p],h=[].concat(null===m||void 0===m?void 0:m.trigger);if(!a||h.includes(a)){var y=new ie((0,d.Z)({},u,m));y.validate((0,d.Z)({},u,o),(function(e,n){var a,o;uni.$u.test.array(e)&&(r.push.apply(r,(0,f.Z)(e)),i.push.apply(i,(0,f.Z)(e))),t.message=null!==(a=null===(o=i[0])||void 0===o?void 0:o.message)&&void 0!==a?a:null}))}}}})),"function"===typeof t&&t(r)}));case 2:case"end":return i.stop()}}),i)})))()},validate:function(e){var t=this;return new Promise((function(e,r){t.$nextTick((function(){var n=t.children.map((function(e){return e.prop}));t.validateField(n,(function(n){n.length?("toast"===t.errorType&&uni.$u.toast(n[0].message),r(n)):e(!0)}))}))}))}}},ue=se,le=r(69453),fe=(0,le.Z)(ue,s,u,!1,null,"e5d9b202",null,!1,i,ae),de=fe.exports,ce={name:"u--form",mixins:[uni.$u.mpMixin,p,uni.$u.mixin],components:{uvForm:de},created:function(){this.children=[]},methods:{setRules:function(e){this.$refs.uForm.setRules(e)},validate:function(){return this.$refs.uForm.validate()},validateField:function(e,t){return this.$refs.uForm.validateField(e,t)},resetFields:function(){return this.$refs.uForm.resetFields()},clearValidate:function(e){return this.$refs.uForm.clearValidate(e)},setMpData:function(){this.$refs.uForm.children=this.children}}},pe=ce,me=(0,le.Z)(pe,a,o,!1,null,null,null,!1,n,oe),he=me.exports},10005:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n,i={uIcon:r(38275).Z,uLine:r(36083).Z},a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-uni-view",{staticClass:"u-form-item"},[r("v-uni-view",{staticClass:"u-form-item__body",style:[e.$u.addStyle(e.customStyle),{flexDirection:"left"===(e.labelPosition||e.parentData.labelPosition)?"row":"column"}],on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.clickHandler.apply(void 0,arguments)}}},[e._t("label",[e.required||e.leftIcon||e.label?r("v-uni-view",{staticClass:"u-form-item__body__left",style:{width:e.$u.addUnit(e.labelWidth||e.parentData.labelWidth),marginBottom:"left"===e.parentData.labelPosition?0:"5px"}},[r("v-uni-view",{staticClass:"u-form-item__body__left__content"},[e.required?r("v-uni-text",{staticClass:"u-form-item__body__left__content__required"},[e._v("*")]):e._e(),e.leftIcon?r("v-uni-view",{staticClass:"u-form-item__body__left__content__icon"},[r("u-icon",{attrs:{name:e.leftIcon,"custom-style":e.leftIconStyle}})],1):e._e(),r("v-uni-text",{staticClass:"u-form-item__body__left__content__label",style:[e.parentData.labelStyle,{justifyContent:"left"===e.parentData.labelAlign?"flex-start":"center"===e.parentData.labelAlign?"center":"flex-end"}]},[e._v(e._s(e.label))])],1)],1):e._e()]),r("v-uni-view",{staticClass:"u-form-item__body__right"},[r("v-uni-view",{staticClass:"u-form-item__body__right__content"},[r("v-uni-view",{staticClass:"u-form-item__body__right__content__slot"},[e._t("default")],2),e.$slots.right?r("v-uni-view",{staticClass:"item__body__right__content__icon"},[e._t("right")],2):e._e()],1)],1)],2),e._t("error",[e.message&&"message"===e.parentData.errorType?r("v-uni-text",{staticClass:"u-form-item__body__right__message",style:{marginLeft:e.$u.addUnit("top"===e.parentData.labelPosition?0:e.labelWidth||e.parentData.labelWidth)}},[e._v(e._s(e.message))]):e._e()]),e.borderBottom?r("u-line",{attrs:{color:e.message&&"border-bottom"===e.parentData.errorType?e.$u.color.error:e.propsLine.color,customStyle:"margin-top: "+(e.message&&"message"===e.parentData.errorType?"5px":0)}}):e._e()],2)},o=[],s=(r(9653),{props:{label:{type:String,default:uni.$u.props.formItem.label},prop:{type:String,default:uni.$u.props.formItem.prop},borderBottom:{type:[String,Boolean],default:uni.$u.props.formItem.borderBottom},labelPosition:{type:String,default:uni.$u.props.formItem.labelPosition},labelWidth:{type:[String,Number],default:uni.$u.props.formItem.labelWidth},rightIcon:{type:String,default:uni.$u.props.formItem.rightIcon},leftIcon:{type:String,default:uni.$u.props.formItem.leftIcon},required:{type:Boolean,default:uni.$u.props.formItem.required},leftIconStyle:{type:[String,Object],default:uni.$u.props.formItem.leftIconStyle}}}),u={name:"u-form-item",mixins:[uni.$u.mpMixin,uni.$u.mixin,s],data:function(){return{message:"",parentData:{labelPosition:"left",labelAlign:"left",labelStyle:{},labelWidth:45,errorType:"message"}}},computed:{propsLine:function(){return uni.$u.props.line}},mounted:function(){this.init()},methods:{init:function(){this.updateParentData(),this.parent||uni.$u.error("u-form-item需要结合u-form组件使用")},updateParentData:function(){this.getParentData("u-form")},clearValidate:function(){this.message=null},resetField:function(){var e=uni.$u.getProperty(this.parent.originalModel,this.prop);uni.$u.setProperty(this.parent.model,this.prop,e),this.message=null},clickHandler:function(){this.$emit("click")}}},l=u,f=(r(32813),r(69453)),d=(0,f.Z)(l,a,o,!1,null,"78cb7b15",null,!1,i,n),c=d.exports},36083:function(e,t,r){"use strict";var n;r.d(t,{Z:function(){return c}});var i,a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-uni-view",{staticClass:"u-line",style:[e.lineStyle]})},o=[],s=(r(9653),{props:{color:{type:String,default:uni.$u.props.line.color},length:{type:[String,Number],default:uni.$u.props.line.length},direction:{type:String,default:uni.$u.props.line.direction},hairline:{type:Boolean,default:uni.$u.props.line.hairline},margin:{type:[String,Number],default:uni.$u.props.line.margin},dashed:{type:Boolean,default:uni.$u.props.line.dashed}}}),u={name:"u-line",mixins:[uni.$u.mpMixin,uni.$u.mixin,s],computed:{lineStyle:function(){var e={};return e.margin=this.margin,"row"===this.direction?(e.borderBottomWidth="1px",e.borderBottomStyle=this.dashed?"dashed":"solid",e.width=uni.$u.addUnit(this.length),this.hairline&&(e.transform="scaleY(0.5)")):(e.borderLeftWidth="1px",e.borderLeftStyle=this.dashed?"dashed":"solid",e.height=uni.$u.addUnit(this.length),this.hairline&&(e.transform="scaleX(0.5)")),e.borderColor=this.color,uni.$u.deepMerge(e,uni.$u.addStyle(this.customStyle))}}},l=u,f=(r(92863),r(69453)),d=(0,f.Z)(l,a,o,!1,null,"09e9487a",null,!1,n,i),c=d.exports},66337:function(e,t,r){"use strict";r.r(t);var n=r(43481),i=r.n(n),a=r(2400),o=r.n(a),s=o()(i());s.push([e.id,'@charset "UTF-8";\n/**\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用\n */uni-view[data-v-78cb7b15], uni-scroll-view[data-v-78cb7b15], uni-swiper-item[data-v-78cb7b15]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-form-item[data-v-78cb7b15]{\ndisplay:flex;\nflex-direction:column;font-size:14px;color:#303133}.u-form-item__body[data-v-78cb7b15]{\ndisplay:flex;\nflex-direction:row;padding:10px 0}.u-form-item__body__left[data-v-78cb7b15]{\ndisplay:flex;\nflex-direction:row;align-items:center}.u-form-item__body__left__content[data-v-78cb7b15]{position:relative;\ndisplay:flex;\nflex-direction:row;align-items:center;padding-right:%?10?%;flex:1}.u-form-item__body__left__content__icon[data-v-78cb7b15]{margin-right:%?8?%}.u-form-item__body__left__content__required[data-v-78cb7b15]{position:absolute;left:-9px;color:#f56c6c;line-height:20px;font-size:20px;top:3px}.u-form-item__body__left__content__label[data-v-78cb7b15]{\ndisplay:flex;\nflex-direction:row;align-items:center;flex:1;color:#303133;font-size:15px}.u-form-item__body__right[data-v-78cb7b15]{flex:1}.u-form-item__body__right__content[data-v-78cb7b15]{\ndisplay:flex;\nflex-direction:row;align-items:center;flex:1}.u-form-item__body__right__content__slot[data-v-78cb7b15]{flex:1;\ndisplay:flex;\nflex-direction:row;align-items:center}.u-form-item__body__right__content__icon[data-v-78cb7b15]{margin-left:%?10?%;color:#c0c4cc;font-size:%?30?%}.u-form-item__body__right__message[data-v-78cb7b15]{font-size:12px;line-height:12px;color:#f56c6c}',""]),t["default"]=s},54422:function(e,t,r){"use strict";r.r(t);var n=r(43481),i=r.n(n),a=r(2400),o=r.n(a),s=o()(i());s.push([e.id,'@charset "UTF-8";\n/**\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用\n */uni-view[data-v-09e9487a], uni-scroll-view[data-v-09e9487a], uni-swiper-item[data-v-09e9487a]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-line[data-v-09e9487a]{vertical-align:middle}',""]),t["default"]=s}}]);