pages-componentsC-calendar-calendar.aeb32723.js 7.9 KB

1
  1. (self["webpackChunkuview2_0_cli"]=self["webpackChunkuview2_0_cli"]||[]).push([[5874],{46141:function(e,t,n){var a=n(21208);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var o=n(56).Z;o("eade5dea",a,!0,{sourceMap:!1,shadowMode:!1})},89542:function(e,t,n){var a=n(89031);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var o=n(56).Z;o("1ef6098b",a,!0,{sourceMap:!1,shadowMode:!1})},45829:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var a,o={uLine:n(36083).Z},i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"u-cell-group",class:[e.customClass],style:[e.$u.addStyle(e.customStyle)]},[e.title?n("v-uni-view",{staticClass:"u-cell-group__title"},[e._t("title",[n("v-uni-text",{staticClass:"u-cell-group__title__text"},[e._v(e._s(e.title))])])],2):e._e(),n("v-uni-view",{staticClass:"u-cell-group__wrapper"},[e.border?n("u-line"):e._e(),e._t("default")],2)],1)},c=[],l={props:{title:{type:String,default:uni.$u.props.cellGroup.title},border:{type:Boolean,default:uni.$u.props.cellGroup.border}}},s={name:"u-cell-group",mixins:[uni.$u.mpMixin,uni.$u.mixin,l]},u=s,r=(n(46141),n(69453)),d=(0,r.Z)(u,i,c,!1,null,"61315bde",null,!1,o,a),p=d.exports},68718:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return d}});var a,o={uNavbar:n(74505).Z,uCellGroup:n(45829).Z,uCell:n(4438).Z,uCalendar:n(74397).Z},i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"u-page"},[n("u-navbar",{attrs:{title:"日历",safeAreaInsetTop:!0,fixed:!0,placeholder:!0},on:{leftClick:function(t){arguments[0]=t=e.$handleEvent(t),e.navigateBack.apply(void 0,arguments)}}}),n("u-cell-group",e._l(e.list,(function(t,a){return n("u-cell",{key:a,attrs:{title:t.title,label:e.values[a],isLink:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.showCalendar(a)}}},[n("v-uni-image",{staticClass:"u-cell-icon",attrs:{slot:"icon",src:t.iconUrl,mode:"widthFix"},slot:"icon"})],1)})),1),n("u-calendar",{attrs:{show:e.show1,defaultDate:"2022-02-15"},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirm.apply(void 0,arguments)},close:function(t){arguments[0]=t=e.$handleEvent(t),e.close.apply(void 0,arguments)}}}),n("u-calendar",{attrs:{show:e.show2,mode:"multiple",defaultDate:["2022-03-01"]},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirm.apply(void 0,arguments)},close:function(t){arguments[0]=t=e.$handleEvent(t),e.close.apply(void 0,arguments)}}}),n("u-calendar",{attrs:{show:e.show3,mode:"range"},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirm.apply(void 0,arguments)},close:function(t){arguments[0]=t=e.$handleEvent(t),e.close.apply(void 0,arguments)}}}),n("u-calendar",{attrs:{show:e.show4,mode:"range",color:"#f56c6c",defaultDate:e.customThemeDefaultDate},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirm.apply(void 0,arguments)},close:function(t){arguments[0]=t=e.$handleEvent(t),e.close.apply(void 0,arguments)}}}),n("u-calendar",{attrs:{show:e.show5,mode:"range",defaultDate:e.customTextDefaultDate,startText:"住店",endText:"离店",confirmDisabledText:"请选择离店日期",formatter:e.formatter},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirm.apply(void 0,arguments)},close:function(t){arguments[0]=t=e.$handleEvent(t),e.close.apply(void 0,arguments)}}}),n("u-calendar",{attrs:{show:e.show6,maxDate:e.maxDate},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirm.apply(void 0,arguments)},close:function(t){arguments[0]=t=e.$handleEvent(t),e.close.apply(void 0,arguments)}}}),n("u-calendar",{attrs:{show:e.show7,showLunar:!0},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirm.apply(void 0,arguments)},close:function(t){arguments[0]=t=e.$handleEvent(t),e.close.apply(void 0,arguments)}}}),n("u-calendar",{attrs:{show:e.show8,mode:"multiple",defaultDate:e.defaultDateMultiple},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirm.apply(void 0,arguments)},close:function(t){arguments[0]=t=e.$handleEvent(t),e.close.apply(void 0,arguments)}}})],1)},c=[],l=(n(92222),n(41539),n(33948),n(54747),{data:function(){var e=new Date,t=e.getFullYear(),n=e.getMonth()+1;n=n<10?"0".concat(n):n;var a=e.getDate();return{index:0,show1:!1,show2:!1,show3:!1,show4:!1,show5:!1,show6:!1,show7:!1,show8:!1,values:["","","","","","","",""],customThemeDefaultDate:["".concat(t,"-").concat(n,"-").concat(a),"".concat(t,"-").concat(n,"-").concat(a+5)],customTextDefaultDate:["".concat(t,"-").concat(n,"-").concat(a)],maxDate:"".concat(t,"-").concat(n,"-").concat(a+10),defaultDateMultiple:["".concat(t,"-").concat(n,"-").concat(a),"".concat(t,"-").concat(n,"-").concat(a+1),"".concat(t,"-").concat(n,"-").concat(a+2)],list:[{title:"单个日期",iconUrl:"https://cdn.uviewui.com/uview/demo/calendar/7.png"},{title:"多个日期",iconUrl:"https://cdn.uviewui.com/uview/demo/calendar/8.png"},{title:"日期范围",iconUrl:"https://cdn.uviewui.com/uview/demo/calendar/9.png"},{title:"自定义主题颜色",iconUrl:"https://cdn.uviewui.com/uview/demo/calendar/15.png"},{title:"自定义文案",iconUrl:"https://cdn.uviewui.com/uview/demo/calendar/14.png"},{title:"日期最大范围",iconUrl:"https://cdn.uviewui.com/uview/demo/calendar/13.png"},{title:"显示农历",iconUrl:"https://cdn.uviewui.com/uview/demo/calendar/5.png"},{title:"默认日期",iconUrl:"https://cdn.uviewui.com/uview/demo/calendar/10.png"}]}},methods:{showCalendar:function(e){this.index=e+1,this["show".concat(e+1)]=!0},navigateBack:function(){uni.navigateBack()},confirm:function(e){var t=this;switch(this["show".concat(this.index)]=!1,console.log(e),this.index-1){case 0:this.values[this.index-1]=e[0];break;case 1:e.forEach((function(e,n){0===n?t.values[t.index-1]=e:t.values[t.index-1]+=";"+e}));break;case 2:this.values[this.index-1]=e[0]+"~"+e[e.length-1];break;case 3:this.values[this.index-1]=e[0]+"~"+e[e.length-1];break;case 4:this.values[this.index-1]=e[0]+"~"+e[e.length-1];break;case 5:this.values[this.index-1]=e[0];break;case 6:this.values[this.index-1]=e[0];break;case 7:e.forEach((function(e,n){0===n?t.values[t.index-1]=e:t.values[t.index-1]+=";"+e}));break}},close:function(){this["show".concat(this.index)]=!1},formatter:function(e){var t=new Date,n=t.getMonth()+1,a=t.getDate();return e.month==n&&e.day==a+3&&(e.bottomInfo="有优惠",e.dot=!0),e}}}),s=l,u=(n(89542),n(69453)),r=(0,u.Z)(s,i,c,!1,null,"7164f99c",null,!1,o,a),d=r.exports},21208:function(e,t,n){"use strict";n.r(t);var a=n(43481),o=n.n(a),i=n(2400),c=n.n(i),l=c()(o());l.push([e.id,'@charset "UTF-8";\n/**\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用\n */uni-view[data-v-61315bde], uni-scroll-view[data-v-61315bde], uni-swiper-item[data-v-61315bde]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-cell-group[data-v-61315bde]{flex:1}.u-cell-group__title[data-v-61315bde]{padding:16px 16px 8px}.u-cell-group__title__text[data-v-61315bde]{font-size:15px;line-height:16px;color:#303133}.u-cell-group__wrapper[data-v-61315bde]{position:relative}',""]),t["default"]=l},89031:function(e,t,n){"use strict";n.r(t);var a=n(43481),o=n.n(a),i=n(2400),c=n.n(i),l=c()(o());l.push([e.id,'@charset "UTF-8";\n/**\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用\n */.u-page[data-v-7164f99c]{padding:0}',""]),t["default"]=l},43290:function(e,t,n){var a=n(82109),o=n(21285),i=n(51223);a({target:"Array",proto:!0},{fill:o}),i("fill")}}]);