You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
34 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-componentsA-calendar-index"],{"0101":function(t,e,a){var n=a("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 \n */.u-btn[data-v-1ea4ff2e]::after{border:none}.u-btn[data-v-1ea4ff2e]{position:relative;border:0;display:inline-flex;overflow:visible;line-height:1;\ndisplay:flex;flex-direction:row;\nalign-items:center;justify-content:center;cursor:pointer;padding:0 %?40?%;z-index:1;box-sizing:border-box;transition:all .15s}.u-btn--bold-border[data-v-1ea4ff2e]{border:1px solid #fff}.u-btn--default[data-v-1ea4ff2e]{color:#606266;border-color:#c0c4cc;background-color:#fff}.u-btn--primary[data-v-1ea4ff2e]{color:#fff;border-color:#2979ff;background-color:#2979ff}.u-btn--success[data-v-1ea4ff2e]{color:#fff;border-color:#19be6b;background-color:#19be6b}.u-btn--error[data-v-1ea4ff2e]{color:#fff;border-color:#fa3534;background-color:#fa3534}.u-btn--warning[data-v-1ea4ff2e]{color:#fff;border-color:#f90;background-color:#f90}.u-btn--default--disabled[data-v-1ea4ff2e]{color:#fff;border-color:#e4e7ed;background-color:#fff}.u-btn--primary--disabled[data-v-1ea4ff2e]{color:#fff!important;border-color:#a0cfff!important;background-color:#a0cfff!important}.u-btn--success--disabled[data-v-1ea4ff2e]{color:#fff!important;border-color:#71d5a1!important;background-color:#71d5a1!important}.u-btn--error--disabled[data-v-1ea4ff2e]{color:#fff!important;border-color:#fab6b6!important;background-color:#fab6b6!important}.u-btn--warning--disabled[data-v-1ea4ff2e]{color:#fff!important;border-color:#fcbd71!important;background-color:#fcbd71!important}.u-btn--primary--plain[data-v-1ea4ff2e]{color:#2979ff!important;border-color:#a0cfff!important;background-color:#ecf5ff!important}.u-btn--success--plain[data-v-1ea4ff2e]{color:#19be6b!important;border-color:#71d5a1!important;background-color:#dbf1e1!important}.u-btn--error--plain[data-v-1ea4ff2e]{color:#fa3534!important;border-color:#fab6b6!important;background-color:#fef0f0!important}.u-btn--warning--plain[data-v-1ea4ff2e]{color:#f90!important;border-color:#fcbd71!important;background-color:#fdf6ec!important}.u-hairline-border[data-v-1ea4ff2e]:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:0 0;transform-origin:0 0;left:0;top:0;width:199.8%;height:199.7%;-webkit-transform:scale(.5);transform:scale(.5);border:1px solid currentColor;z-index:1}.u-wave-ripple[data-v-1ea4ff2e]{z-index:0;position:absolute;border-radius:100%;background-clip:padding-box;pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1;-webkit-transform-origin:center;transform-origin:center}.u-wave-ripple.u-wave-active[data-v-1ea4ff2e]{opacity:0;-webkit-transform:scale(2);transform:scale(2);transition:opacity 1s linear,-webkit-transform .4s linear;transition:opacity 1s linear,transform .4s linear;transition:opacity 1s linear,transform .4s linear,-webkit-transform .4s linear}.u-round-circle[data-v-1ea4ff2e]{border-radius:%?100?%}.u-round-circle[data-v-1ea4ff2e]::after{border-radius:%?100?%}.u-loading[data-v-1ea4ff2e]::after{background-color:hsla(0,0%,100%,.35)}.u-size-default[data-v-1ea4ff2e]{font-size:%?30?%;height:%?80?%;line-height:%?80?%}.u-size-medium[data-v-1ea4ff2e]{display:inline-flex;width:auto;font-size:%?26?%;height:%?70?%;line-height:%?70?%;padding:0 %?80?%}.u-size-mini[data-v-1ea4ff2e]{display:inline-flex;width:auto;font-size:%?22?%;padding-top:1px;height:%?50?%;line-height:%?50?%;padding:0 %?20?%}.u-primary-plain-hover[data-v-1ea4ff2e]{color:#fff!important;background:#2b85e4!important}.u-default-plain-hover[data-v-1ea4ff2e]{color:#2b85e4!important;background:#ecf5ff!important}.u-success-plain-hover[data-v-1ea4ff2e]{color:#fff!important;background:#18b566!important}.u-warning-plain-hover[data-v-1ea4ff2e]{color:#fff!important;background:#f29100!important}.u-error-plain-hover[data-v-1ea4ff2e]{color:#fff!important;background:#dd6161!important}.u-info-plain-hover[data-v-1ea4ff2e]{color:#fff!important;background:#82848a!important}.u-default-hover[data-v-1ea4ff2e]{color:#2b85e4!important;border-color:#2b85e4!important;background-color:#ecf5ff!important}.u-primary-hover[data-v-1ea4ff2e]{background:#2b85e4!important;color:#fff}.u-success-hover[data-v-1ea4ff2e]{background:#18b566!important;color:#fff}.u-info-hover[data-v-1ea4ff2e]{background:#82848a!important;color:#fff}.u-warning-hover[data-v-1ea4ff2e]{background:#f29100!important;color:#fff}.u-error-hover[data-v-1ea4ff2e]{background:#dd6161!important;color:#fff}',""]),t.exports=e},"1c315":function(t,e,a){var n=a("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 \n */.u-calendar[data-v-0173a4c0]{color:#606266}.u-calendar__header[data-v-0173a4c0]{width:100%;box-sizing:border-box;font-size:%?30?%;background-color:#fff;color:#303133}.u-calendar__header__text[data-v-0173a4c0]{margin-top:%?30?%;padding:0 %?60?%;\ndisplay:flex;flex-direction:row;\njustify-content:center;align-items:center}.u-calendar__action[data-v-0173a4c0]{padding:%?40?% 0 %?40?% 0}.u-calendar__action__icon[data-v-0173a4c0]{margin:0 %?16?%}.u-calendar__action__text[data-v-0173a4c0]{padding:0 %?16?%;color:#303133;font-size:%?32?%;line-height:%?32?%;font-weight:700}.u-calendar__week-day[data-v-0173a4c0]{\ndisplay:flex;flex-direction:row;\nalign-items:center;justify-content:center;padding:6px 0;overflow:hidden}.u-calendar__week-day__text[data-v-0173a4c0]{flex:1;text-align:center}.u-calendar__content[data-v-0173a4c0]{width:100%;\ndisplay:flex;flex-direction:row;\nflex-wrap:wrap;padding:6px 0;box-sizing:border-box;background-color:#fff;position:relative}.u-calendar__content--end-date[data-v-0173a4c0]{border-top-right-radius:%?8?%;border-bottom-right-radius:%?8?%}.u-calendar__content--start-date[data-v-0173a4c0]{border-top-left-radius:%?8?%;border-bottom-left-radius:%?8?%}.u-calendar__content__item[data-v-0173a4c0]{width:14.2857%;\ndisplay:flex;flex-direction:row;\nalign-items:center;justify-content:center;padding:6px 0;overflow:hidden;position:relative;z-index:2}.u-calendar__content__item__inner[data-v-0173a4c0]{height:%?84?%;\ndisplay:flex;flex-direction:row;\nalign-items:center;justify-content:center;flex-direction:column;font-size:%?32?%;position:relative;border-radius:50%}.u-calendar__content__item__inner__desc[data-v-0173a4c0]{width:100%;font-size:%?24?%;line-height:%?24?%;-webkit-transform:scale(.75);transform:scale(.75);-webkit-transform-origin:center center;transform-origin:center center;position:absolute;left:0;text-align:center;bottom:%?2?%}.u-calendar__content__item__tips[data-v-0173a4c0]{width:100%;font-size:%?24?%;line-height:%?24?%;position:absolute;left:0;-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:center center;transform-origin:center center;text-align:center;bottom:%?8?%;z-index:2}.u-calendar__content__bg-month[data-v-0173a4c0]{position:absolute;font-size:130px;line-height:130px;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#e4e7ed;z-index:1}.u-calendar__bottom[data-v-0173a4c0]{width:100%;\ndisplay:flex;flex-direction:row;\nalign-items:center;justify-content:center;flex-direction:column;background-color:#fff;padding:0 %?40?% %?30?%;box-sizing:border-box;font-size:%?24?%;color:#909399}.u-calendar__bottom__choose[data-v-0173a4c0]{height:%?50?%}.u-calendar__bottom__btn[data-v-0173a4c0]{width:100%}',""]),t.exports=e},"22b7":function(t,e,a){"use strict";var n=a("70b4"),i=a.n(n);i.a},2543:function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return n}));var n={uCalendar:a("d724").default,uSubsection:a("e97e").default},i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"u-demo"},[a("v-uni-view",{staticClass:"u-demo-wrap",staticStyle:{"background-color":"#FFFFFF"}},[a("v-uni-view",{staticClass:"u-demo-title"},[t._v("演示效果")]),a("v-uni-view",{staticClass:"u-demo-area"},[a("u-calendar",{ref:"calendar",attrs:{mode:t.mode,"start-text":t.startText,"end-text":t.endText,"range-color":t.rangeColor,"range-bg-color":t.rangeBgColor,"active-bg-color":t.activeBgColor,"btn-type":t.btnType},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.change.apply(void 0,arguments)}},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}}),a("v-uni-view",{staticClass:"u-demo-result-line"},[t._v(t._s(t.result))])],1)],1),a("v-uni-view",{staticClass:"u-config-wrap"},[a("v-uni-view",{staticClass:"u-config-title u-border-bottom"},[t._v("参数配置")]),a("v-uni-view",{staticClass:"u-config-item"},[a("v-uni-view",{staticClass:"u-item-title"},[t._v("状态")]),a("u-subsection",{attrs:{current:t.showBtnStatus,list:["显示","隐藏"]},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.showChange.apply(void 0,arguments)}}})],1),a("v-uni-view",{staticClass:"u-config-item"},[a("v-uni-view",{staticClass:"u-item-title"},[t._v("模式")]),a("u-subsection",{attrs:{current:"1",list:["单个日期","日期范围"]},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.modeChange.apply(void 0,arguments)}}})],1),a("v-uni-view",{staticClass:"u-config-item"},[a("v-uni-view",{staticClass:"u-item-title"},[t._v("自定义样式")]),a("u-subsection",{attrs:{current:"1",list:["是","否"]},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.styleChange.apply(void 0,arguments)}}})],1)],1)],1)},r=[]},"2c96":function(t,e,a){var n=a("0101");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("4f06").default;i("26f01eb7",n,!0,{sourceMap:!1,shadowMode:!1})},4675:function(t,e,a){"use strict";a.r(e);var n=a("59b4"),i=a("7c45");for(var r in i)"default"!==r&&function(t){a.d(e,t,(function(){return i[t]}))}(r);a("c8d4");var o,s=a("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"1ea4ff2e",null,!1,n["a"],o);e["default"]=c.exports},5214:function(t,e,a){var n=a("a2e2");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("4f06").default;i("63e8d19e",n,!0,{sourceMap:!1,shadowMode:!1})},"52e7":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{show:!1,mode:"range",result:"请选择日期",startText:"开始",endText:"结束",rangeColor:"#2979ff",rangeBgColor:"rgba(41,121,255,0.13)",activeBgColor:"#2979ff",btnType:"primary"}},computed:{showBtnStatus:function(){return this.show?0:1}},methods:{showChange:function(t){this.show=!t},modeChange:function(t){this.mode=0==t?"date":"range",this.show=!0},styleChange:function(t){0==t?(this.startText="住店",this.endText="离店",this.activeBgColor="#19be6b",this.rangeColor="#19be6b",this.rangeBgColor="rgba(25,190,107, 0.13)",this.btnType="success"):(this.startText="开始",this.endText="结束",this.activeBgColor="#2979ff",this.rangeColor="#2979ff",this.rangeBgColor="rgba(41,121,255,0.13)",this.btnType="primary"),this.show=!0},customChange:function(t){0==t?(this.icon1="map",this.icon2="photo",this.arrow=!0):(this.icon1="",this.icon2="",this.arrow=!1)},textareaChange:function(t){this.type=0==t?"textarea":"text"},change:function(t){"range"==this.mode?this.result=t.startDate+" - "+t.endDate:this.result=t.result}}};e.default=n},"59b4":function(t,e,a){"use strict";var n;a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-button",{staticClass:"u-btn u-line-1 u-fix-ios-appearance",class:["u-size-"+t.size,t.plain?"u-btn--"+t.type+"--plain":"",t.loading?"u-loading":"","circle"==t.shape?"u-round-circle":"",t.hairLine?t.showHairLineBorder:"u-btn--bold-border","u-btn--"+t.type,t.disabled?"u-btn--"+t.type+"--disabled":""],style:[t.customStyle,{overflow:t.ripple?"hidden":"visible"}],attrs:{id:"u-wave-btn","hover-start-time":Number(t.hoverStartTime),"hover-stay-time":Number(t.hoverStayTime),disabled:t.disabled,"form-type":t.formType,"open-type":t.openType,"app-parameter":t.appParameter,"hover-stop-propagation":t.hoverStopPropagation,"send-message-title":t.sendMessageTitle,"send-message-path":"sendMessagePath",lang:t.lang,"data-name":t.dataName,"session-from":t.sessionFrom,"send-message-img":t.sendMessageImg,"show-message-card":t.showMessageCard,"hover-class":t.getHoverClass,loading:t.loading},on:{getphonenumber:function(e){arguments[0]=e=t.$handleEvent(e),t.getphonenumber.apply(void 0,arguments)},getuserinfo:function(e){arguments[0]=e=t.$handleEvent(e),t.getuserinfo.apply(void 0,arguments)},error:function(e){arguments[0]=e=t.$handleEvent(e),t.error.apply(void 0,arguments)},opensetting:function(e){arguments[0]=e=t.$handleEvent(e),t.opensetting.apply(void 0,arguments)},launchapp:function(e){arguments[0]=e=t.$handleEvent(e),t.launchapp.apply(void 0,arguments)},click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.click(e)}}},[t._t("default"),t.ripple?a("v-uni-view",{staticClass:"u-wave-ripple",class:[t.waveActive?"u-wave-active":""],style:{top:t.rippleTop+"px",left:t.rippleLeft+"px",width:t.fields.targetWidth+"px",height:t.fields.targetWidth+"px","background-color":t.rippleBgColor||"rgba(0, 0, 0, 0.15)"}}):t._e()],2)},r=[]},"629f":function(t,e,a){"use strict";var n=a("5214"),i=a.n(n);i.a},"70b4":function(t,e,a){var n=a("c85a");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("4f06").default;i("103a9f94",n,!0,{sourceMap:!1,shadowMode:!1})},"7c45":function(t,e,a){"use strict";a.r(e);var n=a("aa3e"),i=a.n(n);for(var r in n)"default"!==r&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},"7cbd":function(t,e,a){"use strict";var n=a("fef9"),i=a.n(n);i.a},"97b1":function(t,e,a){"use strict";a.r(e);var n=a("52e7"),i=a.n(n);for(var r in n)"default"!==r&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},9813:function(t,e,a){"use strict";a.r(e);var n=a("d955"),i=a.n(n);for(var r in n)"default"!==r&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},a2e2:function(t,e,a){var n=a("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 \n */.u-subsection[data-v-05edd86e]{\ndisplay:flex;flex-direction:row;\nalign-items:center;overflow:hidden;position:relative}.u-item[data-v-05edd86e]{flex:1;text-align:center;font-size:%?26?%;height:100%;\ndisplay:flex;flex-direction:row;\nalign-items:center;justify-content:center;color:#303133;padding:0 %?6?%}.u-item-bg[data-v-05edd86e]{background-color:#2979ff;position:absolute;z-index:-1}.u-none-border-right[data-v-05edd86e]{border-right:none!important}.u-item-first[data-v-05edd86e]{border-top-left-radius:%?8?%;border-bottom-left-radius:%?8?%}.u-item-last[data-v-05edd86e]{border-top-right-radius:%?8?%;border-bottom-right-radius:%?8?%}.u-item-text[data-v-05edd86e]{transition:all .35s;color:#303133;\ndisplay:flex;flex-direction:row;\nalign-items:center;position:relative;z-index:3}',""]),t.exports=e},aa3e:function(t,e,a){"use strict";a("c975"),a("a9e3"),a("d3b7"),a("ac1f"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"u-button",props:{hairLine:{type:Boolean,default:!0},type:{type:String,default:"default"},size:{type:String,default:"default"},shape:{type:String,default:"square"},plain:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},openType:{type:String,default:""},formType:{type:String,default:""},appParameter:{type:String,default:""},hoverStopPropagation:{type:Boolean,default:!1},lang:{type:String,default:"en"},sessionFrom:{type:String,default:""},sendMessageTitle:{type:String,default:""},sendMessagePath:{type:String,default:""},sendMessageImg:{type:String,default:""},showMessageCard:{type:Boolean,default:!1},hoverBgColor:{type:String,default:""},rippleBgColor:{type:String,default:""},ripple:{type:Boolean,default:!1},hoverClass:{type:String,default:""},customStyle:{type:Object,default:function(){return{}}},dataName:{type:String,default:""},throttleTime:{type:[String,Number],default:1e3},hoverStartTime:{type:[String,Number],default:20},hoverStayTime:{type:[String,Number],default:150}},computed:{getHoverClass:function(){if(this.loading||this.disabled||this.ripple||this.hoverClass)return"";var t="";return t=this.plain?"u-"+this.type+"-plain-hover":"u-"+this.type+"-hover",t},showHairLineBorder:function(){return["primary","success","error","warning"].indexOf(this.type)>=0&&!this.plain?"":"u-hairline-border"}},data:function(){return{rippleTop:0,rippleLeft:0,fields:{},waveActive:!1}},methods:{click:function(t){var e=this;this.$u.throttle((function(){!0!==e.loading&&!0!==e.disabled&&(e.ripple&&(e.waveActive=!1,e.$nextTick((function(){this.getWaveQuery(t)}))),e.$emit("click",t))}),this.throttleTime)},getWaveQuery:function(t){var e=this;this.getElQuery().then((function(a){var n=a[0];if(n.width&&n.width&&(n.targetWidth=n.height>n.width?n.height:n.width,n.targetWidth)){e.fields=n;var i="",r="";i=t.touches[0].clientX,r=t.touches[0].clientY,e.rippleTop=r-n.top-n.targetWidth/2,e.rippleLeft=i-n.left-n.targetWidth/2,e.$nextTick((function(){e.waveActive=!0}))}}))},getElQuery:function(){var t=this;return new Promise((function(e){var a="";a=uni.createSelectorQuery().in(t),a.select(".u-btn").boundingClientRect(),a.exec((function(t){e(t)}))}))},getphonenumber:function(t){this.$emit("getphonenumber",t)},getuserinfo:function(t){this.$emit("getuserinfo",t)},error:function(t){this.$emit("error",t)},opensetting:function(t){this.$emit("opensetting",t)},launchapp:function(t){this.$emit("launchapp",t)}}};e.default=n},c85a:function(t,e,a){var n=a("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";/**\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 \n */',""]),t.exports=e},c8d4:function(t,e,a){"use strict";var n=a("2c96"),i=a.n(n);i.a},d724:function(t,e,a){"use strict";a.r(e);var n=a("e374"),i=a("9813");for(var r in i)"default"!==r&&function(t){a.d(e,t,(function(){return i[t]}))}(r);a("7cbd");var o,s=a("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"0173a4c0",null,!1,n["a"],o);e["default"]=c.exports},d955:function(t,e,a){"use strict";a("99af"),a("a630"),a("fb6a"),a("a9e3"),a("d3b7"),a("ac1f"),a("3ca3"),a("5319"),a("1276"),a("ddb0"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"u-calendar",props:{safeAreaInsetBottom:{type:Boolean,default:!1},maskCloseAble:{type:Boolean,default:!0},value:{type:Boolean,default:!1},zIndex:{type:[String,Number],default:0},changeYear:{type:Boolean,default:!0},changeMonth:{type:Boolean,default:!0},mode:{type:String,default:"date"},maxYear:{type:[Number,String],default:2050},minYear:{type:[Number,String],default:1950},minDate:{type:[Number,String],default:"1950-01-01"},maxDate:{type:[Number,String],default:""},borderRadius:{type:[String,Number],default:20},monthArrowColor:{type:String,default:"#606266"},yearArrowColor:{type:String,default:"#909399"},color:{type:String,default:"#303133"},activeBgColor:{type:String,default:"#2979ff"},activeColor:{type:String,default:"#ffffff"},rangeBgColor:{type:String,default:"rgba(41,121,255,0.13)"},rangeColor:{type:String,default:"#2979ff"},startText:{type:String,default:"开始"},endText:{type:String,default:"结束"},btnType:{type:String,default:"primary"},isActiveCurrent:{type:Boolean,default:!0},isChange:{type:Boolean,default:!1},closeable:{type:Boolean,default:!0},toolTip:{type:String,default:"选择日期"}},data:function(){return{weekday:1,weekdayArr:[],days:0,daysArr:[],showTitle:"",year:2020,month:0,day:0,startYear:0,startMonth:0,startDay:0,endYear:0,endMonth:0,endDay:0,today:"",activeDate:"",startDate:"",endDate:"",isStart:!0,min:null,max:null,weekDayZh:["日","一","二","三","四","五","六"]}},computed:{dataChange:function(){return"".concat(this.mode,"-").concat(this.minDate,"-").concat(this.maxDate)},uZIndex:function(){return this.zIndex?this.zIndex:this.$u.zIndex.popup}},watch:{dataChange:function(t){this.init()}},created:function(){this.init()},methods:{getColor:function(t,e){var a=1==e?"":this.color,n=t+1,i="".concat(this.year,"-").concat(this.month,"-").concat(n),r=new Date(i.replace(/\-/g,"/")).getTime(),o=this.startDate.replace(/\-/g,"/"),s=this.endDate.replace(/\-/g,"/");return this.isActiveCurrent&&this.activeDate==i||this.startDate==i||this.endDate==i?a=1==e?this.activeBgColor:this.activeColor:this.endDate&&r>new Date(o).getTime()&&r<new Date(s).getTime()&&(a=1==e?this.rangeBgColor:this.rangeColor),a},init:function(){var t=new Date;this.year=t.getFullYear(),this.month=t.getMonth()+1,this.day=t.getDate(),this.today="".concat(t.getFullYear(),"-").concat(t.getMonth()+1,"-").concat(t.getDate()),this.activeDate=this.today,this.min=this.initDate(this.minDate),this.max=this.initDate(this.maxDate||this.today),this.startDate="",this.startYear=0,this.startMonth=0,this.startDay=0,this.endYear=0,this.endMonth=0,this.endDay=0,this.endDate="",this.isStart=!0,this.changeData()},initDate:function(t){var e=t.split("-");return{year:Number(e[0]||1920),month:Number(e[1]||1),day:Number(e[2]||1)}},openDisAbled:function(t,e,a){var n=!0,i="".concat(t,"/").concat(e,"/").concat(a),r="".concat(this.min.year,"/").concat(this.min.month,"/").concat(this.min.day),o="".concat(this.max.year,"/").concat(this.max.month,"/").concat(this.max.day),s=new Date(i).getTime();return s>=new Date(r).getTime()&&s<=new Date(o).getTime()&&(n=!1),n},generateArray:function(t,e){return Array.from(new Array(e+1).keys()).slice(t)},formatNum:function(t){return t<10?"0"+t:t+""},getMonthDay:function(t,e){var a=new Date(t,e,0).getDate();return a},getWeekday:function(t,e){var a=new Date("".concat(t,"/").concat(e,"/01 00:00:00"));return a.getDay()},checkRange:function(t){var e=!1;return(t<this.minYear||t>this.maxYear)&&(uni.showToast({title:"日期超出范围啦~",icon:"none"}),e=!0),e},changeMonthHandler:function(t){if(t){var e=this.month+1,a=e>12?this.year+1:this.year;this.checkRange(a)||(this.month=e>12?1:e,this.year=a,this.changeData())}else{var n=this.month-1,i=n<1?this.year-1:this.year;this.checkRange(i)||(this.month=n<1?12:n,this.year=i,this.changeData())}},changeYearHandler:function(t){var e=t?this.year+1:this.year-1;this.checkRange(e)||(this.year=e,this.changeData())},changeData:function(){this.days=this.getMonthDay(this.year,this.month),this.daysArr=this.generateArray(1,this.days),this.weekday=this.getWeekday(this.year,this.month),this.weekdayArr=this.generateArray(1,this.weekday),this.showTitle="".concat(this.year,"年").concat(this.month,"月"),this.isChange&&"date"==this.mode&&this.btnFix(!0)},dateClick:function(t){if(t+=1,!this.openDisAbled(this.year,this.month,t)){this.day=t;var e="".concat(this.year,"-").concat(this.month,"-").concat(t);if("date"==this.mode)this.activeDate=e;else{var a=new Date(e.replace(/\-/g,"/")).getTime()<new Date(this.startDate.replace(/\-/g,"/")).getTime();this.isStart||a?(this.startDate=e,this.startYear=this.year,this.startMonth=this.month,this.startDay=this.day,this.endYear=0,this.endMonth=0,this.endDay=0,this.endDate="",this.activeDate="",this.isStart=!1):(this.endDate=e,this.endYear=this.year,this.endMonth=this.month,this.endDay=this.day,this.isStart=!0)}}},close:function(){this.$emit("input",!1)},getWeekText:function(t){t=new Date("".concat(t.replace(/\-/g,"/")," 00:00:00"));var e=t.getDay();return"星期"+["日","一","二","三","四","五","六"][e]},btnFix:function(t){if(t||this.close(),"date"==this.mode){var e=this.activeDate.split("-"),a=this.isChange?this.year:Number(e[0]),n=this.isChange?this.month:Number(e[1]),i=this.isChange?this.day:Number(e[2]),r=this.getMonthDay(a,n),o="".concat(a,"-").concat(this.formatNum(n),"-").concat(this.formatNum(i)),s=this.getWeekText(o),c=!1;"".concat(a,"-").concat(n,"-").concat(i)==this.today&&(c=!0),this.$emit("change",{year:a,month:n,day:i,days:r,result:o,week:s,isToday:c})}else{if(!this.startDate||!this.endDate)return;var u=this.formatNum(this.startMonth),d=this.formatNum(this.startDay),l="".concat(this.startYear,"-").concat(u,"-").concat(d),f=this.getWeekText(l),h=this.formatNum(this.endMonth),p=this.formatNum(this.endDay),g="".concat(this.endYear,"-").concat(h,"-").concat(p),v=this.getWeekText(g);this.$emit("change",{startYear:this.startYear,startMonth:this.startMonth,startDay:this.startDay,startDate:l,startWeek:f,endYear:this.endYear,endMonth:this.endMonth,endDay:this.endDay,endDate:g,endWeek:v})}}}};e.default=n},e29c:function(t,e,a){"use strict";var n;a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"u-subsection",style:[t.subsectionStyle]},[t._l(t.listInfo,(function(e,n){return a("v-uni-view",{key:n,staticClass:"u-item u-line-1",class:[t.noBorderRight(n),"u-item-"+n],style:[t.itemStyle(n)],on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.click(n)}}},[a("v-uni-view",{staticClass:"u-item-text u-line-1",style:[t.textStyle(n)]},[t._v(t._s(e.name))])],1)})),a("v-uni-view",{staticClass:"u-item-bg",style:[t.itemBarStyle]})],2)},r=[]},e2aa:function(t,e,a){"use strict";a("99af"),a("d81d"),a("a9e3"),a("ac1f"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"u-subsection",props:{list:{type:Array,default:function(){return[]}},current:{type:[Number,String],default:0},activeColor:{type:String,default:"#303133"},inactiveColor:{type:String,default:"#606266"},mode:{type:String,default:"button"},fontSize:{type:[Number,String],default:28},animation:{type:Boolean,default:!0},height:{type:[Number,String],default:70},bold:{type:Boolean,default:!0},bgColor:{type:String,default:"#eeeeef"},buttonColor:{type:String,default:"#ffffff"},vibrateShort:{type:Boolean,default:!1}},data:function(){return{listInfo:[],itemBgStyle:{width:0,left:0,backgroundColor:"#ffffff",height:"100%",transition:""},currentIndex:this.current,buttonPadding:3,borderRadius:5,firstTimeVibrateShort:!0}},watch:{current:{immediate:!0,handler:function(t){this.currentIndex=t,this.changeSectionStatus(t)}}},created:function(){this.listInfo=this.list.map((function(t,e){if("object"!=typeof t){var a={width:0,name:t};return a}return t.width=0,t}))},computed:{noBorderRight:function(){var t=this;return function(e){if("subsection"==t.mode){var a="";return e<t.list.length-1&&(a+=" u-none-border-right"),0==e&&(a+=" u-item-first"),e==t.list.length-1&&(a+=" u-item-last"),a}}},textStyle:function(){var t=this;return function(e){var a={};return"subsection"==t.mode?e==t.currentIndex?a.color="#ffffff":a.color=t.activeColor:e==t.currentIndex?a.color=t.activeColor:a.color=t.inactiveColor,e==t.currentIndex&&t.bold&&(a.fontWeight="bold"),a.fontSize=t.fontSize+"rpx",a}},itemStyle:function(){var t=this;return function(e){var a={};return"subsection"==t.mode&&(a.borderColor=t.activeColor,a.borderWidth="1px",a.borderStyle="solid"),a}},subsectionStyle:function(){var t={};return t.height=uni.upx2px(this.height)+"px","button"==this.mode&&(t.backgroundColor=this.bgColor,t.padding="".concat(this.buttonPadding,"px"),t.borderRadius="".concat(this.borderRadius,"px")),t},itemBarStyle:function(){var t={};return t.backgroundColor=this.activeColor,t.zIndex=1,"button"==this.mode&&(t.backgroundColor=this.buttonColor,t.borderRadius="".concat(this.borderRadius,"px"),t.bottom="".concat(this.buttonPadding,"px"),t.height=uni.upx2px(this.height)-2*this.buttonPadding+"px",t.zIndex=0),Object.assign(this.itemBgStyle,t)}},mounted:function(){var t=this;setTimeout((function(){t.getTabsInfo()}),10)},methods:{changeSectionStatus:function(t){var e=this;"subsection"==this.mode&&(t==this.list.length-1&&(this.itemBgStyle.borderRadius="0 ".concat(this.buttonPadding,"px ").concat(this.buttonPadding,"px 0")),0==t&&(this.itemBgStyle.borderRadius="".concat(this.buttonPadding,"px 0 0 ").concat(this.buttonPadding,"px")),t>0&&t<this.list.length-1&&(this.itemBgStyle.borderRadius="0")),setTimeout((function(){e.itemBgLeft()}),10),this.vibrateShort&&this.firstTimeVibrateShort,this.firstTimeVibrateShort=!1},click:function(t){t!=this.currentIndex&&(this.currentIndex=t,this.changeSectionStatus(t),this.$emit("change",Number(t)))},getTabsInfo:function(){for(var t=this,e=uni.createSelectorQuery().in(this),a=0;a<this.list.length;a++)e.select(".u-item-"+a).boundingClientRect();e.exec((function(e){e.length||setTimeout((function(){t.getTabsInfo()}),10),e.map((function(e,a){t.listInfo[a].width=e.width})),("subsection"==t.mode||"button"==t.mode)&&(t.itemBgStyle.width=t.listInfo[0].width+"px"),t.itemBgLeft()}))},itemBgLeft:function(){var t=this;this.animation?this.itemBgStyle.transition="all 0.35s":this.itemBgStyle.transition="all 0s";var e=0;this.listInfo.map((function(a,n){n<t.currentIndex&&(e+=a.width)})),"subsection"==this.mode?this.itemBgStyle.left=e+"px":"button"==this.mode&&(this.itemBgStyle.left=e+this.buttonPadding+"px")}}};e.default=n},e374:function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return n}));var n={uPopup:a("4842").default,uIcon:a("b1e3").default,uButton:a("4675").default},i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("u-popup",{attrs:{closeable:!0,maskCloseAble:t.maskCloseAble,mode:"bottom",popup:!1,length:"auto",safeAreaInsetBottom:t.safeAreaInsetBottom,"z-index":t.uZIndex,"border-radius":t.borderRadius,closeable:t.closeable},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.close.apply(void 0,arguments)}},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},[a("v-uni-view",{staticClass:"u-calendar"},[a("v-uni-view",{staticClass:"u-calendar__header"},[t.$slots["tooltip"]?t._t("tooltip"):a("v-uni-view",{staticClass:"u-calendar__header__text"},[t._v(t._s(t.toolTip))])],2),a("v-uni-view",{staticClass:"u-calendar__action u-flex u-row-center"},[a("v-uni-view",{staticClass:"u-calendar__action__icon"},[t.changeYear?a("u-icon",{attrs:{name:"arrow-left-double",color:t.yearArrowColor},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.changeYearHandler(0)}}}):t._e()],1),a("v-uni-view",{staticClass:"u-calendar__action__icon"},[t.changeMonth?a("u-icon",{attrs:{name:"arrow-left",color:t.monthArrowColor},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.changeMonthHandler(0)}}}):t._e()],1),a("v-uni-view",{staticClass:"u-calendar__action__text"},[t._v(t._s(t.showTitle))]),a("v-uni-view",{staticClass:"u-calendar__action__icon"},[t.changeMonth?a("u-icon",{attrs:{name:"arrow-right",color:t.monthArrowColor},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.changeMonthHandler(1)}}}):t._e()],1),a("v-uni-view",{staticClass:"u-calendar__action__icon"},[t.changeYear?a("u-icon",{attrs:{name:"arrow-right-double",color:t.yearArrowColor},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.changeYearHandler(1)}}}):t._e()],1)],1),a("v-uni-view",{staticClass:"u-calendar__week-day"},t._l(t.weekDayZh,(function(e,n){return a("v-uni-view",{key:n,staticClass:"u-calendar__week-day__text"},[t._v(t._s(e))])})),1),a("v-uni-view",{staticClass:"u-calendar__content"},[t._l(t.weekdayArr,(function(t,e){return[a("v-uni-view",{key:e+"_0",staticClass:"u-calendar__content__item"})]})),t._l(t.daysArr,(function(e,n){return a("v-uni-view",{key:n,staticClass:"u-calendar__content__item",class:{"u-hover-class":t.openDisAbled(t.year,t.month,n+1),"u-calendar__content--start-date":"range"==t.mode&&t.startDate==t.year+"-"+t.month+"-"+(n+1)||"date"==t.mode,"u-calendar__content--end-date":"range"==t.mode&&t.endDate==t.year+"-"+t.month+"-"+(n+1)||"date"==t.mode},style:{backgroundColor:t.getColor(n,1)},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.dateClick(n)}}},[a("v-uni-view",{staticClass:"u-calendar__content__item__inner",style:{color:t.getColor(n,2)}},[a("v-uni-view",[t._v(t._s(n+1))])],1),"range"==t.mode&&t.startDate==t.year+"-"+t.month+"-"+(n+1)&&t.startDate!=t.endDate?a("v-uni-view",{staticClass:"u-calendar__content__item__tips",style:{color:t.activeColor}},[t._v(t._s(t.startText))]):t._e(),"range"==t.mode&&t.endDate==t.year+"-"+t.month+"-"+(n+1)?a("v-uni-view",{staticClass:"u-calendar__content__item__tips",style:{color:t.activeColor}},[t._v(t._s(t.endText))]):t._e()],1)})),a("v-uni-view",{staticClass:"u-calendar__content__bg-month"},[t._v(t._s(t.month))])],2),a("v-uni-view",{staticClass:"u-calendar__bottom"},[a("v-uni-view",{staticClass:"u-calendar__bottom__choose"},[a("v-uni-text",[t._v(t._s("date"==t.mode?t.activeDate:t.startDate))]),t.endDate?a("v-uni-text",[t._v("至"+t._s(t.endDate))]):t._e()],1),a("v-uni-view",{staticClass:"u-calendar__bottom__btn"},[a("u-button",{attrs:{type:t.btnType,shape:"circle",size:"default"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.btnFix(!1)}}},[t._v("确定")])],1)],1)],1)],1)},r=[]},e494:function(t,e,a){"use strict";a.r(e);var n=a("2543"),i=a("97b1");for(var r in i)"default"!==r&&function(t){a.d(e,t,(function(){return i[t]}))}(r);a("22b7");var o,s=a("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"1218bfde",null,!1,n["a"],o);e["default"]=c.exports},e97e:function(t,e,a){"use strict";a.r(e);var n=a("e29c"),i=a("fb96");for(var r in i)"default"!==r&&function(t){a.d(e,t,(function(){return i[t]}))}(r);a("629f");var o,s=a("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"05edd86e",null,!1,n["a"],o);e["default"]=c.exports},fb96:function(t,e,a){"use strict";a.r(e);var n=a("e2aa"),i=a.n(n);for(var r in n)"default"!==r&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},fef9:function(t,e,a){var n=a("1c315");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("4f06").default;i("792c69ae",n,!0,{sourceMap:!1,shadowMode:!1})}}]);