@idmwx/idmui-gl4 1.5.5 → 1.5.7
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
|
@@ -11045,6 +11045,7 @@ const tm = {
|
|
|
11045
11045
|
name: "IdmPoint",
|
|
11046
11046
|
components: {
|
|
11047
11047
|
DateTimePicker: no
|
|
11048
|
+
// DateRangePicker
|
|
11048
11049
|
},
|
|
11049
11050
|
props: {
|
|
11050
11051
|
isLogin: {
|
|
@@ -31979,7 +31980,7 @@ const Qm = {
|
|
|
31979
31980
|
},
|
|
31980
31981
|
dayAbout: {
|
|
31981
31982
|
type: Object,
|
|
31982
|
-
default: () => ({ h:
|
|
31983
|
+
default: () => ({ h: -7, f: 14 })
|
|
31983
31984
|
//{ h: -7, f: 14 }
|
|
31984
31985
|
}
|
|
31985
31986
|
},
|
|
@@ -31989,7 +31990,8 @@ const Qm = {
|
|
|
31989
31990
|
showDatePicker: !1,
|
|
31990
31991
|
minDate: void 0,
|
|
31991
31992
|
maxDate: void 0,
|
|
31992
|
-
dateRange: []
|
|
31993
|
+
dateRange: [],
|
|
31994
|
+
dateRangeStr: void 0
|
|
31993
31995
|
};
|
|
31994
31996
|
},
|
|
31995
31997
|
computed: {
|
|
@@ -32008,6 +32010,12 @@ const Qm = {
|
|
|
32008
32010
|
},
|
|
32009
32011
|
localTimeZoneName() {
|
|
32010
32012
|
return Intl.DateTimeFormat().resolvedOptions().timeZone || "Asia/Shanghai";
|
|
32013
|
+
},
|
|
32014
|
+
computeTimeLT() {
|
|
32015
|
+
return (t, e = "yyyy-MM-DD") => {
|
|
32016
|
+
var o;
|
|
32017
|
+
return t ? (o = M(t)) == null ? void 0 : o.format(e) : "-";
|
|
32018
|
+
};
|
|
32011
32019
|
}
|
|
32012
32020
|
},
|
|
32013
32021
|
watch: {
|
|
@@ -32018,7 +32026,6 @@ const Qm = {
|
|
|
32018
32026
|
},
|
|
32019
32027
|
dateRange: {
|
|
32020
32028
|
handler(t, e) {
|
|
32021
|
-
t !== e && console.log(this.dateRange);
|
|
32022
32029
|
}
|
|
32023
32030
|
}
|
|
32024
32031
|
},
|
|
@@ -32033,20 +32040,24 @@ const Qm = {
|
|
|
32033
32040
|
this.handleResetDateRange(), this.handleResetMinMax();
|
|
32034
32041
|
},
|
|
32035
32042
|
handleResetDateRange() {
|
|
32036
|
-
var s, c, n;
|
|
32043
|
+
var s, c, n, g;
|
|
32037
32044
|
let t, e;
|
|
32038
32045
|
(s = this.defaultRange) != null && s.length ? (t = this.defaultRange[0], e = (c = this.defaultRange) == null ? void 0 : c.length) : e = this.defaultDays;
|
|
32039
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 = [];
|
|
32040
|
-
|
|
32041
|
-
|
|
32042
|
-
|
|
32047
|
+
if (e < 0)
|
|
32048
|
+
for (let p = e + 1; p <= 0; p++)
|
|
32049
|
+
r.push(a.clone().add(p, "days").format());
|
|
32050
|
+
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]]);
|
|
32043
32054
|
},
|
|
32044
32055
|
handleResetMinMax() {
|
|
32045
|
-
var
|
|
32056
|
+
var i;
|
|
32046
32057
|
if (!this.dayAbout.h || !this.dayAbout.f)
|
|
32047
32058
|
return;
|
|
32048
|
-
const t = M().utc().date(), e =
|
|
32049
|
-
this.minDate =
|
|
32059
|
+
const t = M().utc().date(), e = ((i = M()) == null ? void 0 : i.utc().set({ date: t, hour: 0, minute: 0, second: 0, millisecond: 0 }).unix()) * 1e3, o = M.tz(e, this.timeZoneName).clone();
|
|
32060
|
+
this.minDate = o.clone().add(this.dayAbout.h, "day").format("yyyy-MM-DD"), this.maxDate = o.clone().add(this.dayAbout.f, "day").format("yyyy-MM-DD");
|
|
32050
32061
|
},
|
|
32051
32062
|
handleOpenDatePicker() {
|
|
32052
32063
|
this.showDatePicker = !this.showDatePicker, this.handleUpdateMonth();
|
|
@@ -32059,7 +32070,8 @@ const Qm = {
|
|
|
32059
32070
|
});
|
|
32060
32071
|
},
|
|
32061
32072
|
handleConfirmDate() {
|
|
32062
|
-
|
|
32073
|
+
var t;
|
|
32074
|
+
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;
|
|
32063
32075
|
},
|
|
32064
32076
|
handleCancelDate() {
|
|
32065
32077
|
this.showDatePicker = !1;
|
|
@@ -32083,12 +32095,9 @@ function td(t, e, o, i, a, r) {
|
|
|
32083
32095
|
class: "elevation-0 text-body-1 px-2 btn-border-1 btn-bg-1",
|
|
32084
32096
|
onClick: r.handleOpenDatePicker
|
|
32085
32097
|
}, {
|
|
32086
|
-
default: u(() =>
|
|
32087
|
-
|
|
32088
|
-
|
|
32089
|
-
B(m(a.dateRange[0]) + " ~ " + m(a.dateRange[((w = a.dateRange) == null ? void 0 : w.length) - 1]), 1)
|
|
32090
|
-
];
|
|
32091
|
-
}),
|
|
32098
|
+
default: u(() => [
|
|
32099
|
+
B(m(a.dateRangeStr), 1)
|
|
32100
|
+
]),
|
|
32092
32101
|
_: 1
|
|
32093
32102
|
}, 8, ["height", "width", "onClick"]),
|
|
32094
32103
|
a.showDatePicker ? (b(), R(y, {
|