c-mobile
Version:
Vue 手机端组件,支持 megalo
2 lines (1 loc) • 49.1 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t(e.cMobile={},e.Vue)}(this,function(e,o){"use strict";o=o&&o.hasOwnProperty("default")?o.default:o;var l=!1,d=!1,u=void 0===u?"undefined"!=typeof wx&&wx:u;"undefined"!=typeof window?l=!0:u&&u.getSystemInfoSync()?(d=!0,u.getSystemInfoSync().model.indexOf("iPhone X")):"object"==typeof global&&global.process,u=!!d&&u;var p=function(e){return Object.prototype.toString.call(e).slice(8,-1)},_=function(){},f=function(n){var e=p(n);if("String"===e)return n;if("Object"===e&&n.path){var i=n.path,o="";return"Object"===p(n.query)&&0<Object.keys(n.query).length&&Object.keys(n.query).forEach(function(e,t){o+=(0===t&&-1===i.indexOf("?")?"?":"&")+e+"="+n.query[e]}),""+i+o}return""};function t(e){var t,n=e.vm,i=e.to,o=e.replace,s=e.success,c=e.fail,a=e.complete;if(i){var r=p(i);"String"===r&&(i=i.trim()),l?"Number"===r?n.$router.go(i):"String"!==r||0!==i.indexOf("//")&&0!==i.indexOf("http://")&&0!==i.indexOf("https://")?"String"===r&&0===i.indexOf("/")?n?o?n.$router.replace(i):n.$router.push(i):console.error("Require vm"):"Object"===r?0===i.path.indexOf("//")||0===i.path.indexOf("http://")||0===i.path.indexOf("https://")?(i=f(i),o?window.location.replace(i):window.location.href=i):o?n.$router.replace(i):n.$router.push(i):o?window.location.replace(i):window.location.href=i:(i=-1<i.indexOf(".")?i:i.substring(1),o?window.location.replace(i):window.location.href=i):d&&("Number"===r?u.navigateBack({delta:0<i?i:-i}):"String"===p(t=i)&&0===t.indexOf("tel:")?u.makePhoneCall({phoneNumber:i.replace("tel:","")}):(i={url:f(i),success:s||_,fail:c||_,complete:a||_},o?u.redirectTo(i):u.navigateTo(i)))}else n.$emit("click")}var n={name:"CButton",props:{type:{type:String,default:""},o:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},small:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},borderRadius:{type:Number,default:null},to:{type:[String,Object],default:null},icon:{type:[Boolean,String],default:!1},openType:{type:String,default:null},formType:{type:String,default:null},coverView:{type:Boolean,default:!1}},methods:{onClick:function(){this._disabled||t({vm:this,to:this.to})},onGetphonenumber:function(e){this.$emit("getphonenumber",e)}},mounted:function(){this._coverView&&this.loading&&console.warn("c-button cover-view 状态不支持 loading")},computed:{_borderRadius:function(){return null===this.borderRadius?this.borderRadius:this.borderRadius+"px"},_icon:function(){return"boolean"==typeof this.icon&&this.icon?"left":!!this.icon&&this.icon},_disabled:function(){return this.disabled||this.loading},_coverView:{get:function(){return this.coverView||this.$parent.coverView||!1}}}},i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e._coverView?n("cover-view",{staticClass:"c-button",class:[e.type?"c-button__"+e.type:"",e.icon?"c-button__icon-"+e.icon:"",{"c-button__o":e.o,"c-button__disabled":e._disabled,"c-button__small":e.small,"c-button__loading":e.loading}],style:{borderRadius:e._borderRadius},attrs:{"open-type":e.openType,"form-type":e.formType,"hover-class":"c-button-hover"},on:{click:e.onClick}},[n("cover-view",{staticClass:"c-button__text"},[e._t("default")],2)],1):n("button",{staticClass:"c-button",class:[e.type?"c-button__"+e.type:"",e.icon?"c-button__icon-"+e.icon:"",{"c-button__o":e.o,"c-button__disabled":e._disabled,"c-button__small":e.small,"c-button__loading":e.loading}],style:{borderRadius:e._borderRadius},attrs:{"open-type":e.openType,"form-type":e.formType,"hover-class":"c-button-hover"},on:{click:e.onClick,getphonenumber:e.onGetphonenumber}},[n("span",{staticClass:"c-button__text"},[e._t("default")],2)])};i._withStripped=!0;var s,c,a,r,h,m=(a=void 0,r=!(s={render:i,staticRenderFns:[]}),(h=("function"==typeof(c=n)?c.options:c)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/button/button.vue",h.render||(h.render=s.render,h.staticRenderFns=s.staticRenderFns,h._compiled=!0,r&&(h.functional=!0)),h._scopeId=a,h),g={name:"cFlex",props:{gutter:{type:Number,default:0},to:{type:[String,Object],default:null},coverView:{type:Boolean,default:!1},className:{type:String,default:null}},methods:{onClick:function(){t({vm:this,to:this.to})}}},v=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.coverView?n("cover-view",{staticClass:"c-flex",class:[e.className],on:{click:e.onClick}},[e._t("default")],2):n("div",{staticClass:"c-flex",class:[e.className],on:{click:e.onClick}},[e._t("default")],2)};v._withStripped=!0;var y,b,k,C,x,w=(k=void 0,C=!(y={render:v,staticRenderFns:[]}),(x=("function"==typeof(b=g)?b.options:b)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/flex/flex.vue",x.render||(x.render=y.render,x.staticRenderFns=y.staticRenderFns,x._compiled=!0,C&&(x.functional=!0)),x._scopeId=k,x),S={name:"cFlexItem",props:{flex:{type:Number,default:1},to:{type:[String,Object],default:null}},methods:{onClick:function(){t({vm:this,to:this.to})}},computed:{gutter:{get:function(){return this.$parent.gutter||0}},coverView:{get:function(){return this.$parent.coverView||!1}}}},R=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.coverView?n("cover-view",{staticClass:"c-flex-item",style:{flex:e.flex,margin:"0 "+e.gutter/2+"px"},on:{click:e.onClick}},[e._t("default")],2):n("div",{staticClass:"c-flex-item",style:{flex:e.flex,margin:"0 "+e.gutter/2+"px"},on:{click:e.onClick}},[e._t("default")],2)};R._withStripped=!0;var A,I,$,F,B,M=($=void 0,F=!(A={render:R,staticRenderFns:[]}),(B=("function"==typeof(I=S)?I.options:I)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/flex/flex-item.vue",B.render||(B.render=A.render,B.staticRenderFns=A.staticRenderFns,B._compiled=!0,F&&(B.functional=!0)),B._scopeId=$,B),E={name:"cHeader",data:function(){return{defaultTitle:"",paddingTop:null,paddingRight:null,paddingBottom:null,paddingLeft:null}},props:{autoTitle:{type:Boolean,default:!0},type:{type:String,default:""},left:{type:Object,default:function(){}},right:{type:Object,default:function(){}},noborderBottom:{type:Boolean,default:!1},noborder:{type:Boolean,default:!1},className:{type:String,default:null}},methods:{componentInit:function(){var n=this;u&&u.getSystemInfo({success:function(e){var t=u.getMenuButtonBoundingClientRect();n.paddingTop=t.top+"px",n.paddingRight=t.width+2*(e.windowWidth-t.right)+"px",n.paddingBottom="9px",n.paddingLeft=t.width+2*(e.windowWidth-t.right)+"px"}})},onLeft:function(){this._left.to?t({vm:this,to:this._left.to}):"function"==typeof this._left.click?this._left.click():this._left.back&&t({vm:this,to:-1})},onRight:function(){this._right.to?t({vm:this,to:this._right.to}):"function"==typeof this._right.click&&this._right.click()},onClose:function(){"function"==typeof this._left.close&&this._left.close()}},computed:{_left:{get:function(){return Object.assign({text:null,to:null,color:null,back:!1,close:null,click:null},this.left)}},_right:{get:function(){return Object.assign({text:null,to:null,color:null,click:function(){}},this.right)}}},mounted:function(){var e=this;this.autoTitle&&l&&this.$nextTick(function(){e.defaultTitle=document&&document.title}),this.componentInit()}},T=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"c-header",class:[e.type?"c-header__"+e.type:"",{"c-header__noborder-bottom":e.noborderBottom||e.noborder}],style:{paddingTop:e.paddingTop,paddingRight:e.paddingRight,paddingBottom:e.paddingBottom,paddingLeft:e.paddingLeft}},[e.$slots.left?n("span",{staticClass:"c-header__left"},[e._t("left")],2):e._left.text||e._left.back?n("span",{staticClass:"c-header__left",class:{"c-header__back":e._left.back},style:{color:e._left.color,bottom:e._left.back?e.paddingBottom:null},on:{click:e.onLeft}},[e._v("\n "+e._s(e._left.close?"":e._left.text)+"\n ")]):e._e(),e._v(" "),e._left.close?n("span",{staticClass:"c-header__close",on:{click:e.onClose}},[n("i")]):e._e(),e._v(" "),e.$slots.default?[e._t("default")]:e.defaultTitle?[e._v(e._s(e.defaultTitle))]:e._e(),e._v(" "),e.$slots.right?n("span",{staticClass:"c-header__right"},[e._t("right")],2):e._right.text?n("span",{staticClass:"c-header__right",style:{color:e._right.color},on:{click:e.onRight}},[e._v("\n "+e._s(e._right.text)+"\n ")]):e._e()],2)};T._withStripped=!0;var z,O,N,L,U,D=(N=void 0,L=!(z={render:T,staticRenderFns:[]}),(U=("function"==typeof(O=E)?O.options:O)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/header/header.vue",U.render||(U.render=z.render,U.staticRenderFns=z.staticRenderFns,U._compiled=!0,L&&(U.functional=!0)),U._scopeId=N,U),j={name:"cIcon",props:{name:{type:String,default:"",required:!0},type:{type:String,default:""},color:{type:String,default:""},backgroundColor:{type:String,default:""},size:{type:String,default:""},borderRadius:{type:String},to:{type:[String,Object],default:null}},methods:{onClick:function(){t({vm:this,to:this.to})}}},P=function(){var e=this,t=e.$createElement;return(e._self._c||t)("i",{staticClass:"c-icon",class:["icon-"+e.name,e.type?"c-icon__"+e.type:"",{"c-icon__background":e.backgroundColor}],style:{width:e.size,height:e.size,fontSize:e.size,backgroundColor:e.backgroundColor,color:e.color,borderRadius:e.borderRadius},on:{click:e.onClick}})};P._withStripped=!0;var H,V,Q,q,K,W=(Q=void 0,q=!(H={render:P,staticRenderFns:[]}),(K=("function"==typeof(V=j)?V.options:V)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/icon/icon.vue",K.render||(K.render=H.render,K.staticRenderFns=H.staticRenderFns,K._compiled=!0,q&&(K.functional=!0)),K._scopeId=Q,K),G={name:"cInputGroup",props:{title:{type:String,default:null},type:{type:String,default:null},noborder:{type:Boolean,default:!1},noborderTop:{type:Boolean,default:!1},noborderBottom:{type:Boolean,default:!1},labelWidth:{type:String,default:"110px"},className:{type:String,default:null}}},Y=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"c-input-group",class:[e.className]},[e.title?n("h5",{staticClass:"c-input-group__title",class:[e.type?"c-input-group__title-"+e.type:""]},[e._v("\n "+e._s(e.title)+"\n ")]):e._e(),e._v(" "),n("div",{staticClass:"c-input-group__content",class:{"c-input-group__noborder-top":e.noborderTop||e.noborder,"c-input-group__noborder-bottom":e.noborderBottom||e.noborder}},[e._t("default")],2)])};Y._withStripped=!0;var Z,X,J,ee,te,ne=(J=void 0,ee=!(Z={render:Y,staticRenderFns:[]}),(te=("function"==typeof(X=G)?X.options:X)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/input-group/input-group.vue",te.render||(te.render=Z.render,te.staticRenderFns=Z.staticRenderFns,te._compiled=!0,ee&&(te.functional=!0)),te._scopeId=J,te),ie={name:"cInput",props:{addon:{type:Boolean,default:!1},useDiv:{type:Boolean,default:!1},useButton:{type:Boolean,default:!1},openType:{type:String,default:null},next:{type:Boolean,default:null},icon:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},to:{type:[String,Object],default:null},noborderTop:{type:Boolean,default:!1},className:{type:String,default:null},required:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},active:{type:Boolean,default:!1},direction:{type:String,default:"row"}},methods:{onClick:function(){!1!==this.next&&t({vm:this,to:this.to})}},computed:{labelWidth:function(){return this.$parent.labelWidth},_useButton:function(){return!!this.useButton||!!this.openType}}},oe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.useDiv&&e.visible?n("div",{staticClass:"c-input",class:[e.className,{"c-input__addon":e.addon,"c-input__next":e.next,"c-input__active":e.active,"c-input__icon":e.icon,"c-input__checked":e.checked,"c-input__noborder-top":e.noborderTop,"c-input__direction-column":"column"===e.direction}],on:{touchstart:function(){},click:e.onClick}},[e._t("default")],2):e._useButton&&e.visible?n("button",{staticClass:"c-input",class:[e.className,{"c-input__addon":e.addon,"c-input__next":e.next,"c-input__active":e.active,"c-input__icon":e.icon,"c-input__checked":e.checked,"c-input__noborder-top":e.noborderTop,"c-input__direction-column":"column"===e.direction}],attrs:{"open-type":e.openType},on:{click:e.onClick}},[e._t("default")],2):e.visible?n("label",{staticClass:"c-input",class:[e.className,{"c-input__addon":e.addon,"c-input__next":e.next,"c-input__active":e.active,"c-input__icon":e.icon,"c-input__checked":e.checked,"c-input__noborder-top":e.noborderTop,"c-input__direction-column":"column"===e.direction}],on:{touchstart:function(){},click:e.onClick}},[e._t("default")],2):e._e()};oe._withStripped=!0;var se,ce,ae,re,le,de=(ae=void 0,re=!(se={render:oe,staticRenderFns:[]}),(le=("function"==typeof(ce=ie)?ce.options:ce)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/input-group/input.vue",le.render||(le.render=se.render,le.staticRenderFns=se.staticRenderFns,le._compiled=!0,re&&(le.functional=!0)),le._scopeId=ae,le),ue={name:"cInputHead",props:{to:{type:[String,Object],default:null}},methods:{onClick:function(){t({vm:this,to:this.to})}},computed:{labelWidth:function(){return this.$parent.labelWidth||"110px"},required:function(){return this.$parent.required}}},pe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"c-input-head",style:{"min-width":e.labelWidth},on:{click:e.onClick}},[e.required?n("span",{staticStyle:{color:"#f00"}},[e._v("*")]):e._e(),e._v(" "),e._t("default")],2)};pe._withStripped=!0;var _e,fe,he,me,ge,ve=(he=void 0,me=!(_e={render:pe,staticRenderFns:[]}),(ge=("function"==typeof(fe=ue)?fe.options:fe)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/input-group/input-head.vue",ge.render||(ge.render=_e.render,ge.staticRenderFns=_e.staticRenderFns,ge._compiled=!0,me&&(ge.functional=!0)),ge._scopeId=he,ge),ye={name:"cInputBody",props:{to:{type:[String,Object],default:null}},methods:{onClick:function(){t({vm:this,to:this.to})}}},be=function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"c-input-body",on:{click:this.onClick}},[this._t("default")],2)};be._withStripped=!0;var ke,Ce,xe,we,Se,Re=(xe=void 0,we=!(ke={render:be,staticRenderFns:[]}),(Se=("function"==typeof(Ce=ye)?Ce.options:Ce)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/input-group/input-body.vue",Se.render||(Se.render=ke.render,Se.staticRenderFns=ke.staticRenderFns,Se._compiled=!0,we&&(Se.functional=!0)),Se._scopeId=xe,Se),Ae={name:"cInputUpload",props:{title:{type:String,default:null},allowUpload:{type:Boolean,default:null},inputUpload:{type:Boolean,default:!1},amount:{type:Number,default:null},maxAmount:{type:Number,default:null},noborderTop:{type:Boolean,default:!1},allowDelete:{type:Boolean,default:!1},accept:{type:String,default:"image/*"},required:{type:Boolean,default:!1}},methods:{onClick:function(){this.$emit("upload")},onFileChange:function(e){this.$emit("change",e)}},computed:{_allowUpload:function(){return"boolean"==typeof this.allowUpload?this.allowUpload:null!==this.amount&&this.maxAmount>this.amount}}},Ie=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"c-input-upload",class:[{"noborder-top":e.noborderTop,"c-input-upload__allow-delete":e.allowDelete}]},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.$slots.title||e.title,expression:"$slots.title || title"}],staticClass:"c-input-upload__title"},[e.required?n("span",{staticStyle:{color:"#f00"}},[e._v("*")]):e._e(),e._v(e._s(e.title)+"\n "),e._t("title")],2),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:null!==e.amount,expression:"amount !== null"}],staticClass:"c-input-upload__amount"},[e._v("\n "+e._s(e.amount)+"/"+e._s(e.maxAmount)+"\n ")]),e._v(" "),n("div",{staticClass:"c-input-upload__files"},[e._t("default"),e._v(" "),e.$slots["upload-button"]?[n("div",{staticClass:"c-input-upload__button"},[e._t("upload-button")],2)]:n("div",{directives:[{name:"show",rawName:"v-show",value:e._allowUpload,expression:"_allowUpload"}],staticClass:"c-input-upload__button",on:{click:e.onClick}},[n("input",{directives:[{name:"show",rawName:"v-show",value:e.inputUpload,expression:"inputUpload"}],attrs:{accept:e.accept,type:"file"},on:{change:e.onFileChange}})])],2)])};Ie._withStripped=!0;var $e,Fe,Be,Me,Ee,Te=(Be=void 0,Me=!($e={render:Ie,staticRenderFns:[]}),(Ee=("function"==typeof(Fe=Ae)?Fe.options:Fe)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/input-group/input-upload/upload.vue",Ee.render||(Ee.render=$e.render,Ee.staticRenderFns=$e.staticRenderFns,Ee._compiled=!0,Me&&(Ee.functional=!0)),Ee._scopeId=Be,Ee),ze={name:"cInputUploadFile",props:{src:{type:String,default:""}},methods:{onClick:function(){this.$emit("click")},onDelete:function(){this.$emit("delete")}}},Oe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.src?n("div",{staticClass:"c-input-upload-file",on:{click:t.onClick}},[n("img",{attrs:{src:t.src}}),t._v(" "),n("i",{on:{click:function(e){return e.stopPropagation(),t.onDelete(e)}}})]):t._e()};Oe._withStripped=!0;var Ne,Le,Ue,De,je,Pe=(Ue=void 0,De=!(Ne={render:Oe,staticRenderFns:[]}),(je=("function"==typeof(Le=ze)?Le.options:Le)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/input-group/input-upload/upload-file.vue",je.render||(je.render=Ne.render,je.staticRenderFns=Ne.staticRenderFns,je._compiled=!0,De&&(je.functional=!0)),je._scopeId=Ue,je),He={name:"cSwitch",data:function(){return{isLoading:!1}},props:{value:{type:Boolean,default:!1},type:{type:String,default:""},disabled:{type:Boolean,default:!1},small:{type:Boolean,default:!1},beforeChange:{type:[Function,Object]},beforeChangeLoading:{type:Boolean,default:!0}},methods:{onClick:function(){var e=this;if(!this.disabled){this.beforeChange&&this.beforeChangeLoading&&(this.isLoading=!0);var t=!this._value;u&&u.vibrateShort(),this.beforeChange?"function"==typeof this.beforeChange?this.beforeChange(function(){e.$emit("input",t),e.$emit("change",t),e.isLoading=!1}):"object"==typeof this.beforeChange&&"function"==typeof this.beforeChange.beforeChange&&this.beforeChange.beforeChange(function(){e.$emit("input",t),e.$emit("change",t),e.isLoading=!1},this.beforeChange.data):(this.$emit("input",t),this.$emit("change",t),this.isLoading=!1)}}},computed:{_value:{get:function(){return this.value}},_isLoading:{get:function(){return!this.disabled&&this.isLoading}}}},Ve=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"c-switch",class:[e.type?"c-switch__"+e.type:"",{"c-switch__disabled":e.disabled,"c-switch__checked":e._value,"c-switch__small":e.small,"c-switch__before-change-loading":e._isLoading}],on:{click:e.onClick}},[e._m(0)])};Ve._withStripped=!0;var Qe,qe,Ke,We,Ge,Ye=(Ke=void 0,We=!(Qe={render:Ve,staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("span",{staticClass:"c-switch__core"},[t("i")])}]}),(Ge=("function"==typeof(qe=He)?qe.options:qe)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/switch/switch.vue",Ge.render||(Ge.render=Qe.render,Ge.staticRenderFns=Qe.staticRenderFns,Ge._compiled=!0,We&&(Ge.functional=!0)),Ge._scopeId=Ke,Ge),Ze={name:"cTab",props:{type:{type:String,default:""}}},Xe=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"c-tab",class:[e.type?"c-tab__"+e.type:""]},[e._t("default")],2)};Xe._withStripped=!0;var Je,et,tt,nt,it,ot=(tt=void 0,nt=!(Je={render:Xe,staticRenderFns:[]}),(it=("function"==typeof(et=Ze)?et.options:et)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/tab/tab.vue",it.render||(it.render=Je.render,it.staticRenderFns=Je.staticRenderFns,it._compiled=!0,nt&&(it.functional=!0)),it._scopeId=tt,it),st={name:"cTabItem",props:{current:{type:Boolean,default:!1},to:{type:[String,Object],default:null}},methods:{onClick:function(){t({vm:this,to:this.to,replace:!0})}}},ct=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"c-tab-item",class:{"c-tab__current":e.current},on:{click:e.onClick}},[e._t("default")],2)};ct._withStripped=!0;var at,rt,lt,dt,ut,pt=(lt=void 0,dt=!(at={render:ct,staticRenderFns:[]}),(ut=("function"==typeof(rt=st)?rt.options:rt)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/tab/tab-item.vue",ut.render||(ut.render=at.render,ut.staticRenderFns=at.staticRenderFns,ut._compiled=!0,dt&&(ut.functional=!0)),ut._scopeId=lt,ut),_t={name:"cTabbar",props:{type:{type:String,default:""},shadow:{type:Boolean,default:!1}}},ft=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"c-tabbar",class:[e.type?"c-tabbar__"+e.type:"",{"c-tabbar__shadow":e.shadow}]},[n("div",{staticClass:"c-tabbar__cell"},[e._t("default")],2)])};ft._withStripped=!0;var ht,mt,gt,vt,yt,bt=(gt=void 0,vt=!(ht={render:ft,staticRenderFns:[]}),(yt=("function"==typeof(mt=_t)?mt.options:mt)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/tabbar/tabbar.vue",yt.render||(yt.render=ht.render,yt.staticRenderFns=ht.staticRenderFns,yt._compiled=!0,vt&&(yt.functional=!0)),yt._scopeId=gt,yt),kt={name:"cTabbarItem",props:{to:{type:[String,Object],default:null},current:{type:Boolean,default:!1},active:{type:Boolean,default:!1},text:{type:String,default:null},badge:{type:Number,default:null},src:{type:String,default:null},activeSrc:{type:String,default:null}},methods:{onClick:function(){this._active||t({vm:this,to:this.to,replace:!0})}},computed:{_active:function(){return this.active||this.current}}},Ct=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"c-tabbar-item",class:{"c-tabbar__active":e._active},on:{click:e.onClick}},[e._t("default",[n("i",[n("img",{attrs:{src:e._active?e.activeSrc:e.src}})]),e._v(" "),n("p",{directives:[{name:"show",rawName:"v-show",value:e.text,expression:"text"}]},[e._v(e._s(e.text))])]),e._v(" "),n("b",{directives:[{name:"show",rawName:"v-show",value:e.badge,expression:"badge"}]},[e._v(e._s(e.badge))])],2)};Ct._withStripped=!0;var xt,wt,St,Rt,At,It=(St=void 0,Rt=!(xt={render:Ct,staticRenderFns:[]}),(At=("function"==typeof(wt=kt)?wt.options:wt)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/tabbar/tabbar-item.vue",At.render||(At.render=xt.render,At.staticRenderFns=xt.staticRenderFns,At._compiled=!0,Rt&&(At.functional=!0)),At._scopeId=St,At),$t={name:"cText",data:function(){return{isEmpty:!1,isPlaceholder:!1}},props:{text:{type:String,default:""},type:{type:String,default:""},bold:{type:Boolean,default:!1},light:{type:Boolean,default:!1},to:{type:[String,Object],default:null},block:{type:Boolean,default:!1},placeholder:{type:String,default:null},cursor:{type:Boolean,default:!1},align:{type:String,default:null},disabled:{type:Boolean,default:!1},coverView:{type:Boolean,default:!1},next:{type:Boolean,default:!1},className:{type:String,default:null},componentStyle:{type:Object,default:function(){}}},methods:{onClick:function(){this.disabled||t({vm:this,to:this.to})},setIsEmptyOrIsPlaceholder:function(){var e=this.$slots.default&&this.$slots.default[0]&&this.$slots.default[0].text;this.isEmpty=!(null!=e&&""!==e||null!==this.text&&void 0!==this.text&&""!==this.text),this.isPlaceholder=void 0!==this.placeholder&&null!==this.placeholder&&this.isEmpty}},computed:{_coverView:{get:function(){return this.coverView||this.$parent.coverView||!1}}},mounted:function(){this.setIsEmptyOrIsPlaceholder()},beforeUpdate:function(){this.setIsEmptyOrIsPlaceholder()}},Ft=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e._coverView?n("cover-view",{staticClass:"c-text",class:[e.type?"c-text__"+e.type:"",e.align?"c-text__"+e.align:"",e.className?e.className:"",{"c-text__light":e.light,"c-text__block":e.block,"c-text__cursor":e.cursor,"c-text__empty":e.isEmpty,"c-text__placeholder":e.isPlaceholder,"c-text__next":e.next,"c-text__bold":e.bold}],style:e.componentStyle,on:{click:e.onClick}},[null!==e.text&&void 0!==e.text&&""!==e.text?[e._v("\n "+e._s(e.text)+"\n ")]:e.isPlaceholder?[n("cover-view",{staticClass:"c-text__content",style:e.componentStyle},[e._v(e._s(e.placeholder))])]:n("cover-view",{staticClass:"c-text__content",style:e.componentStyle},[e._t("default",[e._v(e._s(e.text))])],2)],2):n("div",{staticClass:"c-text",class:[e.type?"c-text__"+e.type:"",e.align?"c-text__"+e.align:"",e.className?e.className:"",{"c-text__light":e.light,"c-text__block":e.block,"c-text__cursor":e.cursor,"c-text__empty":e.isEmpty,"c-text__placeholder":e.isPlaceholder,"c-text__next":e.next,"c-text__bold":e.bold}],style:e.componentStyle,on:{click:e.onClick}},[null!==e.text&&void 0!==e.text&&""!==e.text?[e._v("\n "+e._s(e.text)+"\n ")]:e.isPlaceholder?[n("span",{staticClass:"c-text__content",style:e.componentStyle},[e._v(e._s(e.placeholder))])]:n("span",{staticClass:"c-text__content",style:e.componentStyle},[e._t("default",[e._v(e._s(e.text))])],2)],2)};Ft._withStripped=!0;var Bt,Mt,Et,Tt,zt,Ot=(Et=void 0,Tt=!(Bt={render:Ft,staticRenderFns:[]}),(zt=("function"==typeof(Mt=$t)?Mt.options:Mt)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/text/text.vue",zt.render||(zt.render=Bt.render,zt.staticRenderFns=Bt.staticRenderFns,zt._compiled=!0,Tt&&(zt.functional=!0)),zt._scopeId=Et,zt),Nt={name:"cActionsheet",props:{value:{type:Boolean,default:!1},title:{type:String},description:{type:String},actions:{type:Array,default:function(){return[]}},options:{type:Array,default:function(){return[]}},cancelText:{type:String,default:"Cancel"},cancelStyle:{type:Object,default:function(){}},visible:{type:Boolean,default:!1}},methods:{onOption:function(e){e.click&&e.click(),this._value=!1},onCancel:function(){this._value=!1}},computed:{_value:{get:function(){return this.value},set:function(e){this.$emit("input",e)}},_options:function(){return Array.isArray(this.options)&&0<this.options.length?this.options:Array.isArray(this.actions)&&0<this.actions.length?this.actions:[]}}},Lt=function(){var n=this,e=n.$createElement,i=n._self._c||e;return i("div",{staticClass:"c-actionsheet",class:{"c-actionsheet__visible":n.value,"c-actionsheet__title":n.title||n.description,"c-actionsheet__options-empty":Array.isArray(n._options)&&0===n._options.length},attrs:{catchtouchmove:""},on:{click:n.onCancel}},[i("div",{staticClass:"c-actionsheet__content"},[i("div",{staticClass:"c-actionsheet__header",on:{click:function(e){e.stopPropagation()}}},[n.title?i("h5",{staticClass:"c-actionsheet__title"},[n._v("\n "+n._s(n.title)+"\n ")]):n._e(),n._v(" "),n.description?i("p",{staticClass:"c-actionsheet__description"},[n._v("\n "+n._s(n.description)+"\n ")]):n._e()]),n._v(" "),i("div",{staticClass:"c-actionsheet__options"},n._l(n._options,function(t,e){return i("button",{key:e,style:{color:t.color,fontWeight:t.bold||"normal"},attrs:{"session-from":t.sessionFrom,"send-message-title":t.itemMessageTitle,"send-message-path":t.itemMessagePath,"send-message-img":t.itemMessageImg,"show-message-card":t.itemMessageCard,"open-type":t.openType},on:{click:function(e){e.stopPropagation(),n.onOption(t)}}},[n._v(n._s(t.text))])})),n._v(" "),i("div",{staticClass:"c-actionsheet__cancel",style:n.cancelStyle,on:{click:function(e){return e.stopPropagation(),n.onCancel(e)}}},[n._v("\n "+n._s(n.cancelText)+"\n ")])])])};Lt._withStripped=!0;var Ut,Dt,jt,Pt,Ht,Vt=(jt=void 0,Pt=!(Ut={render:Lt,staticRenderFns:[]}),(Ht=("function"==typeof(Dt=Nt)?Dt.options:Dt)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/actionsheet/actionsheet.vue",Ht.render||(Ht.render=Ut.render,Ht.staticRenderFns=Ut.staticRenderFns,Ht._compiled=!0,Pt&&(Ht.functional=!0)),Ht._scopeId=jt,Ht),Qt={name:"cSidebar",props:{visible:{type:Boolean,default:!1}}},qt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"c-sidebar",class:[{"c-sidebar__visible":e.visible,"c-sidebar__head":e.$slots.head}]},[e._t("head"),e._v(" "),n("div",{staticClass:"c-sidebar__body"},[e._t("default")],2)],2)};qt._withStripped=!0;var Kt,Wt,Gt,Yt,Zt,Xt=(Gt=void 0,Yt=!(Kt={render:qt,staticRenderFns:[]}),(Zt=("function"==typeof(Wt=Qt)?Wt.options:Wt)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/sidebar/sidebar.vue",Zt.render||(Zt.render=Kt.render,Zt.staticRenderFns=Kt.staticRenderFns,Zt._compiled=!0,Yt&&(Zt.functional=!0)),Zt._scopeId=Gt,Zt),Jt={name:"cSearch",data:function(){return{isMiniProgram:d}},props:{value:{type:String,default:""},placeholder:{type:String,default:""},autofocus:{type:Boolean,default:!1},focus:{type:Boolean,default:!1},backgroundColor:{type:String,default:null},inputBackgroundColor:{type:String,default:null},round:{type:Boolean,default:!1},to:{type:String,default:null},inputHeight:{type:[String,Number],default:null}},mounted:function(){l&&this._autofocus&&this.$refs.search&&this.$refs.search.focus()},methods:{onClick:function(){this.to&&t({vm:this,to:this.to})},onKeyUp:function(e){"Enter"===e.key&&this.$emit("keyup-enter",this._value)},onConfirm:function(e){"string"==typeof e.target.value&&""!==e.target.value.trim()&&this.$emit("keyup-enter",e.target.value)},onCancel:function(){this._value="",this.$emit("cancel")}},computed:{_value:{get:function(){return this.value},set:function(e){this.$emit("input",e),this.$emit("change",e)}},_visible:function(){return"string"==typeof this.value&&""!==this.value.trim()&&!this.to},_autofocus:function(){return this.autofocus||this.focus},_inputHeight:function(){return this.inputHeight?"string"==typeof this.inputHeight&&-1<this.inputHeight.indexOf("px")?this.inputHeight:this.inputHeight+"px":null},_inputPadding:function(){var e;return this.inputHeight||!l?(e="string"==typeof this.inputHeight&&-1<this.inputHeight.indexOf("px")?parseInt(this.inputHeight.replace("px",""),10):this.inputHeight,l?(e-16)/2+"px 10px "+(e-16)/2+"px 32px":"0 10px 0 32px"):"7px 10px 7px 32px"},_disabled:function(){return null!==this.to}}},en=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{staticClass:"c-search",class:{"c-search__cancel-visible":t._visible,"c-search__round":t.round},style:{backgroundColor:t.backgroundColor},attrs:{action:"",onsubmit:"return false;"},on:{click:t.onClick}},[n("div",{staticClass:"c-search__cell"},[n("i",{staticClass:"c-search__icon-search",style:{left:t.isMiniProgram&&t.round?"5px":null,width:t.isMiniProgram?"30px":null}},[n("img",{style:{width:t.isMiniProgram?"20px":null,height:t.isMiniProgram?"20px":null},attrs:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAM1BMVEUAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAr6XIYAAAAEHRSTlMA7xCA32Awz79AcJ+QIFCwFs9njwAAANNJREFUOMvtk90OgzAIRouC/e++93/aqclCLFq9WbKLnUs8BYHW/QjTIiJxutNiIOwEGWtQuF16CSuUk6TMWJkvvBmAj5/k/tIUAKU7l5ylcp8hAVStmIHchQoQ7PgIqCcxM9AG5LP2krNlohEX4NXHwlbFQOA+5AFnYZAJjcX70v5pM+FkgWU8Hh0u1ZOtVnvazqzoEo4p7aVAdZaGoznD/rZ+YTm8ClouTXCeJRXeNTVtmwrHyavZIwHQ5zoy3RSbyLKtU80h3zVf7pGZqbk/D3gDeQoM2LnjNc8AAAAASUVORK5CYII="}})]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t._value,expression:"_value"}],ref:"search",staticClass:"c-search__input",class:{"c-search__input-disabled":t.to},style:{backgroundColor:t.inputBackgroundColor,height:t._inputHeight,padding:t._inputPadding,borderRadius:t._inputHeight,fontSize:t.isMiniProgram?"14px":null},attrs:{type:"search","confirm-type":"search",focus:t._autofocus,placeholder:t.placeholder,"placeholder-class":"c-search__placeholder",disabled:t._disabled},domProps:{value:t._value},on:{keyup:t.onKeyUp,confirm:t.onConfirm,input:function(e){e.target.composing||(t._value=e.target.value)}}}),t._v(" "),t._disabled?t._e():n("i",{staticClass:"c-search__icon-cancel",style:{backgroundColor:t.inputBackgroundColor,borderRadius:t._inputHeight,width:t.isMiniProgram?"45px":null},on:{click:t.onCancel}},[n("img",{style:{width:t.isMiniProgram?"20px":null,height:t.isMiniProgram?"20px":null},attrs:{src:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAgMjAiPgogICAgICAgIDxwYXRoIGZpbGw9IiNiYmIiIGQ9Ik0xNC4xOCAxMy4wMDhsLTMuMDA4LTMuMDA4IDMuMDA4LTMuMDA4LTEuMTcyLTEuMTcyLTMuMDA4IDMuMDA4LTMuMDA4LTMuMDA4LTEuMTcyIDEuMTcyIDMuMDA4IDMuMDA4LTMuMDA4IDMuMDA4IDEuMTcyIDEuMTcyIDMuMDA4LTMuMDA4IDMuMDA4IDMuMDA4ek0xMCAxLjY4YzQuNjA5IDAgOC4zMiAzLjcxMSA4LjMyIDguMzJzLTMuNzExIDguMzItOC4zMiA4LjMyLTguMzItMy43MTEtOC4zMi04LjMyIDMuNzExLTguMzIgOC4zMi04LjMyeiI+PC9wYXRoPgogICAgICA8L3N2Zz4="}})])])])};en._withStripped=!0;var tn,nn,on,sn,cn,an=(on=void 0,sn=!(tn={render:en,staticRenderFns:[]}),(cn=("function"==typeof(nn=Jt)?nn.options:nn)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/search/search.vue",cn.render||(cn.render=tn.render,cn.staticRenderFns=tn.staticRenderFns,cn._compiled=!0,sn&&(cn.functional=!0)),cn._scopeId=on,cn),rn={name:"cKeyboardKey",props:{text:[String,Number]},data:function(){return{active:!1}},methods:{onClick:function(){""!==this.text&&(this.active=!0,this.$emit("click",this.text))},onBlur:function(){this.active=!1}}},ln=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-keyboard__key",class:{"c-keyboard__key-active":t.active,"c-keyboard__key-empty":""===t.text},on:{touchstart:function(e){return e.stopPropagation(),e.preventDefault(),t.onClick(e)},touchmove:t.onBlur,touchend:t.onBlur,touchcancel:t.onBlur,mousedown:t.onClick,mouseup:t.onBlur}},[t._v("\n "+t._s(t.text)+"\n "),n("i",{staticClass:"c-keyboard__border"})])};ln._withStripped=!0;var dn,un,pn,_n,fn,hn=(pn=void 0,_n=!(dn={render:ln,staticRenderFns:[]}),(fn=("function"==typeof(un=rn)?un.options:un)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/keyboard/keyboard-key.vue",fn.render||(fn.render=dn.render,fn.staticRenderFns=dn.staticRenderFns,fn._compiled=!0,_n&&(fn.functional=!0)),fn._scopeId=pn,fn),mn={name:"cKeyboard",mounted:function(){l&&(void 0===window.ontouchstart?document.addEventListener("click",this.hideKeyboard,!0):document.addEventListener("touchstart",this.hideKeyboard,!0))},props:{value:{type:Boolean,default:!1},type:{type:String,default:"digit"},description:{type:String,default:null},doneText:{type:String,default:null},supportHide:{type:Boolean,default:!0}},methods:{onClick:function(e){this.$emit("click",e)},onDelete:function(){this.$emit("delete")},doneClick:function(){this.supportHide&&(this._value=!1,this.$emit("hide")),this.$emit("done")},hideKeyboard:function(e){this.supportHide&&!1!==this._value&&-1===e.target.className.indexOf("c-keyboard")&&(this._value=!1,this.$emit("hide"))}},computed:{_typeText:{get:function(){return"number"===this.type?"":"idcard"===this.type?"X":"."}},_value:{get:function(){return!this.supportHide||this.value},set:function(e){this.$emit("input",e)}}},components:{cKeyboardKey:hn},beforeDestroy:function(){l&&(void 0===window.ontouchstart?document.removeEventListener("click",this.hideKeyboard,!0):document.removeEventListener("touchstart",this.hideKeyboard,!0))}},gn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"c-keyboard-transition"}},[e._value?n("div",{staticClass:"c-keyboard"},[e.description||e.doneText?n("div",{staticClass:"c-keyboard__done"},[n("div",{staticClass:"c-keyboard__description"},[e._v(e._s(e.description))]),e._v(" "),n("div",{staticClass:"c-keyboard__done-button",on:{click:e.doneClick}},[e._v(e._s(e.doneText))])]):e._e(),e._v(" "),n("div",{staticClass:"c-keyboard__key-group"},[n("c-keyboard-key",{attrs:{text:"1"},on:{click:e.onClick}}),e._v(" "),n("c-keyboard-key",{attrs:{text:"2"},on:{click:e.onClick}}),e._v(" "),n("c-keyboard-key",{attrs:{text:"3"},on:{click:e.onClick}})],1),e._v(" "),n("div",{staticClass:"c-keyboard__key-group"},[n("c-keyboard-key",{attrs:{text:"4"},on:{click:e.onClick}}),e._v(" "),n("c-keyboard-key",{attrs:{text:"5"},on:{click:e.onClick}}),e._v(" "),n("c-keyboard-key",{attrs:{text:"6"},on:{click:e.onClick}})],1),e._v(" "),n("div",{staticClass:"c-keyboard__key-group"},[n("c-keyboard-key",{attrs:{text:"7"},on:{click:e.onClick}}),e._v(" "),n("c-keyboard-key",{attrs:{text:"8"},on:{click:e.onClick}}),e._v(" "),n("c-keyboard-key",{attrs:{text:"9"},on:{click:e.onClick}})],1),e._v(" "),n("div",{staticClass:"c-keyboard__key-group"},[n("c-keyboard-key",{staticClass:"c-keyboard__key-gray",attrs:{text:e._typeText},on:{click:e.onClick}}),e._v(" "),n("c-keyboard-key",{attrs:{text:"0"},on:{click:e.onClick}}),e._v(" "),n("c-keyboard-key",{staticClass:"c-keyboard__key-gray c-keyboard__key-delete",on:{click:e.onDelete}})],1)]):e._e()])};gn._withStripped=!0;var vn,yn,bn,kn,Cn,xn=(bn=void 0,kn=!(vn={render:gn,staticRenderFns:[]}),(Cn=("function"==typeof(yn=mn)?yn.options:yn)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/keyboard/keyboard.vue",Cn.render||(Cn.render=vn.render,Cn.staticRenderFns=vn.staticRenderFns,Cn._compiled=!0,kn&&(Cn.functional=!0)),Cn._scopeId=bn,Cn),wn={name:"cRadioGroup",props:{type:{type:String,default:""},disabled:{type:Boolean,default:!1},align:{type:String,default:"left"},value:{}},methods:{onChange:function(e){this.$emit("input",e),this.$emit("change",e)}}},Sn=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"c-radio-group",class:["c-radio-group__"+e.align,e.type?"c-radio-group__"+e.type:"",{"c-radio-group__disabled":e.disabled}]},[e._t("default")],2)};Sn._withStripped=!0;var Rn,An,In,$n,Fn,Bn=(In=void 0,$n=!(Rn={render:Sn,staticRenderFns:[]}),(Fn=("function"==typeof(An=wn)?An.options:An)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/radio/radio-group.vue",Fn.render||(Fn.render=Rn.render,Fn.staticRenderFns=Rn.staticRenderFns,Fn._compiled=!0,$n&&(Fn.functional=!0)),Fn._scopeId=In,Fn),Mn={name:"cRadio",data:function(){return{parent:this.$parent}},props:{value:{}},created:function(){for(;this.parent&&this.parent.$options&&this.parent.$options.name&&"cRadioGroup"!==this.parent.$options.name;)this.parent=this.parent.$parent},methods:{onClick:function(){this.parent.disabled||this.parent.onChange(this.value)}},computed:{currentValue:{get:function(){return this.parent.value}}}},En=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"c-radio",class:{"c-radio__checked":e.currentValue===e.value},on:{click:e.onClick}},[n("i",{staticClass:"c-radio__core"}),e._v(" "),e._t("default")],2)};En._withStripped=!0;var Tn,zn,On,Nn,Ln,Un=(On=void 0,Nn=!(Tn={render:En,staticRenderFns:[]}),(Ln=("function"==typeof(zn=Mn)?zn.options:zn)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/radio/radio.vue",Ln.render||(Ln.render=Tn.render,Ln.staticRenderFns=Tn.staticRenderFns,Ln._compiled=!0,Nn&&(Ln.functional=!0)),Ln._scopeId=On,Ln),Dn={name:"cContainer",data:function(){return{element:null}},props:{fixed:{type:String,default:null},safeArea:{type:Boolean,default:null},backgroundColor:{type:String,default:null},padding:{type:String,default:null},zIndex:{type:Number,default:null},useForm:{type:Boolean,default:!1}},beforeMount:function(){this.componentRemove()},mounted:function(){this.componentInit()},beforeUpdate:function(){this.componentRemove()},updated:function(){this.componentInit()},beforeDestroy:function(){this.componentRemove()},methods:{onClick:function(e){this.$emit("click",e)},componentInit:function(){var e,t=this;if(this.fixed&&l&&(this.$refs.container&&this.$refs.container.firstChild&&this.$refs.container.firstChild.classList&&this.$refs.container.firstChild.classList[0]&&(e="c-container-cover__fixed-"+this.fixed+"__"+this.$refs.container.firstChild.classList[0]),e&&0===document.querySelectorAll("."+e).length)){this.element=document.createElement("div"),this.element.className=e;var n=this.$refs.container.clientHeight;n=Number.isNaN(n)?0:parseInt(n),this.element.style.paddingTop=n+"px","top"===this.fixed?document.body.insertBefore(this.element,document.body.firstChild):"bottom"===this.fixed&&this.$nextTick(function(){if(t.$refs.container&&t.element){if(t._safeArea){t.element.classList.add("c-container-cover__fixed-bottom-safe-area");var e=t.$refs.container.style.paddingBottom.replace("px","");e=Number.isNaN(e)?0:parseInt(e),t.$refs.container.style.paddingBottom=e+"px"}t.backgroundColor||(t.$refs.container.style.backgroundColor=window.getComputedStyle(t.$refs.container.firstChild).backgroundColor),document.body.appendChild(t.element)}})}},componentRemove:function(){this.fixed&&l&&this.element&&this.element.remove()}},computed:{_zIndex:function(){return this.fixed?this.zIndex?this.zIndex:1e3:this.zIndex},_safeArea:function(){return"bottom"===this.fixed&&null===this.safeArea||this.safeArea}}},jn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.useForm?n("form",{ref:"container",staticClass:"c-container",class:[e.fixed?"c-container__fixed-"+e.fixed:"",{"c-container__safe-area":e._safeArea}],style:{backgroundColor:e.backgroundColor,padding:e.padding,zIndex:e._zIndex},attrs:{"report-submit":""},on:{click:e.onClick}},[e._t("default")],2):n("div",{ref:"container",staticClass:"c-container",class:[e.fixed?"c-container__fixed-"+e.fixed:"",{"c-container__safe-area":e._safeArea}],style:{backgroundColor:e.backgroundColor,padding:e.padding,zIndex:e._zIndex},on:{click:e.onClick}},[e._t("default")],2)};jn._withStripped=!0;var Pn,Hn,Vn,Qn,qn,Kn=(Vn=void 0,Qn=!(Pn={render:jn,staticRenderFns:[]}),(qn=("function"==typeof(Hn=Dn)?Hn.options:Hn)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/container/container.vue",qn.render||(qn.render=Pn.render,qn.staticRenderFns=Pn.staticRenderFns,qn._compiled=!0,Qn&&(qn.functional=!0)),qn._scopeId=Vn,qn),Wn={name:"cLoadMore",props:{loading:{type:Boolean,default:!1},text:{type:String,default:"到底了"},backgroundColor:{type:String,default:"#f2f2f2"},color:{type:String,default:null},safeArea:{type:Boolean,default:!1}}},Gn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"c-load-more",class:[e.loading?"c-load-more__loading":"c-load-more__end",{"c-load-more_safe-area":e.safeArea}]},[n("div",{staticClass:"c-load-more__content"},[e.loading?e._e():n("span",{style:{backgroundColor:e.backgroundColor,color:e.color}},[e._v(e._s(e.text))])])])};Gn._withStripped=!0;var Yn,Zn,Xn,Jn,ei,ti=(Xn=void 0,Jn=!(Yn={render:Gn,staticRenderFns:[]}),(ei=("function"==typeof(Zn=Wn)?Zn.options:Zn)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/load-more/load-more.vue",ei.render||(ei.render=Yn.render,ei.staticRenderFns=Yn.staticRenderFns,ei._compiled=!0,Jn&&(ei.functional=!0)),ei._scopeId=Xn,ei),ni={name:"c-white-space",props:{size:{type:Number,default:0}}},ii=function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"c-white-space",style:{height:this.size+"px"}})};ii._withStripped=!0;var oi,si,ci,ai,ri,li=(ci=void 0,ai=!(oi={render:ii,staticRenderFns:[]}),(ri=("function"==typeof(si=ni)?si.options:si)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/white-space/white-space.vue",ri.render||(ri.render=oi.render,ri.staticRenderFns=oi.staticRenderFns,ri._compiled=!0,ai&&(ri.functional=!0)),ri._scopeId=ci,ri),di={name:"c-wing-blank",props:{size:{type:Number,default:0}}},ui=function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"c-wing-blank",style:{padding:"0 "+this.size+"px"}},[this._t("default")],2)};ui._withStripped=!0;var pi,_i,fi,hi,mi,gi=(fi=void 0,hi=!(pi={render:ui,staticRenderFns:[]}),(mi=("function"==typeof(_i=di)?_i.options:_i)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/wing-blank/wing-blank.vue",mi.render||(mi.render=pi.render,mi.staticRenderFns=pi.staticRenderFns,mi._compiled=!0,hi&&(mi.functional=!0)),mi._scopeId=fi,mi),vi={name:"cToast",props:{visible:{type:Boolean,default:!1},text:{type:Array,default:function(){return[]}},cb:{type:Function,default:function(){}}},methods:{onClick:function(){this.cb()}}},yi=function(){var n=this,e=n.$createElement,i=n._self._c||e;return i("div",{directives:[{name:"show",rawName:"v-show",value:n.visible,expression:"visible"}],staticClass:"c-toast",on:{click:n.onClick}},[i("div",{staticClass:"c-toast__content"},n._l(n.text,function(e,t){return i("p",{key:t},[n._v(n._s(e))])}))])};yi._withStripped=!0;var bi,ki,Ci,xi,wi,Si=(Ci=void 0,xi=!(bi={render:yi,staticRenderFns:[]}),(wi=("function"==typeof(ki=vi)?ki.options:ki)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/toast/toast.vue",wi.render||(wi.render=bi.render,wi.staticRenderFns=bi.staticRenderFns,wi._compiled=!0,xi&&(wi.functional=!0)),wi._scopeId=Ci,wi);function Ri(n){void 0===n&&(n={}),"string"==typeof n||"number"==typeof n?n={text:[n]}:Array.isArray(n)?n={text:n}:"string"!=typeof n.text&&"number"!=typeof n.text||(n.text=[n.text]),n=Object.assign({text:[],duration:2e3,cb:function(){}},n);for(var e=new o({data:function(){return{timer:null,pageYOffset:null,visible:!1}},render:function(e){var t=this;return e(Si,{props:{text:n.text,cb:function(){clearTimeout(t.timer),t.hide()},visible:this.visible}})},methods:{show:function(){this.visible=!0},hide:function(){this.visible=!1,n.cb()}},mounted:function(){var e=this;this.show(),this.timer=setTimeout(function(){e.hide()},n.duration)}}).$mount(),t=document.querySelectorAll(".c-toast"),i=0;i<t.length;++i)t[i].remove();document.body.appendChild(e.$el)}var Ai={name:"cConfirm",props:{title:{type:String,default:null},text:{type:[String,Array],default:null},button:{type:Array,default:null}}},Ii=function(){var n=this,e=n.$createElement,i=n._self._c||e;return i("div",{staticClass:"c-confirm",class:{"c-confirm__title":n.title}},[i("div",{staticClass:"c-confirm__cell"},[n.title?i("div",{staticClass:"c-confirm__title"},[n._v("\n "+n._s(n.title)+"\n ")]):n._e(),n._v(" "),i("div",{staticClass:"c-confirm__content"},[Array.isArray(n.text)?[1===n.text.length?[n._v("\n "+n._s(n.text[0])+"\n ")]:n._l(n.text,function(e,t){return i("p",{key:t},[n._v(n._s(e))])})]:[n._v("\n "+n._s(n.text)+"\n ")]],2),n._v(" "),i("div",{staticClass:"c-confirm__btn-group"},n._l(n.button,function(e,t){return i("div",{key:t,staticClass:"c-confirm__btn",style:{color:e.color},on:{click:e.click}},[n._v("\n "+n._s(e.text)+"\n ")])}))])])};Ii._withStripped=!0;var $i,Fi,Bi,Mi,Ei,Ti=(Bi=void 0,Mi=!($i={render:Ii,staticRenderFns:[]}),(Ei=("function"==typeof(Fi=Ai)?Fi.options:Fi)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/confirm/confirm.vue",Ei.render||(Ei.render=$i.render,Ei.staticRenderFns=$i.staticRenderFns,Ei._compiled=!0,Mi&&(Ei.functional=!0)),Ei._scopeId=Bi,Ei);function zi(s){void 0===s&&(s={}),"string"!=typeof s&&"number"!=typeof s||(s={text:""+s}),s&&s.button&&!Array.isArray(s.button)&&(s.button=[s.button]),s=Object.assign({title:"",text:"",button:[{text:"确定",color:null,click:function(){}}]},s);var e=new o({render:function(e){var t=this,n=[],i=function(e){n.push({text:s.button[e].text,color:s.button[e].color,click:function(){s.button[e].click&&s.button[e].click(),t.hide()}})};for(var o in s.button)i(o);return e(Ti,{data:function(){return{pageYOffset:null}},props:{title:s.title,text:s.text,button:n}})},methods:{show:function(){this.pageYOffset=window.pageYOffset;var e=document.body;e.style.height="100%",e.style.width="100%",e.style.overflow="hidden",e.style.position="fixed"},hide:function(){this.$el.remove();var e=document.body;e.style.overflow="visible",e.style.position="static",window.scroll(0,this.pageYOffset)}},mounted:function(){this.show()}}).$mount();document.body.appendChild(e.$el)}var Oi={name:"cLoading",props:{text:{type:String,default:null}}},Ni=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"c-loading"},[n("div",{staticClass:"c-loading__cell"},[n("i",{staticClass:"c-loading__loading"}),e._v(" "),e.text?n("span",[e._v(e._s(e.text))]):e._e()])])};Ni._withStripped=!0;var Li,Ui,Di,ji,Pi,Hi,Vi=(Di=void 0,ji=!(Li={render:Ni,staticRenderFns:[]}),(Pi=("function"==typeof(Ui=Oi)?Ui.options:Ui)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/loading/loading.vue",Pi.render||(Pi.render=Li.render,Pi.staticRenderFns=Li.staticRenderFns,Pi._compiled=!0,ji&&(Pi.functional=!0)),Pi._scopeId=Di,Pi),Qi={show:function(t){Hi=new o({render:function(e){return e(Vi,{props:{text:t}})}}).$mount(),document.body.classList.add("c-mobile__is-loading");for(var e=document.querySelectorAll(".c-loading"),n=0;n<e.length;++n)e[n].remove();document.body.appendChild(Hi.$el)},hide:function(){document.body.classList.remove("c-mobile__is-loading");for(var e=document.querySelectorAll(".c-loading"),t=0;t<e.length;++t)e[t].remove()}},qi=[m,w,M,D,W,ne,de,ve,Re,Te,Pe,Ye,ot,pt,bt,It,Ot,Vt,Xt,an,xn,Un,Bn,Kn,ti,li,gi],Ki=function(t){Ki.installed||(Ki.installed=!0,qi.map(function(e){t.component(e.name,e)}),t.prototype.$Toast=Ri,t.prototype.$Confirm=zi,t.prototype.$Loading=Qi)};"undefined"!=typeof window&&window.Vue&&Ki(window.Vue);var Wi=Object.assign(qi,{install:Ki});e.default=Wi,Object.defineProperty(e,"__esModule",{value:!0})});