chunk-6bbe4703.ccca3686.js 15 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6bbe4703"],{"0653":function(t,e,n){"use strict";n("68ef")},1146:function(t,e,n){},1901:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"add_photo"},[n("img",{staticClass:"photo",attrs:{src:t.photoURL,name:"photo"}}),n("input",{staticClass:"photo",attrs:{type:"file",name:"file",accept:"image/*"},on:{change:t.onRead}})])},o=[],a=(n("cadf"),n("551c"),n("097d"),{name:"addPhoto",props:{photoURL:{default:"http://pjczv6ygf.bkt.clouddn.com/camera.png"}},methods:{onRead:function(t){var e=t.target.files[0],n=new FileReader;n.readAsDataURL(e);var i=this;n.onload=function(t){i.photoURL=this.result},this.$emit("onRead",e)}}}),s=a,l=(n("d8a9"),n("2877")),r=Object(l["a"])(s,i,o,!1,null,"2a157cf2",null);r.options.__file="addPhoto.vue";e["a"]=r.exports},3875:function(t,e,n){"use strict";var i=10;function o(t,e){return t>e&&t>i?"horizontal":e>t&&e>i?"vertical":""}e["a"]={data:function(){return{direction:""}},methods:{touchStart:function(t){this.resetTouchStatus(),this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY},touchMove:function(t){var e=t.touches[0];this.deltaX=e.clientX-this.startX,this.deltaY=e.clientY-this.startY,this.offsetX=Math.abs(this.deltaX),this.offsetY=Math.abs(this.deltaY),this.direction=this.direction||o(this.offsetX,this.offsetY)},resetTouchStatus:function(){this.direction="",this.deltaX=0,this.deltaY=0,this.offsetX=0,this.offsetY=0}}}},"4d75":function(t,e,n){},"4ddd":function(t,e,n){"use strict";n("68ef"),n("dde9")},"565f":function(t,e,n){"use strict";var i=n("c31d"),o=n("fe7e"),a=n("3583"),s=n("a142");e["a"]=Object(o["a"])({render:function(){var t,e=this,n=e.$createElement,i=e._self._c||n;return i("cell",{class:e.b((t={error:e.error,disabled:e.$attrs.disabled,"min-height":"textarea"===e.type&&!e.autosize},t["label-"+e.labelAlign]=e.labelAlign,t)),attrs:{icon:e.leftIcon,title:e.label,center:e.center,border:e.border,"is-link":e.isLink,required:e.required}},[e._t("left-icon",null,{slot:"icon"}),e._t("label",null,{slot:"title"}),i("div",{class:e.b("body")},["textarea"===e.type?i("textarea",e._g(e._b({ref:"input",class:e.b("control",e.inputAlign),attrs:{readonly:e.readonly},domProps:{value:e.value}},"textarea",e.$attrs,!1),e.listeners)):i("input",e._g(e._b({ref:"input",class:e.b("control",e.inputAlign),attrs:{type:e.type,readonly:e.readonly},domProps:{value:e.value}},"input",e.$attrs,!1),e.listeners)),e.showClear?i("icon",{class:e.b("clear"),attrs:{name:"clear"},on:{touchstart:function(t){return t.preventDefault(),e.onClear(t)}}}):e._e(),e.$slots.icon||e.icon?i("div",{class:e.b("icon"),on:{click:e.onClickIcon}},[e._t("icon",[i("icon",{attrs:{name:e.icon}})])],2):e._e(),e.$slots.button?i("div",{class:e.b("button")},[e._t("button")],2):e._e()],1),e.errorMessage?i("div",{class:e.b("error-message"),domProps:{textContent:e._s(e.errorMessage)}}):e._e()],2)},name:"field",inheritAttrs:!1,mixins:[a["a"]],props:{error:Boolean,leftIcon:String,readonly:Boolean,clearable:Boolean,labelAlign:String,inputAlign:String,onIconClick:Function,autosize:[Boolean,Object],errorMessage:String,type:{type:String,default:"text"}},data:function(){return{focused:!1}},watch:{value:function(){this.$nextTick(this.adjustSize)}},mounted:function(){this.format(),this.$nextTick(this.adjustSize)},computed:{showClear:function(){return this.clearable&&this.focused&&""!==this.value&&this.isDef(this.value)&&!this.readonly},listeners:function(){return Object(i["a"])({},this.$listeners,{input:this.onInput,keypress:this.onKeypress,focus:this.onFocus,blur:this.onBlur})}},methods:{focus:function(){this.$refs.input&&this.$refs.input.focus()},blur:function(){this.$refs.input&&this.$refs.input.blur()},format:function(t){void 0===t&&(t=this.$refs.input);var e=t,n=e.value,i=this.$attrs.maxlength;return this.isDef(i)&&n.length>i&&(n=n.slice(0,i),t.value=n),n},onInput:function(t){this.$emit("input",this.format(t.target))},onFocus:function(t){this.focused=!0,this.$emit("focus",t),this.readonly&&this.blur()},onBlur:function(t){this.focused=!1,this.$emit("blur",t)},onClickIcon:function(){this.$emit("click-icon"),this.onIconClick&&this.onIconClick()},onClear:function(){this.$emit("input",""),this.$emit("clear")},onKeypress:function(t){if("number"===this.type){var e=t.keyCode,n=-1===String(this.value).indexOf("."),i=e>=48&&e<=57||46===e&&n||45===e;i||t.preventDefault()}"search"===this.type&&13===t.keyCode&&this.blur(),this.$emit("keypress",t)},adjustSize:function(){var t=this.$refs.input;if("textarea"===this.type&&this.autosize&&t){t.style.height="auto";var e=t.scrollHeight;if(Object(s["d"])(this.autosize)){var n=this.autosize,i=n.maxHeight,o=n.minHeight;i&&(e=Math.min(e,i)),o&&(e=Math.max(e,o))}e&&(t.style.height=e+"px")}}}})},6605:function(t,e,n){"use strict";var i=n("c31d"),o=n("2b0e"),a={zIndex:2e3,stack:[],lockCount:0,get top(){return this.stack[this.stack.length-1]}},s={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"van-fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"van-overlay",class:t.className,style:t.style,on:{touchmove:function(t){t.preventDefault(),t.stopPropagation()},click:function(e){t.$emit("click",e)}}})])},name:"overlay",props:{zIndex:Number,visible:Boolean,className:String,customStyle:Object},computed:{style:function(){return Object(i["a"])({zIndex:this.zIndex},this.customStyle)}}},l={className:"",customStyle:{}},r={open:function(t,e){if(!a.stack.some(function(e){return e.vm===t})){var n=t.$el,i=n&&n.parentNode?n.parentNode:document.body;a.stack.push({vm:t,config:e,target:i}),this.update()}},close:function(t){var e=a.stack;e.length&&(a.top.vm===t?(e.pop(),this.update()):a.stack=e.filter(function(e){return e.vm!==t}))},update:function(){var t=a.modal;if(t||(t=new(o["a"].extend(s))({el:document.createElement("div")}),t.$on("click",this.onClick),a.modal=t),t.$el.parentNode&&(t.visible=!1),a.top){var e=a.top,n=e.target,r=e.config;n.appendChild(t.$el),Object(i["a"])(t,Object(i["a"])({},l,r,{visible:!0}))}},onClick:function(){if(a.top){var t=a.top.vm;t.$emit("click-overlay"),t.closeOnClickOverlay&&t.$emit("input",!1)}}},c=n("a142"),u={getScrollEventTarget:function(t,e){void 0===e&&(e=window);var n=t;while(n&&"HTML"!==n.tagName&&"BODY"!==n.tagName&&1===n.nodeType&&n!==e){var i=this.getComputedStyle(n).overflowY;if("scroll"===i||"auto"===i)return n;n=n.parentNode}return e},getScrollTop:function(t){return"scrollTop"in t?t.scrollTop:t.pageYOffset},setScrollTop:function(t,e){"scrollTop"in t?t.scrollTop=e:t.scrollTo(t.scrollX,e)},getElementTop:function(t){return(t===window?0:t.getBoundingClientRect().top)+this.getScrollTop(window)},getVisibleHeight:function(t){return t===window?t.innerHeight:t.getBoundingClientRect().height},getComputedStyle:!c["e"]&&document.defaultView.getComputedStyle.bind(document.defaultView)},d=n("db78"),h=n("3875");e["a"]={mixins:[h["a"]],props:{value:Boolean,overlay:Boolean,overlayStyle:Object,overlayClass:String,closeOnClickOverlay:Boolean,zIndex:[String,Number],getContainer:[String,Function],lockScroll:{type:Boolean,default:!0},lazyRender:{type:Boolean,default:!0}},data:function(){return{inited:this.value}},computed:{shouldRender:function(){return this.inited||!this.lazyRender}},watch:{value:function(t){this.inited=this.inited||this.value,this[t?"open":"close"]()},getContainer:function(){this.move()},overlay:function(){this.renderOverlay()}},mounted:function(){this.getContainer&&this.move(),this.value&&this.open()},activated:function(){this.value&&this.open()},beforeDestroy:function(){this.close(),this.getContainer&&this.$parent.$el.appendChild(this.$el)},deactivated:function(){this.close()},methods:{open:function(){this.$isServer||this.opened||(void 0!==this.zIndex&&(a.zIndex=this.zIndex),this.opened=!0,this.renderOverlay(),this.lockScroll&&(Object(d["b"])(document,"touchstart",this.touchStart),Object(d["b"])(document,"touchmove",this.onTouchMove),a.lockCount||document.body.classList.add("van-overflow-hidden"),a.lockCount++))},close:function(){this.opened&&(this.lockScroll&&(a.lockCount--,Object(d["a"])(document,"touchstart",this.touchStart),Object(d["a"])(document,"touchmove",this.onTouchMove),a.lockCount||document.body.classList.remove("van-overflow-hidden")),this.opened=!1,r.close(this),this.$emit("input",!1))},move:function(){var t,e=this.getContainer;e?t="string"===typeof e?document.querySelector(e):e():this.$parent&&(t=this.$parent.$el),t&&t.appendChild(this.$el)},onTouchMove:function(t){this.touchMove(t);var e=this.deltaY>0?"10":"01",n=u.getScrollEventTarget(t.target,this.$el),i=n.scrollHeight,o=n.offsetHeight,a=n.scrollTop,s="11";0===a?s=o>=i?"00":"01":a+o>=i&&(s="10"),"11"===s||"vertical"!==this.direction||parseInt(s,2)&parseInt(e,2)||(t.preventDefault(),t.stopPropagation())},renderOverlay:function(){var t=this;this.overlay?r.open(this,{zIndex:a.zIndex++,className:this.overlayClass,customStyle:this.overlayStyle}):r.close(this),this.$nextTick(function(){t.$el.style.zIndex=a.zIndex++})}}}},"66b9":function(t,e,n){"use strict";n("68ef")},8410:function(t,e,n){},"9f14":function(t,e,n){"use strict";var i=n("fe7e"),o=n("f331");e["a"]=Object(i["a"])({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.b({disabled:t.isDisabled}),on:{click:function(e){t.$emit("click")}}},[n("span",{class:t.b("input")},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],class:t.b("control"),attrs:{type:"radio",disabled:t.isDisabled},domProps:{value:t.name,checked:t._q(t.currentValue,t.name)},on:{change:function(e){t.currentValue=t.name}}}),n("icon",{style:t.iconStyle,attrs:{name:t.checked?"checked":"check"}})],1),t.$slots.default?n("span",{class:t.b("label",t.labelPosition),on:{click:t.onClickLabel}},[t._t("default")],2):t._e()])},name:"radio",mixins:[o["a"]],props:{name:null,value:null,disabled:Boolean,checkedColor:String,labelDisabled:Boolean,labelPosition:Boolean},computed:{currentValue:{get:function(){return this.parent?this.parent.value:this.value},set:function(t){(this.parent||this).$emit("input",t)}},checked:function(){return this.currentValue===this.name},isDisabled:function(){return this.parent&&this.parent.disabled||this.disabled},iconStyle:function(){var t=this.checkedColor;if(t&&this.checked&&!this.isDisabled)return{color:t}}},created:function(){this.findParent("van-radio-group")},methods:{onClickLabel:function(){this.isDisabled||this.labelDisabled||(this.currentValue=this.name)}}})},a44c:function(t,e,n){"use strict";n("68ef")},b258:function(t,e,n){},b650:function(t,e,n){"use strict";var i=n("fe7e");e["a"]=Object(i["a"])({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.tag,{tag:"component",class:t.b([t.type,t.size,{block:t.block,plain:t.plain,round:t.round,square:t.square,loading:t.loading,disabled:t.disabled,unclickable:t.disabled||t.loading,"bottom-action":t.bottomAction}]),attrs:{type:t.nativeType,disabled:t.disabled},on:{click:t.onClick}},[t.loading?n("loading",{attrs:{size:"20px",color:"default"===t.type?void 0:""}}):n("span",{class:t.b("text")},[t._t("default",[t._v(t._s(t.text))])],2)],1)},name:"button",props:{text:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,disabled:Boolean,nativeType:String,bottomAction:Boolean,tag:{type:String,default:"button"},type:{type:String,default:"default"},size:{type:String,default:"normal"}},methods:{onClick:function(t){this.loading||this.disabled||this.$emit("click",t)}}})},be7f:function(t,e,n){"use strict";n("68ef"),n("1146")},d399:function(t,e,n){"use strict";var i=n("c31d"),o=n("2b0e"),a=n("fe7e"),s=n("6605"),l=["success","fail","loading"],r=Object(a["a"])({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"van-fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.value,expression:"value"}],class:t.b([t.style,t.position])},["text"===t.style?n("div",[t._v(t._s(t.message))]):t._e(),"html"===t.style?n("div",{domProps:{innerHTML:t._s(t.message)}}):t._e(),"default"===t.style?["loading"===t.type?n("loading",{attrs:{color:"white",type:t.loadingType}}):n("icon",{class:t.b("icon"),attrs:{name:t.type}}),t.isDef(t.message)?n("div",{class:t.b("text")},[t._v("\n "+t._s(t.message)+"\n ")]):t._e()]:t._e()],2)])},name:"toast",mixins:[s["a"]],props:{forbidClick:Boolean,message:[String,Number],type:{type:String,default:"text"},loadingType:{type:String,default:"circular"},position:{type:String,default:"middle"},lockScroll:{type:Boolean,default:!1}},data:function(){return{clickable:!1}},computed:{style:function(){return-1!==l.indexOf(this.type)?"default":this.type}},mounted:function(){this.toggleClickale()},destroyed:function(){this.toggleClickale()},watch:{value:function(){this.toggleClickale()},forbidClick:function(){this.toggleClickale()}},methods:{toggleClickale:function(){var t=this.value&&this.forbidClick;if(this.clickable!==t){this.clickable=t;var e=t?"add":"remove";document.body.classList[e]("van-toast--unclickable")}}}}),c=n("a142"),u={type:"text",mask:!1,message:"",value:!0,duration:3e3,position:"middle",loadingType:"circular",forbidClick:!1,overlayStyle:{}},d=function(t){return Object(c["d"])(t)?t:{message:t}},h=[],f=!0,p=Object(i["a"])({},u);function v(){if(c["e"])return{};if(!h.length||!f){var t=new(o["a"].extend(r))({el:document.createElement("div")});document.body.appendChild(t.$el),h.push(t)}return h[h.length-1]}function m(t){return t.overlay=t.mask,t}function b(t){void 0===t&&(t={});var e=v();return t=Object(i["a"])({},p,d(t),{clear:function(){e.value=!1,f||c["e"]||(document.body.removeChild(e.$el),e.$destroy())}}),Object(i["a"])(e,m(t)),clearTimeout(e.timer),t.duration>0&&(e.timer=setTimeout(function(){e.clear()},t.duration)),e}var g=function(t){return function(e){return b(Object(i["a"])({type:t},d(e)))}};["loading","success","fail"].forEach(function(t){b[t]=g(t)}),b.clear=function(t){h.length&&(t?(h.forEach(function(t){t.clear()}),h=[]):f?h[0].clear():h.shift().clear())},b.setDefaultOptions=function(t){Object(i["a"])(p,t)},b.resetDefaultOptions=function(){p=Object(i["a"])({},u)},b.allowMultiple=function(t){void 0===t&&(t=!0),f=!t},b.install=function(){o["a"].use(r)},o["a"].prototype.$toast=b;e["a"]=b},d8a9:function(t,e,n){"use strict";var i=n("8410"),o=n.n(i);o.a},db78:function(t,e,n){"use strict";n.d(e,"b",function(){return s}),n.d(e,"a",function(){return l});var i=n("a142"),o=!1;if(!i["e"])try{var a={};Object.defineProperty(a,"passive",{get:function(){o=!0}}),window.addEventListener("test-passive",null,a)}catch(r){}function s(t,e,n,a){void 0===a&&(a=!1),!i["e"]&&t.addEventListener(e,n,!!o&&{capture:!1,passive:a})}function l(t,e,n){!i["e"]&&t.removeEventListener(e,n)}},dde9:function(t,e,n){},e27c:function(t,e,n){"use strict";var i=n("fe7e");e["a"]=Object(i["a"])({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.b()},[t._t("default")],2)},name:"radio-group",props:{value:null,disabled:Boolean},watch:{value:function(t){this.$emit("change",t)}}})},e7e5:function(t,e,n){"use strict";n("68ef"),n("4d75"),n("b258")},f331:function(t,e,n){"use strict";e["a"]={data:function(){return{parent:null}},methods:{findParent:function(t){var e=this.$parent;while(e){if(e.$options.name===t){this.parent=e;break}e=e.$parent}}}}}}]);
  2. //# sourceMappingURL=chunk-6bbe4703.ccca3686.js.map