11 lines
8.3 KiB
JavaScript
11 lines
8.3 KiB
JavaScript
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["tuniao-ui/components/tn-calendar/tn-calendar"],{"4b1b":function(t,e,a){"use strict";a.r(e);var n=a("b7e6"),i=a.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},"888c":function(t,e,a){"use strict";a.r(e);var n=a("c7f6"),i=a("4b1b");for(var r in i)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(r);a("db48");var o=a("f0c5"),s=Object(o["a"])(i["default"],n["b"],n["c"],!1,null,"a55073ce",null,!1,n["a"],void 0);e["default"]=s.exports},ac36:function(t,e,a){},b7e6:function(t,e,a){"use strict";(function(t){var n=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(a("18c4")),r={name:"tn-calendar",props:{value:{type:Boolean,default:!1},mode:{type:String,default:"date"},changeYear:{type:Boolean,default:!0},changeMonth:{type:Boolean,default:!0},maxYear:{type:[Number,String],default:2100},minYear:{type:[Number,String],default:1970},minDate:{type:String,default:"1970-01-01"},maxDate:{type:String,default:""},monthArrowColor:{type:String,default:"#AAAAAA"},yearArrowColor:{type:String,default:"#C8C8C8"},color:{type:String,default:"#080808"},activeBgColor:{type:String,default:"#01BEFF"},activeColor:{type:String,default:"#FFFFFF"},rangeBgColor:{type:String,default:"#E6E6E655"},rangeColor:{type:String,default:"#01BEFF"},startText:{type:String,default:"开始"},endText:{type:String,default:"结束"},btnColor:{type:String,default:"#01BEFF"},lunarColor:{type:String,default:"#AAAAAA"},isActiveCurrent:{type:Boolean,default:!0},isChange:{type:Boolean,default:!1},showLunar:{type:Boolean,default:!0},toolTips:{type:String,default:"请选择日期"},borderRadius:{type:Number,default:8},safeAreaInsetBottom:{type:Boolean,default:!1},maskCloseable:{type:Boolean,default:!0},zIndex:{type:Number,default:0},closeBtn:{type:Boolean,default:!1}},computed:{dateChange:function(){return"".concat(this.mode,"-").concat(this.minDate,"-").concat(this.maxDate)},elIndex:function(){return this.zIndex?this.zIndex:this.$tn.zIndex.popup},colorValue:function(){var t=this;return function(e,a){var n="bg"===a?"":t.color,i=e+1,r="".concat(t.year,"-").concat(t.month,"-").concat(i),o=new Date(r.replace(/\-/g,"/")).getTime(),s=t.startDate.replace(/\-/g,"/"),h=t.endDate.replace(/\-/g,"/");return"date"===t.mode&&t.isActiveCurrent&&t.activeDate==r||t.startDate==r||t.endDate==r?n="bg"===a?t.activeBgColor:t.activeColor:t.endDate&&o>new Date(s).getTime()&&o<new Date(h).getTime()&&(n="bg"===a?t.rangeBgColor:t.rangeColor),n}}},data:function(){return{weekday:1,weekdayArr:[],weekDayZh:["日","一","二","三","四","五","六"],days:0,daysArr:[],year:2021,month:0,day:0,startYear:0,startMonth:0,startDay:0,endYear:0,endMonth:0,endDay:0,today:"",activeDate:"",startDate:"",endDate:"",min:null,max:null,dateTitle:"",chooseStart:!1}},watch:{dateChange:function(){this.init()}},created:function(){this.init()},methods:{init:function(){var t=new Date;this.year=t.getFullYear(),this.month=t.getMonth()+1,this.day=t.getDate(),this.today="".concat(this.year,"-").concat(this.month,"-").concat(this.day),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.endDate="",this.endYear=0,this.endMonth=0,this.endDay=0,this.chooseStart=!1,this.changeData()},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())},dateClick:function(t){if(t+=1,!this.disabledChoose(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.start
|
||
|
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
||
|
'tuniao-ui/components/tn-calendar/tn-calendar-create-component',
|
||
|
{
|
||
|
'tuniao-ui/components/tn-calendar/tn-calendar-create-component':(function(module, exports, __webpack_require__){
|
||
|
__webpack_require__('543d')['createComponent'](__webpack_require__("888c"))
|
||
|
})
|
||
|
},
|
||
|
[['tuniao-ui/components/tn-calendar/tn-calendar-create-component']]
|
||
|
]);
|