@idmwx/idmui-gl4 1.5.9 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -32021,11 +32021,18 @@ const Qm = {
32021
32021
  watch: {
32022
32022
  timeZone: {
32023
32023
  handler(t, e) {
32024
- t !== e && (this.handleResetDateRange(this.dateTime), this.handleResetMinMax());
32024
+ t !== e && (this.handleResetDateRange(), this.handleResetMinMax());
32025
32025
  }
32026
32026
  },
32027
- dateRange: {
32027
+ defaultRange: {
32028
+ handler(t, e) {
32029
+ t !== e && this.handleResetDateRange();
32030
+ },
32031
+ deep: !0
32032
+ },
32033
+ defaultDays: {
32028
32034
  handler(t, e) {
32035
+ t !== e && this.handleResetDateRange();
32029
32036
  }
32030
32037
  }
32031
32038
  },
@@ -32040,22 +32047,27 @@ const Qm = {
32040
32047
  this.handleResetDateRange(), this.handleResetMinMax();
32041
32048
  },
32042
32049
  handleResetDateRange() {
32043
- var s, c, n, g;
32050
+ var a, r, s;
32044
32051
  let t, e;
32045
- (s = this.defaultRange) != null && s.length ? (t = this.defaultRange[0], e = (c = this.defaultRange) == null ? void 0 : c.length) : e = this.defaultDays;
32046
- const o = M(t).utc().date(), i = ((n = M(t)) == null ? void 0 : n.utc().set({ date: o, hour: 0, minute: 0, second: 0, millisecond: 0 }).unix()) * 1e3, a = M.tz(i, this.timeZoneName).clone(), r = [];
32052
+ (a = this.defaultRange) != null && a.length ? (t = this.defaultRange[0], e = (r = this.defaultRange) == null ? void 0 : r.length) : e = this.defaultDays;
32053
+ const o = M.tz(t, this.timeZoneName).clone(), i = [];
32047
32054
  if (e < 0)
32048
- for (let p = e + 1; p <= 0; p++)
32049
- r.push(a.clone().add(p, "days").format());
32055
+ for (let c = e + 1; c <= 0; c++)
32056
+ i.push(o.clone().add(c, "days").format());
32050
32057
  else
32051
- for (let p = 0; p < e; p++)
32052
- r.push(a.clone().add(p, "days").format());
32053
- this.dateRange = r, this.dateRangeStr = `${this.computeTimeLT(this.dateRange[0])} ~ ${this.computeTimeLT(this.dateRange[((g = this.dateRange) == null ? void 0 : g.length) - 1])}`, this.$emit("dateRange", [this.dateRange[0], this.dateRange[this.dateRange.length - 1]]);
32058
+ for (let c = 0; c < e; c++)
32059
+ i.push(o.clone().add(c, "days").format());
32060
+ this.dateRange = i, this.dateRangeStr = `${this.computeTimeLT(this.dateRange[0])} ~ ${this.computeTimeLT(this.dateRange[((s = this.dateRange) == null ? void 0 : s.length) - 1])}`, this.$emit(
32061
+ "dateRange",
32062
+ [
32063
+ M(this.dateRange[0]).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(),
32064
+ M(this.dateRange[this.dateRange.length - 1]).set({ hour: 23, minute: 59, second: 59, millisecond: 59 }).format()
32065
+ ]
32066
+ );
32054
32067
  },
32055
32068
  handleResetMinMax() {
32056
- var r;
32057
- const t = M().utc().date(), e = ((r = M()) == null ? void 0 : r.utc().set({ date: t, hour: 0, minute: 0, second: 0, millisecond: 0 }).unix()) * 1e3, o = M.tz(e, this.timeZoneName).clone(), { h: i, f: a } = this.dayAbout;
32058
- i != null && typeof Number(i) == "number" && !isNaN(i) && (this.minDate = o.clone().add(i, "day").format("yyyy-MM-DD")), a != null && typeof Number(a) == "number" && !isNaN(a) && (this.maxDate = o.clone().add(a, "day").format("yyyy-MM-DD"));
32069
+ const t = M.tz(M().format(), this.timeZoneName).clone(), { h: e, f: o } = this.dayAbout;
32070
+ e != null && typeof Number(e) == "number" && !isNaN(e) && (this.minDate = t.clone().add(e, "day").format("yyyy-MM-DD")), o != null && typeof Number(o) == "number" && !isNaN(o) && (this.maxDate = t.clone().add(o, "day").format("yyyy-MM-DD"));
32059
32071
  },
32060
32072
  handleOpenDatePicker() {
32061
32073
  this.showDatePicker = !this.showDatePicker, this.handleUpdateMonth();
@@ -32069,7 +32081,13 @@ const Qm = {
32069
32081
  },
32070
32082
  handleConfirmDate() {
32071
32083
  var t;
32072
- this.dateRangeStr = `${this.computeTimeLT(this.dateRange[0])} ~ ${this.computeTimeLT(this.dateRange[((t = this.dateRange) == null ? void 0 : t.length) - 1])}`, this.$emit("dateRange", [this.dateRange[0], this.dateRange[this.dateRange.length - 1]]), this.showDatePicker = !1;
32084
+ this.dateRangeStr = `${this.computeTimeLT(this.dateRange[0])} ~ ${this.computeTimeLT(this.dateRange[((t = this.dateRange) == null ? void 0 : t.length) - 1])}`, this.$emit(
32085
+ "dateRange",
32086
+ [
32087
+ M(this.dateRange[0]).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(),
32088
+ M(this.dateRange[this.dateRange.length - 1]).set({ hour: 23, minute: 59, second: 59, millisecond: 59 }).format()
32089
+ ]
32090
+ ), this.showDatePicker = !1;
32073
32091
  },
32074
32092
  handleCancelDate() {
32075
32093
  this.showDatePicker = !1;