提交 1395dae0 编写于 作者: chitanda's avatar chitanda

fix: 日历插件升级

上级 87bf45dd
...@@ -25,7 +25,7 @@ var Fe = { exports: {} }; ...@@ -25,7 +25,7 @@ var Fe = { exports: {} };
}; };
}); });
})(Fe); })(Fe);
const Ue = Fe.exports; const Ve = Fe.exports;
var Te = { exports: {} }; var Te = { exports: {} };
(function(i, u) { (function(i, u) {
(function(a, r) { (function(a, r) {
...@@ -39,7 +39,7 @@ var Te = { exports: {} }; ...@@ -39,7 +39,7 @@ var Te = { exports: {} };
}; };
}); });
})(Te); })(Te);
const Ve = Te.exports; const Ue = Te.exports;
var Ze = { exports: {} }; var Ze = { exports: {} };
(function(i, u) { (function(i, u) {
(function(a, r) { (function(a, r) {
...@@ -317,13 +317,13 @@ function Je() { ...@@ -317,13 +317,13 @@ function Je() {
month11: "11 \u6708", month11: "11 \u6708",
month12: "12 \u6708", month12: "12 \u6708",
weeks: { weeks: {
sun: "\u5468\u65E5", sun: "\u65E5",
mon: "\u5468\u4E00", mon: "\u4E00",
tue: "\u5468\u4E8C", tue: "\u4E8C",
wed: "\u5468\u4E09", wed: "\u4E09",
thu: "\u5468\u56DB", thu: "\u56DB",
fri: "\u5468\u4E94", fri: "\u4E94",
sat: "\u5468\u516D" sat: "\u516D"
}, },
months: { months: {
jan: "\u4E00\u6708", jan: "\u4E00\u6708",
...@@ -1417,12 +1417,12 @@ function at() { ...@@ -1417,12 +1417,12 @@ function at() {
var S = h.text, Y = h.type, A = this.$createElement, P = this.elCalendar.$scopedSlots.dateCell; var S = h.text, Y = h.type, A = this.$createElement, P = this.elCalendar.$scopedSlots.dateCell;
if (!P) if (!P)
return A("span", [S]); return A("span", [S]);
var k = this.getFormateDate(S, Y), I = new Date(k), V = { var k = this.getFormateDate(S, Y), I = new Date(k), U = {
isSelected: this.selectedDay === k, isSelected: this.selectedDay === k,
type: Y + "-month", type: Y + "-month",
day: k day: k
}; };
return P({ date: I, data: V }); return P({ date: I, data: U });
} }
}, },
computed: { computed: {
...@@ -1464,14 +1464,14 @@ function at() { ...@@ -1464,14 +1464,14 @@ function at() {
}); });
h = P.concat(I); h = P.concat(I);
} else { } else {
var V = this.date, U = Object(D.getFirstDayOfMonth)(V); var U = this.date, V = Object(D.getFirstDayOfMonth)(U);
U = U === 0 ? 7 : U; V = V === 0 ? 7 : V;
var Z = typeof this.firstDayOfWeek == "number" ? this.firstDayOfWeek : 1, W = (7 + U - Z) % 7, J = Object(D.getPrevMonthLastDays)(V, W).map(function(G) { var Z = typeof this.firstDayOfWeek == "number" ? this.firstDayOfWeek : 1, W = (7 + V - Z) % 7, J = Object(D.getPrevMonthLastDays)(U, W).map(function(G) {
return { return {
text: G, text: G,
type: "prev" type: "prev"
}; };
}), te = Object(D.getMonthDays)(V).map(function(G) { }), te = Object(D.getMonthDays)(U).map(function(G) {
return { return {
text: G, text: G,
type: "current" type: "current"
...@@ -1583,9 +1583,6 @@ function at() { ...@@ -1583,9 +1583,6 @@ function at() {
}; };
}, },
methods: { methods: {
forceUpdate() {
this.$forceUpdate();
},
pickDay: function(h) { pickDay: function(h) {
this.realSelectedDay = h; this.realSelectedDay = h;
}, },
...@@ -1660,12 +1657,12 @@ function at() { ...@@ -1660,12 +1657,12 @@ function at() {
return console.warn("[ElementCalendar]end time should be greater than start time"), []; return console.warn("[ElementCalendar]end time should be greater than start time"), [];
if (Object(D.validateRangeInOneMonth)(A, P)) if (Object(D.validateRangeInOneMonth)(A, P))
return [[A, P]]; return [[A, P]];
var k = [], I = new Date(A.getFullYear(), A.getMonth() + 1, 1), V = this.toDate(I.getTime() - w); var k = [], I = new Date(A.getFullYear(), A.getMonth() + 1, 1), U = this.toDate(I.getTime() - w);
if (!Object(D.validateRangeInOneMonth)(I, P)) if (!Object(D.validateRangeInOneMonth)(I, P))
return console.warn("[ElementCalendar]start time and end time interval must not exceed two months"), []; return console.warn("[ElementCalendar]start time and end time interval must not exceed two months"), [];
k.push([A, V]); k.push([A, U]);
var U = this.realFirstDayOfWeek, Z = I.getDay(), W = 0; var V = this.realFirstDayOfWeek, Z = I.getDay(), W = 0;
return Z !== U && (U === 0 ? W = 7 - Z : (W = U - Z, W = W > 0 ? W : 7 + W)), I = this.toDate(I.getTime() + W * w), I.getDate() < P.getDate() && k.push([I, P]), k; return Z !== V && (V === 0 ? W = 7 - Z : (W = V - Z, W = W > 0 ? W : 7 + W)), I = this.toDate(I.getTime() + W * w), I.getDate() < P.getDate() && k.push([I, P]), k;
} }
return []; return [];
}, },
...@@ -2755,6 +2752,7 @@ const mt = ce({ ...@@ -2755,6 +2752,7 @@ const mt = ce({
}, [this.reload === !0 ? null : L("el-calendar", { }, [this.reload === !0 ? null : L("el-calendar", {
ref: "calendarRef", ref: "calendarRef",
attrs: { attrs: {
value: this.c.state.activeMonth.format("YYYY-MM-DD"),
size: this.dataMap.size size: this.dataMap.size
}, },
scopedSlots: { scopedSlots: {
...@@ -2810,7 +2808,7 @@ const mt = ce({ ...@@ -2810,7 +2808,7 @@ const mt = ce({
}), wt = { }), wt = {
mateUrl: import.meta.url, mateUrl: import.meta.url,
install(i) { install(i) {
it.loadStyle(["/style.css"]), z.locale("zh-cn"), z.extend(Ue), z.extend(Ve), i.component(Ce.name, Ce), i.component("CalendarGridView", ft), i.component("StatisticalCalendarControl", mt), i.component("StatisticalCalendarItem", pt), ibiz.register.view.register( it.loadStyle(["/style.css"]), z.locale("zh-cn"), z.extend(Ve), z.extend(Ue), i.component(Ce.name, Ce), i.component("CalendarGridView", ft), i.component("StatisticalCalendarControl", mt), i.component("StatisticalCalendarItem", pt), ibiz.register.view.register(
"VIEW_CUSTOM_CalendarGridView", "VIEW_CUSTOM_CalendarGridView",
new lt() new lt()
); );
......
...@@ -24,13 +24,13 @@ ...@@ -24,13 +24,13 @@
}, },
"dependencies": { "dependencies": {
"@ibiz-template/command": "^0.0.1-beta.50", "@ibiz-template/command": "^0.0.1-beta.50",
"@ibiz-template/controller": "^0.0.1-beta.54", "@ibiz-template/controller": "^0.0.1-beta.55",
"@ibiz-template/core": "^0.0.1-beta.51", "@ibiz-template/core": "^0.0.1-beta.51",
"@ibiz-template/model": "^0.0.1-beta.54", "@ibiz-template/model": "^0.0.1-beta.55",
"@ibiz-template/runtime": "^0.0.1-beta.54", "@ibiz-template/runtime": "^0.0.1-beta.55",
"@ibiz-template/service": "^0.0.1-beta.54", "@ibiz-template/service": "^0.0.1-beta.55",
"@ibiz-template/theme": "^0.0.1-beta.54", "@ibiz-template/theme": "^0.0.1-beta.54",
"@ibiz-template/vue-util": "^0.0.1-beta.54", "@ibiz-template/vue-util": "^0.0.1-beta.55",
"async-validator": "^4.2.5", "async-validator": "^4.2.5",
"axios": "^1.1.3", "axios": "^1.1.3",
"core-js": "3", "core-js": "3",
...@@ -48,13 +48,13 @@ ...@@ -48,13 +48,13 @@
}, },
"peerDependencies": { "peerDependencies": {
"@ibiz-template/command": "^0.0.1-beta.50", "@ibiz-template/command": "^0.0.1-beta.50",
"@ibiz-template/controller": "^0.0.1-beta.54", "@ibiz-template/controller": "^0.0.1-beta.55",
"@ibiz-template/core": "^0.0.1-beta.51", "@ibiz-template/core": "^0.0.1-beta.51",
"@ibiz-template/model": "^0.0.1-beta.54", "@ibiz-template/model": "^0.0.1-beta.55",
"@ibiz-template/runtime": "^0.0.1-beta.54", "@ibiz-template/runtime": "^0.0.1-beta.55",
"@ibiz-template/service": "^0.0.1-beta.54", "@ibiz-template/service": "^0.0.1-beta.55",
"@ibiz-template/theme": "^0.0.1-beta.54", "@ibiz-template/theme": "^0.0.1-beta.54",
"@ibiz-template/vue-util": "^0.0.1-beta.54", "@ibiz-template/vue-util": "^0.0.1-beta.55",
"async-validator": "^4.2.5", "async-validator": "^4.2.5",
"axios": "^1.1.3", "axios": "^1.1.3",
"core-js": "3", "core-js": "3",
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册