c-mobile
Version:
Vue 手机端组件,支持 megalo
2 lines (1 loc) • 48.9 kB
JavaScript
var cMobile=function(t,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(t){return Object.prototype.toString.call(t).slice(8,-1)},_=function(){},f=function(n){var t=p(n);if("String"===t)return n;if("Object"===t&&n.path){var i=n.path,o="";return"Object"===p(n.query)&&0<Object.keys(n.query).length&&Object.keys(n.query).forEach(function(t,e){o+=(0===e&&-1===i.indexOf("?")?"?":"&")+t+"="+n.query[t]}),""+i+o}return""};function e(t){var e,n=t.vm,i=t.to,o=t.replace,s=t.success,a=t.fail,c=t.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(e=i)&&0===e.indexOf("tel:")?u.makePhoneCall({phoneNumber:i.replace("tel:","")}):(i={url:f(i),success:s||_,fail:a||_,complete:c||_},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||e({vm:this,to:this.to})},onGetphonenumber:function(t){this.$emit("getphonenumber",t)}},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 t=this,e=t.$createElement,n=t._self._c||e;return t._coverView?n("cover-view",{staticClass:"c-button",class:[t.type?"c-button__"+t.type:"",t.icon?"c-button__icon-"+t.icon:"",{"c-button__o":t.o,"c-button__disabled":t._disabled,"c-button__small":t.small,"c-button__loading":t.loading}],style:{borderRadius:t._borderRadius},attrs:{"open-type":t.openType,"form-type":t.formType,"hover-class":"c-button-hover"},on:{click:t.onClick}},[n("cover-view",{staticClass:"c-button__text"},[t._t("default")],2)],1):n("button",{staticClass:"c-button",class:[t.type?"c-button__"+t.type:"",t.icon?"c-button__icon-"+t.icon:"",{"c-button__o":t.o,"c-button__disabled":t._disabled,"c-button__small":t.small,"c-button__loading":t.loading}],style:{borderRadius:t._borderRadius},attrs:{"open-type":t.openType,"form-type":t.formType,"hover-class":"c-button-hover"},on:{click:t.onClick,getphonenumber:t.onGetphonenumber}},[n("span",{staticClass:"c-button__text"},[t._t("default")],2)])};i._withStripped=!0;var s,a,c,r,h,m=(c=void 0,r=!(s={render:i,staticRenderFns:[]}),(h=("function"==typeof(a=n)?a.options:a)||{}).__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=c,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(){e({vm:this,to:this.to})}}},v=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.coverView?n("cover-view",{staticClass:"c-flex",class:[t.className],on:{click:t.onClick}},[t._t("default")],2):n("div",{staticClass:"c-flex",class:[t.className],on:{click:t.onClick}},[t._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(){e({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 t=this,e=t.$createElement,n=t._self._c||e;return t.coverView?n("cover-view",{staticClass:"c-flex-item",style:{flex:t.flex,margin:"0 "+t.gutter/2+"px"},on:{click:t.onClick}},[t._t("default")],2):n("div",{staticClass:"c-flex-item",style:{flex:t.flex,margin:"0 "+t.gutter/2+"px"},on:{click:t.onClick}},[t._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(t){var e=u.getMenuButtonBoundingClientRect();n.paddingTop=e.top+"px",n.paddingRight=e.width+2*(t.windowWidth-e.right)+"px",n.paddingBottom="9px",n.paddingLeft=e.width+2*(t.windowWidth-e.right)+"px"}})},onLeft:function(){this._left.to?e({vm:this,to:this._left.to}):"function"==typeof this._left.click?this._left.click():this._left.back&&e({vm:this,to:-1})},onRight:function(){this._right.to?e({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 t=this;this.autoTitle&&l&&this.$nextTick(function(){t.defaultTitle=document&&document.title}),this.componentInit()}},T=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-header",class:[t.type?"c-header__"+t.type:"",{"c-header__noborder-bottom":t.noborderBottom||t.noborder}],style:{paddingTop:t.paddingTop,paddingRight:t.paddingRight,paddingBottom:t.paddingBottom,paddingLeft:t.paddingLeft}},[t.$slots.left?n("span",{staticClass:"c-header__left"},[t._t("left")],2):t._left.text||t._left.back?n("span",{staticClass:"c-header__left",class:{"c-header__back":t._left.back},style:{color:t._left.color,bottom:t._left.back?t.paddingBottom:null},on:{click:t.onLeft}},[t._v("\n "+t._s(t._left.close?"":t._left.text)+"\n ")]):t._e(),t._v(" "),t._left.close?n("span",{staticClass:"c-header__close",on:{click:t.onClose}},[n("i")]):t._e(),t._v(" "),t.$slots.default?[t._t("default")]:t.defaultTitle?[t._v(t._s(t.defaultTitle))]:t._e(),t._v(" "),t.$slots.right?n("span",{staticClass:"c-header__right"},[t._t("right")],2):t._right.text?n("span",{staticClass:"c-header__right",style:{color:t._right.color},on:{click:t.onRight}},[t._v("\n "+t._s(t._right.text)+"\n ")]):t._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(){e({vm:this,to:this.to})}}},P=function(){var t=this,e=t.$createElement;return(t._self._c||e)("i",{staticClass:"c-icon",class:["icon-"+t.name,t.type?"c-icon__"+t.type:"",{"c-icon__background":t.backgroundColor}],style:{width:t.size,height:t.size,fontSize:t.size,backgroundColor:t.backgroundColor,color:t.color,borderRadius:t.borderRadius},on:{click:t.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 t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-input-group",class:[t.className]},[t.title?n("h5",{staticClass:"c-input-group__title",class:[t.type?"c-input-group__title-"+t.type:""]},[t._v("\n "+t._s(t.title)+"\n ")]):t._e(),t._v(" "),n("div",{staticClass:"c-input-group__content",class:{"c-input-group__noborder-top":t.noborderTop||t.noborder,"c-input-group__noborder-bottom":t.noborderBottom||t.noborder}},[t._t("default")],2)])};Y._withStripped=!0;var Z,X,J,tt,et,nt=(J=void 0,tt=!(Z={render:Y,staticRenderFns:[]}),(et=("function"==typeof(X=G)?X.options:X)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/input-group/input-group.vue",et.render||(et.render=Z.render,et.staticRenderFns=Z.staticRenderFns,et._compiled=!0,tt&&(et.functional=!0)),et._scopeId=J,et),it={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&&e({vm:this,to:this.to})}},computed:{labelWidth:function(){return this.$parent.labelWidth},_useButton:function(){return!!this.useButton||!!this.openType}}},ot=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.useDiv&&t.visible?n("div",{staticClass:"c-input",class:[t.className,{"c-input__addon":t.addon,"c-input__next":t.next,"c-input__active":t.active,"c-input__icon":t.icon,"c-input__checked":t.checked,"c-input__noborder-top":t.noborderTop,"c-input__direction-column":"column"===t.direction}],on:{touchstart:function(){},click:t.onClick}},[t._t("default")],2):t._useButton&&t.visible?n("button",{staticClass:"c-input",class:[t.className,{"c-input__addon":t.addon,"c-input__next":t.next,"c-input__active":t.active,"c-input__icon":t.icon,"c-input__checked":t.checked,"c-input__noborder-top":t.noborderTop,"c-input__direction-column":"column"===t.direction}],attrs:{"open-type":t.openType},on:{click:t.onClick}},[t._t("default")],2):t.visible?n("label",{staticClass:"c-input",class:[t.className,{"c-input__addon":t.addon,"c-input__next":t.next,"c-input__active":t.active,"c-input__icon":t.icon,"c-input__checked":t.checked,"c-input__noborder-top":t.noborderTop,"c-input__direction-column":"column"===t.direction}],on:{touchstart:function(){},click:t.onClick}},[t._t("default")],2):t._e()};ot._withStripped=!0;var st,at,ct,rt,lt,dt=(ct=void 0,rt=!(st={render:ot,staticRenderFns:[]}),(lt=("function"==typeof(at=it)?at.options:at)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/input-group/input.vue",lt.render||(lt.render=st.render,lt.staticRenderFns=st.staticRenderFns,lt._compiled=!0,rt&&(lt.functional=!0)),lt._scopeId=ct,lt),ut={name:"cInputHead",props:{to:{type:[String,Object],default:null}},methods:{onClick:function(){e({vm:this,to:this.to})}},computed:{labelWidth:function(){return this.$parent.labelWidth||"110px"},required:function(){return this.$parent.required}}},pt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-input-head",style:{"min-width":t.labelWidth},on:{click:t.onClick}},[t.required?n("span",{staticStyle:{color:"#f00"}},[t._v("*")]):t._e(),t._v(" "),t._t("default")],2)};pt._withStripped=!0;var _t,ft,ht,mt,gt,vt=(ht=void 0,mt=!(_t={render:pt,staticRenderFns:[]}),(gt=("function"==typeof(ft=ut)?ft.options:ft)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/input-group/input-head.vue",gt.render||(gt.render=_t.render,gt.staticRenderFns=_t.staticRenderFns,gt._compiled=!0,mt&&(gt.functional=!0)),gt._scopeId=ht,gt),yt={name:"cInputBody",props:{to:{type:[String,Object],default:null}},methods:{onClick:function(){e({vm:this,to:this.to})}}},bt=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"c-input-body",on:{click:this.onClick}},[this._t("default")],2)};bt._withStripped=!0;var kt,Ct,xt,wt,St,Rt=(xt=void 0,wt=!(kt={render:bt,staticRenderFns:[]}),(St=("function"==typeof(Ct=yt)?Ct.options:Ct)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/input-group/input-body.vue",St.render||(St.render=kt.render,St.staticRenderFns=kt.staticRenderFns,St._compiled=!0,wt&&(St.functional=!0)),St._scopeId=xt,St),At={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(t){this.$emit("change",t)}},computed:{_allowUpload:function(){return"boolean"==typeof this.allowUpload?this.allowUpload:null!==this.amount&&this.maxAmount>this.amount}}},It=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-input-upload",class:[{"noborder-top":t.noborderTop,"c-input-upload__allow-delete":t.allowDelete}]},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.$slots.title||t.title,expression:"$slots.title || title"}],staticClass:"c-input-upload__title"},[t.required?n("span",{staticStyle:{color:"#f00"}},[t._v("*")]):t._e(),t._v(t._s(t.title)+"\n "),t._t("title")],2),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:null!==t.amount,expression:"amount !== null"}],staticClass:"c-input-upload__amount"},[t._v("\n "+t._s(t.amount)+"/"+t._s(t.maxAmount)+"\n ")]),t._v(" "),n("div",{staticClass:"c-input-upload__files"},[t._t("default"),t._v(" "),t.$slots["upload-button"]?[n("div",{staticClass:"c-input-upload__button"},[t._t("upload-button")],2)]:n("div",{directives:[{name:"show",rawName:"v-show",value:t._allowUpload,expression:"_allowUpload"}],staticClass:"c-input-upload__button",on:{click:t.onClick}},[n("input",{directives:[{name:"show",rawName:"v-show",value:t.inputUpload,expression:"inputUpload"}],attrs:{accept:t.accept,type:"file"},on:{change:t.onFileChange}})])],2)])};It._withStripped=!0;var $t,Ft,Bt,Mt,Et,Tt=(Bt=void 0,Mt=!($t={render:It,staticRenderFns:[]}),(Et=("function"==typeof(Ft=At)?Ft.options:Ft)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/input-group/input-upload/upload.vue",Et.render||(Et.render=$t.render,Et.staticRenderFns=$t.staticRenderFns,Et._compiled=!0,Mt&&(Et.functional=!0)),Et._scopeId=Bt,Et),zt={name:"cInputUploadFile",props:{src:{type:String,default:""}},methods:{onClick:function(){this.$emit("click")},onDelete:function(){this.$emit("delete")}}},Ot=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.src?n("div",{staticClass:"c-input-upload-file",on:{click:e.onClick}},[n("img",{attrs:{src:e.src}}),e._v(" "),n("i",{on:{click:function(t){return t.stopPropagation(),e.onDelete(t)}}})]):e._e()};Ot._withStripped=!0;var Nt,Lt,Ut,Dt,jt,Pt=(Ut=void 0,Dt=!(Nt={render:Ot,staticRenderFns:[]}),(jt=("function"==typeof(Lt=zt)?Lt.options:Lt)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/input-group/input-upload/upload-file.vue",jt.render||(jt.render=Nt.render,jt.staticRenderFns=Nt.staticRenderFns,jt._compiled=!0,Dt&&(jt.functional=!0)),jt._scopeId=Ut,jt),Ht={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 t=this;if(!this.disabled){this.beforeChange&&this.beforeChangeLoading&&(this.isLoading=!0);var e=!this._value;u&&u.vibrateShort(),this.beforeChange?"function"==typeof this.beforeChange?this.beforeChange(function(){t.$emit("input",e),t.$emit("change",e),t.isLoading=!1}):"object"==typeof this.beforeChange&&"function"==typeof this.beforeChange.beforeChange&&this.beforeChange.beforeChange(function(){t.$emit("input",e),t.$emit("change",e),t.isLoading=!1},this.beforeChange.data):(this.$emit("input",e),this.$emit("change",e),this.isLoading=!1)}}},computed:{_value:{get:function(){return this.value}},_isLoading:{get:function(){return!this.disabled&&this.isLoading}}}},Vt=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"c-switch",class:[t.type?"c-switch__"+t.type:"",{"c-switch__disabled":t.disabled,"c-switch__checked":t._value,"c-switch__small":t.small,"c-switch__before-change-loading":t._isLoading}],on:{click:t.onClick}},[t._m(0)])};Vt._withStripped=!0;var Qt,qt,Kt,Wt,Gt,Yt=(Kt=void 0,Wt=!(Qt={render:Vt,staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"c-switch__core"},[e("i")])}]}),(Gt=("function"==typeof(qt=Ht)?qt.options:qt)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/switch/switch.vue",Gt.render||(Gt.render=Qt.render,Gt.staticRenderFns=Qt.staticRenderFns,Gt._compiled=!0,Wt&&(Gt.functional=!0)),Gt._scopeId=Kt,Gt),Zt={name:"cTab",props:{type:{type:String,default:""}}},Xt=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"c-tab",class:[t.type?"c-tab__"+t.type:""]},[t._t("default")],2)};Xt._withStripped=!0;var Jt,te,ee,ne,ie,oe=(ee=void 0,ne=!(Jt={render:Xt,staticRenderFns:[]}),(ie=("function"==typeof(te=Zt)?te.options:te)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/tab/tab.vue",ie.render||(ie.render=Jt.render,ie.staticRenderFns=Jt.staticRenderFns,ie._compiled=!0,ne&&(ie.functional=!0)),ie._scopeId=ee,ie),se={name:"cTabItem",props:{current:{type:Boolean,default:!1},to:{type:[String,Object],default:null}},methods:{onClick:function(){e({vm:this,to:this.to,replace:!0})}}},ae=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"c-tab-item",class:{"c-tab__current":t.current},on:{click:t.onClick}},[t._t("default")],2)};ae._withStripped=!0;var ce,re,le,de,ue,pe=(le=void 0,de=!(ce={render:ae,staticRenderFns:[]}),(ue=("function"==typeof(re=se)?re.options:re)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/tab/tab-item.vue",ue.render||(ue.render=ce.render,ue.staticRenderFns=ce.staticRenderFns,ue._compiled=!0,de&&(ue.functional=!0)),ue._scopeId=le,ue),_e={name:"cTabbar",props:{type:{type:String,default:""},shadow:{type:Boolean,default:!1}}},fe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-tabbar",class:[t.type?"c-tabbar__"+t.type:"",{"c-tabbar__shadow":t.shadow}]},[n("div",{staticClass:"c-tabbar__cell"},[t._t("default")],2)])};fe._withStripped=!0;var he,me,ge,ve,ye,be=(ge=void 0,ve=!(he={render:fe,staticRenderFns:[]}),(ye=("function"==typeof(me=_e)?me.options:me)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/tabbar/tabbar.vue",ye.render||(ye.render=he.render,ye.staticRenderFns=he.staticRenderFns,ye._compiled=!0,ve&&(ye.functional=!0)),ye._scopeId=ge,ye),ke={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||e({vm:this,to:this.to,replace:!0})}},computed:{_active:function(){return this.active||this.current}}},Ce=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-tabbar-item",class:{"c-tabbar__active":t._active},on:{click:t.onClick}},[t._t("default",[n("i",[n("img",{attrs:{src:t._active?t.activeSrc:t.src}})]),t._v(" "),n("p",{directives:[{name:"show",rawName:"v-show",value:t.text,expression:"text"}]},[t._v(t._s(t.text))])]),t._v(" "),n("b",{directives:[{name:"show",rawName:"v-show",value:t.badge,expression:"badge"}]},[t._v(t._s(t.badge))])],2)};Ce._withStripped=!0;var xe,we,Se,Re,Ae,Ie=(Se=void 0,Re=!(xe={render:Ce,staticRenderFns:[]}),(Ae=("function"==typeof(we=ke)?we.options:we)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/tabbar/tabbar-item.vue",Ae.render||(Ae.render=xe.render,Ae.staticRenderFns=xe.staticRenderFns,Ae._compiled=!0,Re&&(Ae.functional=!0)),Ae._scopeId=Se,Ae),$e={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||e({vm:this,to:this.to})},setIsEmptyOrIsPlaceholder:function(){var t=this.$slots.default&&this.$slots.default[0]&&this.$slots.default[0].text;this.isEmpty=!(null!=t&&""!==t||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()}},Fe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t._coverView?n("cover-view",{staticClass:"c-text",class:[t.type?"c-text__"+t.type:"",t.align?"c-text__"+t.align:"",t.className?t.className:"",{"c-text__light":t.light,"c-text__block":t.block,"c-text__cursor":t.cursor,"c-text__empty":t.isEmpty,"c-text__placeholder":t.isPlaceholder,"c-text__next":t.next,"c-text__bold":t.bold}],style:t.componentStyle,on:{click:t.onClick}},[null!==t.text&&void 0!==t.text&&""!==t.text?[t._v("\n "+t._s(t.text)+"\n ")]:t.isPlaceholder?[n("cover-view",{staticClass:"c-text__content",style:t.componentStyle},[t._v(t._s(t.placeholder))])]:n("cover-view",{staticClass:"c-text__content",style:t.componentStyle},[t._t("default",[t._v(t._s(t.text))])],2)],2):n("div",{staticClass:"c-text",class:[t.type?"c-text__"+t.type:"",t.align?"c-text__"+t.align:"",t.className?t.className:"",{"c-text__light":t.light,"c-text__block":t.block,"c-text__cursor":t.cursor,"c-text__empty":t.isEmpty,"c-text__placeholder":t.isPlaceholder,"c-text__next":t.next,"c-text__bold":t.bold}],style:t.componentStyle,on:{click:t.onClick}},[null!==t.text&&void 0!==t.text&&""!==t.text?[t._v("\n "+t._s(t.text)+"\n ")]:t.isPlaceholder?[n("span",{staticClass:"c-text__content",style:t.componentStyle},[t._v(t._s(t.placeholder))])]:n("span",{staticClass:"c-text__content",style:t.componentStyle},[t._t("default",[t._v(t._s(t.text))])],2)],2)};Fe._withStripped=!0;var Be,Me,Ee,Te,ze,Oe=(Ee=void 0,Te=!(Be={render:Fe,staticRenderFns:[]}),(ze=("function"==typeof(Me=$e)?Me.options:Me)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/text/text.vue",ze.render||(ze.render=Be.render,ze.staticRenderFns=Be.staticRenderFns,ze._compiled=!0,Te&&(ze.functional=!0)),ze._scopeId=Ee,ze),Ne={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(t){t.click&&t.click(),this._value=!1},onCancel:function(){this._value=!1}},computed:{_value:{get:function(){return this.value},set:function(t){this.$emit("input",t)}},_options:function(){return Array.isArray(this.options)&&0<this.options.length?this.options:Array.isArray(this.actions)&&0<this.actions.length?this.actions:[]}}},Le=function(){var n=this,t=n.$createElement,i=n._self._c||t;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(t){t.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(e,t){return i("button",{key:t,style:{color:e.color,fontWeight:e.bold||"normal"},attrs:{"session-from":e.sessionFrom,"send-message-title":e.itemMessageTitle,"send-message-path":e.itemMessagePath,"send-message-img":e.itemMessageImg,"show-message-card":e.itemMessageCard,"open-type":e.openType},on:{click:function(t){t.stopPropagation(),n.onOption(e)}}},[n._v(n._s(e.text))])})),n._v(" "),i("div",{staticClass:"c-actionsheet__cancel",style:n.cancelStyle,on:{click:function(t){return t.stopPropagation(),n.onCancel(t)}}},[n._v("\n "+n._s(n.cancelText)+"\n ")])])])};Le._withStripped=!0;var Ue,De,je,Pe,He,Ve=(je=void 0,Pe=!(Ue={render:Le,staticRenderFns:[]}),(He=("function"==typeof(De=Ne)?De.options:De)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/actionsheet/actionsheet.vue",He.render||(He.render=Ue.render,He.staticRenderFns=Ue.staticRenderFns,He._compiled=!0,Pe&&(He.functional=!0)),He._scopeId=je,He),Qe={name:"cSidebar",props:{visible:{type:Boolean,default:!1}}},qe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-sidebar",class:[{"c-sidebar__visible":t.visible,"c-sidebar__head":t.$slots.head}]},[t._t("head"),t._v(" "),n("div",{staticClass:"c-sidebar__body"},[t._t("default")],2)],2)};qe._withStripped=!0;var Ke,We,Ge,Ye,Ze,Xe=(Ge=void 0,Ye=!(Ke={render:qe,staticRenderFns:[]}),(Ze=("function"==typeof(We=Qe)?We.options:We)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/sidebar/sidebar.vue",Ze.render||(Ze.render=Ke.render,Ze.staticRenderFns=Ke.staticRenderFns,Ze._compiled=!0,Ye&&(Ze.functional=!0)),Ze._scopeId=Ge,Ze),Je={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&&e({vm:this,to:this.to})},onKeyUp:function(t){"Enter"===t.key&&this.$emit("keyup-enter",this._value)},onConfirm:function(t){"string"==typeof t.target.value&&""!==t.target.value.trim()&&this.$emit("keyup-enter",t.target.value)},onCancel:function(){this._value="",this.$emit("cancel")}},computed:{_value:{get:function(){return this.value},set:function(t){this.$emit("input",t),this.$emit("change",t)}},_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 t;return this.inputHeight||!l?(t="string"==typeof this.inputHeight&&-1<this.inputHeight.indexOf("px")?parseInt(this.inputHeight.replace("px",""),10):this.inputHeight,l?(t-16)/2+"px 10px "+(t-16)/2+"px 32px":"0 10px 0 32px"):"7px 10px 7px 32px"},_disabled:function(){return null!==this.to}}},tn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("form",{staticClass:"c-search",class:{"c-search__cancel-visible":e._visible,"c-search__round":e.round},style:{backgroundColor:e.backgroundColor},attrs:{action:"",onsubmit:"return false;"},on:{click:e.onClick}},[n("div",{staticClass:"c-search__cell"},[n("i",{staticClass:"c-search__icon-search",style:{left:e.isMiniProgram&&e.round?"5px":null,width:e.isMiniProgram?"30px":null}},[n("img",{style:{width:e.isMiniProgram?"20px":null,height:e.isMiniProgram?"20px":null},attrs:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAM1BMVEUAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAr6XIYAAAAEHRSTlMA7xCA32Awz79AcJ+QIFCwFs9njwAAANNJREFUOMvtk90OgzAIRouC/e++93/aqclCLFq9WbKLnUs8BYHW/QjTIiJxutNiIOwEGWtQuF16CSuUk6TMWJkvvBmAj5/k/tIUAKU7l5ylcp8hAVStmIHchQoQ7PgIqCcxM9AG5LP2krNlohEX4NXHwlbFQOA+5AFnYZAJjcX70v5pM+FkgWU8Hh0u1ZOtVnvazqzoEo4p7aVAdZaGoznD/rZ+YTm8ClouTXCeJRXeNTVtmwrHyavZIwHQ5zoy3RSbyLKtU80h3zVf7pGZqbk/D3gDeQoM2LnjNc8AAAAASUVORK5CYII="}})]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e._value,expression:"_value"}],ref:"search",staticClass:"c-search__input",class:{"c-search__input-disabled":e.to},style:{backgroundColor:e.inputBackgroundColor,height:e._inputHeight,padding:e._inputPadding,borderRadius:e._inputHeight,fontSize:e.isMiniProgram?"14px":null},attrs:{type:"search","confirm-type":"search",focus:e._autofocus,placeholder:e.placeholder,"placeholder-class":"c-search__placeholder",disabled:e._disabled},domProps:{value:e._value},on:{keyup:e.onKeyUp,confirm:e.onConfirm,input:function(t){t.target.composing||(e._value=t.target.value)}}}),e._v(" "),e._disabled?e._e():n("i",{staticClass:"c-search__icon-cancel",style:{backgroundColor:e.inputBackgroundColor,borderRadius:e._inputHeight,width:e.isMiniProgram?"45px":null},on:{click:e.onCancel}},[n("img",{style:{width:e.isMiniProgram?"20px":null,height:e.isMiniProgram?"20px":null},attrs:{src:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAgMjAiPgogICAgICAgIDxwYXRoIGZpbGw9IiNiYmIiIGQ9Ik0xNC4xOCAxMy4wMDhsLTMuMDA4LTMuMDA4IDMuMDA4LTMuMDA4LTEuMTcyLTEuMTcyLTMuMDA4IDMuMDA4LTMuMDA4LTMuMDA4LTEuMTcyIDEuMTcyIDMuMDA4IDMuMDA4LTMuMDA4IDMuMDA4IDEuMTcyIDEuMTcyIDMuMDA4LTMuMDA4IDMuMDA4IDMuMDA4ek0xMCAxLjY4YzQuNjA5IDAgOC4zMiAzLjcxMSA4LjMyIDguMzJzLTMuNzExIDguMzItOC4zMiA4LjMyLTguMzItMy43MTEtOC4zMi04LjMyIDMuNzExLTguMzIgOC4zMi04LjMyeiI+PC9wYXRoPgogICAgICA8L3N2Zz4="}})])])])};tn._withStripped=!0;var en,nn,on,sn,an,cn=(on=void 0,sn=!(en={render:tn,staticRenderFns:[]}),(an=("function"==typeof(nn=Je)?nn.options:nn)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/search/search.vue",an.render||(an.render=en.render,an.staticRenderFns=en.staticRenderFns,an._compiled=!0,sn&&(an.functional=!0)),an._scopeId=on,an),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 e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"c-keyboard__key",class:{"c-keyboard__key-active":e.active,"c-keyboard__key-empty":""===e.text},on:{touchstart:function(t){return t.stopPropagation(),t.preventDefault(),e.onClick(t)},touchmove:e.onBlur,touchend:e.onBlur,touchcancel:e.onBlur,mousedown:e.onClick,mouseup:e.onBlur}},[e._v("\n "+e._s(e.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(t){this.$emit("click",t)},onDelete:function(){this.$emit("delete")},doneClick:function(){this.supportHide&&(this._value=!1,this.$emit("hide")),this.$emit("done")},hideKeyboard:function(t){this.supportHide&&!1!==this._value&&-1===t.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(t){this.$emit("input",t)}}},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 t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"c-keyboard-transition"}},[t._value?n("div",{staticClass:"c-keyboard"},[t.description||t.doneText?n("div",{staticClass:"c-keyboard__done"},[n("div",{staticClass:"c-keyboard__description"},[t._v(t._s(t.description))]),t._v(" "),n("div",{staticClass:"c-keyboard__done-button",on:{click:t.doneClick}},[t._v(t._s(t.doneText))])]):t._e(),t._v(" "),n("div",{staticClass:"c-keyboard__key-group"},[n("c-keyboard-key",{attrs:{text:"1"},on:{click:t.onClick}}),t._v(" "),n("c-keyboard-key",{attrs:{text:"2"},on:{click:t.onClick}}),t._v(" "),n("c-keyboard-key",{attrs:{text:"3"},on:{click:t.onClick}})],1),t._v(" "),n("div",{staticClass:"c-keyboard__key-group"},[n("c-keyboard-key",{attrs:{text:"4"},on:{click:t.onClick}}),t._v(" "),n("c-keyboard-key",{attrs:{text:"5"},on:{click:t.onClick}}),t._v(" "),n("c-keyboard-key",{attrs:{text:"6"},on:{click:t.onClick}})],1),t._v(" "),n("div",{staticClass:"c-keyboard__key-group"},[n("c-keyboard-key",{attrs:{text:"7"},on:{click:t.onClick}}),t._v(" "),n("c-keyboard-key",{attrs:{text:"8"},on:{click:t.onClick}}),t._v(" "),n("c-keyboard-key",{attrs:{text:"9"},on:{click:t.onClick}})],1),t._v(" "),n("div",{staticClass:"c-keyboard__key-group"},[n("c-keyboard-key",{staticClass:"c-keyboard__key-gray",attrs:{text:t._typeText},on:{click:t.onClick}}),t._v(" "),n("c-keyboard-key",{attrs:{text:"0"},on:{click:t.onClick}}),t._v(" "),n("c-keyboard-key",{staticClass:"c-keyboard__key-gray c-keyboard__key-delete",on:{click:t.onDelete}})],1)]):t._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(t){this.$emit("input",t),this.$emit("change",t)}}},Sn=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"c-radio-group",class:["c-radio-group__"+t.align,t.type?"c-radio-group__"+t.type:"",{"c-radio-group__disabled":t.disabled}]},[t._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 t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-radio",class:{"c-radio__checked":t.currentValue===t.value},on:{click:t.onClick}},[n("i",{staticClass:"c-radio__core"}),t._v(" "),t._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(t){this.$emit("click",t)},componentInit:function(){var t,e=this;if(this.fixed&&l&&(this.$refs.container&&this.$refs.container.firstChild&&this.$refs.container.firstChild.classList&&this.$refs.container.firstChild.classList[0]&&(t="c-container-cover__fixed-"+this.fixed+"__"+this.$refs.container.firstChild.classList[0]),t&&0===document.querySelectorAll("."+t).length)){this.element=document.createElement("div"),this.element.className=t;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(e.$refs.container&&e.element){if(e._safeArea){e.element.classList.add("c-container-cover__fixed-bottom-safe-area");var t=e.$refs.container.style.paddingBottom.replace("px","");t=Number.isNaN(t)?0:parseInt(t),e.$refs.container.style.paddingBottom=t+"px"}e.backgroundColor||(e.$refs.container.style.backgroundColor=window.getComputedStyle(e.$refs.container.firstChild).backgroundColor),document.body.appendChild(e.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 t=this,e=t.$createElement,n=t._self._c||e;return t.useForm?n("form",{ref:"container",staticClass:"c-container",class:[t.fixed?"c-container__fixed-"+t.fixed:"",{"c-container__safe-area":t._safeArea}],style:{backgroundColor:t.backgroundColor,padding:t.padding,zIndex:t._zIndex},attrs:{"report-submit":""},on:{click:t.onClick}},[t._t("default")],2):n("div",{ref:"container",staticClass:"c-container",class:[t.fixed?"c-container__fixed-"+t.fixed:"",{"c-container__safe-area":t._safeArea}],style:{backgroundColor:t.backgroundColor,padding:t.padding,zIndex:t._zIndex},on:{click:t.onClick}},[t._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 t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-load-more",class:[t.loading?"c-load-more__loading":"c-load-more__end",{"c-load-more_safe-area":t.safeArea}]},[n("div",{staticClass:"c-load-more__content"},[t.loading?t._e():n("span",{style:{backgroundColor:t.backgroundColor,color:t.color}},[t._v(t._s(t.text))])])])};Gn._withStripped=!0;var Yn,Zn,Xn,Jn,ti,ei=(Xn=void 0,Jn=!(Yn={render:Gn,staticRenderFns:[]}),(ti=("function"==typeof(Zn=Wn)?Zn.options:Zn)||{}).__file="/Users/zhuning/Chooin/github/c-mobile/packages/components/load-more/load-more.vue",ti.render||(ti.render=Yn.render,ti.staticRenderFns=Yn.staticRenderFns,ti._compiled=!0,Jn&&(ti.functional=!0)),ti._scopeId=Xn,ti),ni={name:"c-white-space",props:{size:{type:Number,default:0}}},ii=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"c-white-space",style:{height:this.size+"px"}})};ii._withStripped=!0;var oi,si,ai,ci,ri,li=(ai=void 0,ci=!(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,ci&&(ri.functional=!0)),ri._scopeId=ai,ri),di={name:"c-wing-blank",props:{size:{type:Number,default:0}}},ui=function(){var t=this.$createElement;return(this._self._c||t)("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,t=n.$createElement,i=n._self._c||t;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(t,e){return i("p",{key:e},[n._v(n._s(t))])}))])};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 t=new o({data:function(){return{timer:null,pageYOffset:null,visible:!1}},render:function(t){var e=this;return t(Si,{props:{text:n.text,cb:function(){clearTimeout(e.timer),e.hide()},visible:this.visible}})},methods:{show:function(){this.visible=!0},hide:function(){this.visible=!1,n.cb()}},mounted:function(){var t=this;this.show(),this.timer=setTimeout(function(){t.hide()},n.duration)}}).$mount(),e=document.querySelectorAll(".c-toast"),i=0;i<e.length;++i)e[i].remove();document.body.appendChild(t.$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,t=n.$createElement,i=n._self._c||t;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(t,e){return i("p",{key:e},[n._v(n._s(t))])})]:[n._v("\n "+n._s(n.text)+"\n ")]],2),n._v(" "),i("div",{staticClass:"c-confirm__btn-group"},n._l(n.button,function(t,e){return i("div",{key:e,staticClass:"c-confirm__btn",style:{color:t.color},on:{click:t.click}},[n._v("\n "+n._s(t.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 t=new o({render:function(t){var e=this,n=[],i=function(t){n.push({text:s.button[t].text,color:s.button[t].color,click:function(){s.button[t].click&&s.button[t].click(),e.hide()}})};for(var o in s.button)i(o);return t(Ti,{data:function(){return{pageYOffset:null}},props:{title:s.title,text:s.text,button:n}})},methods:{show:function(){this.pageYOffset=window.pageYOffset;var t=document.body;t.style.height="100%",t.style.width="100%",t.style.overflow="hidden",t.style.position="fixed"},hide:function(){this.$el.remove();var t=document.body;t.style.overflow="visible",t.style.position="static",window.scroll(0,this.pageYOffset)}},mounted:function(){this.show()}}).$mount();document.body.appendChild(t.$el)}var Oi={name:"cLoading",props:{text:{type:String,default:null}}},Ni=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-loading"},[n("div",{staticClass:"c-loading__cell"},[n("i",{staticClass:"c-loading__loading"}),t._v(" "),t.text?n("span",[t._v(t._s(t.text))]):t._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(e){Hi=new o({render:function(t){return t(Vi,{props:{text:e}})}}).$mount(),document.body.classList.add("c-mobile__is-loading");for(var t=document.querySelectorAll(".c-loading"),n=0;n<t.length;++n)t[n].remove();document.body.appendChild(Hi.$el)},hide:function(){document.body.classList.remove("c-mobile__is-loading");for(var t=document.querySelectorAll(".c-loading"),e=0;e<t.length;++e)t[e].remove()}},qi=[m,w,M,D,W,nt,dt,vt,Rt,Tt,Pt,Yt,oe,pe,be,Ie,Oe,Ve,Xe,cn,xn,Un,Bn,Kn,ei,li,gi],Ki=function(e){Ki.installed||(Ki.installed=!0,qi.map(function(t){e.component(t.name,t)}),e.prototype.$Toast=Ri,e.prototype.$Confirm=zi,e.prototype.$Loading=Qi)};"undefined"!=typeof window&&window.Vue&&Ki(window.Vue);var Wi=Object.assign(qi,{install:Ki});return t.default=Wi,t}({},Vue);