@idmwx/idmui-gl4 0.9.1 → 0.9.2
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
|
@@ -8260,16 +8260,17 @@ const Cs = {
|
|
|
8260
8260
|
handleMenuToggle() {
|
|
8261
8261
|
this.isLogin ? this.toggle = !this.toggle : this.$emit("login");
|
|
8262
8262
|
},
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8263
|
+
clickForm() {
|
|
8264
|
+
var t;
|
|
8265
|
+
this.showMeteo = !1, (t = this.meteoMarker) == null || t.remove(), this.meteoMarker = void 0, this.$refs.spotForm.validate().then(async (e) => {
|
|
8266
|
+
var o;
|
|
8267
|
+
if (e != null && e.valid) {
|
|
8267
8268
|
this.form.lat = (Number(this.form.latDegree ?? 0) + Number(this.form.latMinute ?? 0) / 60) * (this.form.latDirection === "N" ? 1 : -1), this.form.lng = (Number(this.form.lngDegree ?? 0) + Number(this.form.lngMinute ?? 0) / 60) * (this.form.lngDirection === "E" ? 1 : -1), this.point = {
|
|
8268
8269
|
lat: this.form.lat,
|
|
8269
8270
|
lng: this.form.lng
|
|
8270
8271
|
};
|
|
8271
|
-
const
|
|
8272
|
-
((
|
|
8272
|
+
const i = D();
|
|
8273
|
+
((o = D(this.realTime)) == null ? void 0 : o.diff(i, "d", !0)) >= 0 ? await this.fetchMeteoData(this.form) : await this.fetchHistoryData(this.form), this.initTableData(this.meteoData), this.handleRender();
|
|
8273
8274
|
}
|
|
8274
8275
|
});
|
|
8275
8276
|
},
|
|
@@ -8338,31 +8339,33 @@ const Cs = {
|
|
|
8338
8339
|
},
|
|
8339
8340
|
handleClick(t) {
|
|
8340
8341
|
if (t.originalEvent.stopPropagation(), t.originalEvent.target.className === "mapboxgl-canvas")
|
|
8341
|
-
this.handleDrawMarker(t.lngLat)
|
|
8342
|
+
this.handleDrawMarker(t.lngLat), this.$nextTick(() => {
|
|
8343
|
+
var o, i, a;
|
|
8344
|
+
(a = (i = (o = this.$refs) == null ? void 0 : o.submitSpot) == null ? void 0 : i.$el) == null || a.click();
|
|
8345
|
+
});
|
|
8342
8346
|
else
|
|
8343
8347
|
return !1;
|
|
8344
8348
|
},
|
|
8345
8349
|
handleDrawMarker(t) {
|
|
8346
|
-
var e;
|
|
8347
|
-
if (this.form.latDegree = Number(oe.lat2pretty(t.lat).degree), this.form.latMinute = Number(oe.lat2pretty(t.lat).minute), this.form.latDirection = oe.lat2pretty(t.lat).direction, this.form.lngDegree = Number(oe.lng2pretty(t.lng).degree), this.form.lngMinute = Number(oe.lng2pretty(t.lng).minute), this.form.lngDirection = oe.lng2pretty(t.lng).direction, this.point = {
|
|
8350
|
+
var e, o;
|
|
8351
|
+
if (this.showMeteo = !1, (e = this.meteoMarker) == null || e.remove(), this.meteoMarker = void 0, this.form.latDegree = Number(oe.lat2pretty(t.lat).degree), this.form.latMinute = Number(oe.lat2pretty(t.lat).minute), this.form.latDirection = oe.lat2pretty(t.lat).direction, this.form.lngDegree = Number(oe.lng2pretty(t.lng).degree), this.form.lngMinute = Number(oe.lng2pretty(t.lng).minute), this.form.lngDirection = oe.lng2pretty(t.lng).direction, this.point = {
|
|
8348
8352
|
lat: t.lat,
|
|
8349
8353
|
lng: t.lng
|
|
8350
8354
|
}, this.positionMarker)
|
|
8351
|
-
(
|
|
8355
|
+
(o = this.positionMarker) == null || o.setLngLat([this.point.lng, this.point.lat]);
|
|
8352
8356
|
else {
|
|
8353
|
-
const
|
|
8354
|
-
|
|
8357
|
+
const i = document.createElement("div");
|
|
8358
|
+
i.innerHTML = '<svg t="1755510770354" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5552" width="200" height="200"><path d="M511.960615 827.234462s330.358154-215.906462 330.358154-465.526154C842.318769 183.650462 694.468923 39.384615 512 39.384615S181.563077 183.689846 181.563077 361.668923c0 249.659077 330.397538 465.565538 330.397538 465.565539z" fill="#FF8C00" p-id="5553"></path><path d="M511.921231 496.836923a127.054769 127.054769 0 1 0 0-254.148923 127.054769 127.054769 0 0 0 0 254.148923z" fill="#FFFFFF" p-id="5554"></path><path d="M354.461538 945.230769a157.538462 39.384615 0 1 0 315.076924 0 157.538462 39.384615 0 1 0-315.076924 0Z" fill="#494C4F" opacity=".4" p-id="5555"></path></svg>', i.firstChild.style.height = "28px", i.firstChild.style.width = "28px", this.positionMarker = new we.Marker(i).setLngLat([this.point.lng, this.point.lat]).setOffset([0, -14]).addTo(this.map);
|
|
8355
8359
|
}
|
|
8356
8360
|
},
|
|
8357
8361
|
handleRender() {
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
if (this.meteoMarker)
|
|
8362
|
+
this.point && (this.map.flyTo({
|
|
8363
|
+
center: [this.point.lng, this.point.lat],
|
|
8364
|
+
duration: 800
|
|
8365
|
+
}), setTimeout(() => {
|
|
8366
|
+
this.showMeteo = !0, this.$nextTick(() => {
|
|
8367
|
+
var t, e, o;
|
|
8368
|
+
if ((t = this.positionMarker) == null || t.remove(), this.positionMarker = void 0, this.meteoMarker)
|
|
8366
8369
|
(e = this.meteoMarker) == null || e.setLngLat([this.point.lng, this.point.lat]);
|
|
8367
8370
|
else {
|
|
8368
8371
|
const i = document.createElement("div");
|
|
@@ -8374,8 +8377,8 @@ const Cs = {
|
|
|
8374
8377
|
const i = document.getElementById("idm-gl4-spot-meteo");
|
|
8375
8378
|
this.meteoInfoMarker = new we.Marker(i).setLngLat([this.point.lng, this.point.lat]).setOffset([0, -200]).addTo(this.map);
|
|
8376
8379
|
}
|
|
8377
|
-
}
|
|
8378
|
-
});
|
|
8380
|
+
});
|
|
8381
|
+
}, 1e3));
|
|
8379
8382
|
},
|
|
8380
8383
|
handleMeteoMore() {
|
|
8381
8384
|
this.point.forecastModel = this.forecastModel, this.$emit("meteoMore", this.point);
|
|
@@ -8465,7 +8468,7 @@ function Ws(t, e, o, i, a, r) {
|
|
|
8465
8468
|
ref: "spotForm",
|
|
8466
8469
|
autocomplete: "off",
|
|
8467
8470
|
class: "form-box",
|
|
8468
|
-
onSubmit: Xa(r.
|
|
8471
|
+
onSubmit: Xa(r.clickForm, ["prevent"])
|
|
8469
8472
|
}, {
|
|
8470
8473
|
default: u(() => [
|
|
8471
8474
|
l("div", Ms, [
|
|
@@ -8726,6 +8729,7 @@ function Ws(t, e, o, i, a, r) {
|
|
|
8726
8729
|
__: [21]
|
|
8727
8730
|
}, 8, ["onClick"]),
|
|
8728
8731
|
h(s, {
|
|
8732
|
+
ref: "submitSpot",
|
|
8729
8733
|
loading: a.loading,
|
|
8730
8734
|
size: "small",
|
|
8731
8735
|
variant: "flat",
|