uni-calendar.js 4.8 KB

1234567891011
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["node-modules/@dcloudio/uni-ui/lib/uni-calendar/uni-calendar"],{"25d4":function(t,e,n){"use strict";n.r(e);var a=n("a5a3"),i=n("d7e3");for(var c in i)"default"!==c&&function(t){n.d(e,t,(function(){return i[t]}))}(c);n("dba4");var s,u=n("f0c5"),l=Object(u["a"])(i["default"],a["b"],a["c"],!1,null,"f37caa26",null,!1,a["a"],s);e["default"]=l.exports},7374:function(t,e,n){},8813:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=s(n("7149")),i=n("78b5"),c=s(n("dbac"));function s(t){return t&&t.__esModule?t:{default:t}}var u=function(){n.e("node-modules/@dcloudio/uni-ui/lib/uni-calendar/uni-calendar-item").then(function(){return resolve(n("7cba"))}.bind(null,n)).catch(n.oe)},l=(0,i.initVueI18n)(c.default),o=l.t,r={components:{calendarItem:u},emits:["close","confirm","change","monthSwitch"],props:{date:{type:String,default:""},selected:{type:Array,default:function(){return[]}},lunar:{type:Boolean,default:!1},startDate:{type:String,default:""},endDate:{type:String,default:""},range:{type:Boolean,default:!1},insert:{type:Boolean,default:!0},showMonth:{type:Boolean,default:!0},clearDate:{type:Boolean,default:!0}},data:function(){return{show:!1,weeks:[],calendar:{},nowDate:"",aniMaskShow:!1}},computed:{okText:function(){return o("uni-calender.ok")},cancelText:function(){return o("uni-calender.cancel")},todayText:function(){return o("uni-calender.today")},monText:function(){return o("uni-calender.MON")},TUEText:function(){return o("uni-calender.TUE")},WEDText:function(){return o("uni-calender.WED")},THUText:function(){return o("uni-calender.THU")},FRIText:function(){return o("uni-calender.FRI")},SATText:function(){return o("uni-calender.SAT")},SUNText:function(){return o("uni-calender.SUN")}},watch:{date:function(t){this.init(t)},startDate:function(t){this.cale.resetSatrtDate(t),this.cale.setDate(this.nowDate.fullDate),this.weeks=this.cale.weeks},endDate:function(t){this.cale.resetEndDate(t),this.cale.setDate(this.nowDate.fullDate),this.weeks=this.cale.weeks},selected:function(t){this.cale.setSelectInfo(this.nowDate.fullDate,t),this.weeks=this.cale.weeks}},created:function(){this.cale=new a.default({selected:this.selected,startDate:this.startDate,endDate:this.endDate,range:this.range}),this.init(this.date)},methods:{clean:function(){},bindDateChange:function(t){var e=t.detail.value+"-1";console.log(this.cale.getDate(e)),this.init(e)},init:function(t){this.cale.setDate(t),this.weeks=this.cale.weeks,this.nowDate=this.calendar=this.cale.getInfo(t)},open:function(){var t=this;this.clearDate&&!this.insert&&(this.cale.cleanMultipleStatus(),this.init(this.date)),this.show=!0,this.$nextTick((function(){setTimeout((function(){t.aniMaskShow=!0}),50)}))},close:function(){var t=this;this.aniMaskShow=!1,this.$nextTick((function(){setTimeout((function(){t.show=!1,t.$emit("close")}),300)}))},confirm:function(){this.setEmit("confirm"),this.close()},change:function(){this.insert&&this.setEmit("change")},monthSwitch:function(){var t=this.nowDate,e=t.year,n=t.month;this.$emit("monthSwitch",{year:e,month:Number(n)})},setEmit:function(t){var e=this.calendar,n=e.year,a=e.month,i=e.date,c=e.fullDate,s=e.lunar,u=e.extraInfo;this.$emit(t,{range:this.cale.multipleStatus,year:n,month:a,date:i,fulldate:c,lunar:s,extraInfo:u||{}})},choiceDate:function(t){t.disable||(this.calendar=t,this.cale.setMultiple(this.calendar.fullDate),this.weeks=this.cale.weeks,this.change())},backtoday:function(){console.log(this.cale.getDate(new Date).fullDate);var t=this.cale.getDate(new Date).fullDate;this.init(t),this.change()},pre:function(){var t=this.cale.getDate(this.nowDate.fullDate,-1,"month").fullDate;this.setDate(t),this.monthSwitch()},next:function(){var t=this.cale.getDate(this.nowDate.fullDate,1,"month").fullDate;this.setDate(t),this.monthSwitch()},setDate:function(t){this.cale.setDate(t),this.weeks=this.cale.weeks,this.nowDate=this.cale.getInfo(t)}}};e.default=r},a5a3:function(t,e,n){"use strict";var a,i=function(){var t=this,e=t.$createElement;t._self._c},c=[];n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return a}))},d7e3:function(t,e,n){"use strict";n.r(e);var a=n("8813"),i=n.n(a);for(var c in a)"default"!==c&&function(t){n.d(e,t,(function(){return a[t]}))}(c);e["default"]=i.a},dba4:function(t,e,n){"use strict";var a=n("7374"),i=n.n(a);i.a}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'node-modules/@dcloudio/uni-ui/lib/uni-calendar/uni-calendar-create-component',
  4. {
  5. 'node-modules/@dcloudio/uni-ui/lib/uni-calendar/uni-calendar-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('543d')['createComponent'](__webpack_require__("25d4"))
  7. })
  8. },
  9. [['node-modules/@dcloudio/uni-ui/lib/uni-calendar/uni-calendar-create-component']]
  10. ]);