qc-ui-lit 0.2.0 → 0.2.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.
|
@@ -56,7 +56,7 @@ var d = async (e) => {
|
|
|
56
56
|
return this;
|
|
57
57
|
}
|
|
58
58
|
constructor() {
|
|
59
|
-
super(), this.version = "2.0", this.key = "94af010abe03a5b2a2f98e6739a11d0c", this.secret = "031abe8352fc9fa9ac8d14a86a5ec1cf", this.AMapUrl = "https://webapi.amap.com/maps", this.AMapLocaUrl = "https://webapi.amap.com/loca", this.plugins = [], this.viewMode = "2D", this.zoom = 10, this.center = [116.397428, 39.90923], this.zooms = [3, 18], this.animateEnable = !0, this.loading = !0, this.operatingData = { timeoutFlag: null }, this.oncomplete = () => {
|
|
59
|
+
super(), this.version = "2.0", this.key = "94af010abe03a5b2a2f98e6739a11d0c", this.secret = "031abe8352fc9fa9ac8d14a86a5ec1cf", this.AMapUrl = "https://webapi.amap.com/maps", this.AMapLocaUrl = "https://webapi.amap.com/loca", this.plugins = [], this.viewMode = "2D", this.mapStyle = "", this.zoom = 10, this.center = [116.397428, 39.90923], this.zooms = [3, 18], this.animateEnable = !0, this.loading = !0, this.operatingData = { timeoutFlag: null }, this.oncomplete = () => {
|
|
60
60
|
this.dispatchEvent(new CustomEvent("load", { detail: {
|
|
61
61
|
map: this.map,
|
|
62
62
|
AMap: this.AMap
|
|
@@ -98,14 +98,16 @@ var d = async (e) => {
|
|
|
98
98
|
initAMap() {
|
|
99
99
|
if (!this.AMap) return;
|
|
100
100
|
let e = this.querySelector(".a-map-container");
|
|
101
|
-
|
|
101
|
+
if (!e) return;
|
|
102
|
+
let t = {
|
|
102
103
|
resizeEnable: !0,
|
|
103
104
|
viewMode: this.viewMode,
|
|
104
105
|
zoom: this.zoom,
|
|
105
106
|
center: this.center,
|
|
106
107
|
zooms: this.zooms,
|
|
107
108
|
animateEnable: this.animateEnable
|
|
108
|
-
}
|
|
109
|
+
};
|
|
110
|
+
this.mapStyle !== "" && (t.mapStyle = this.mapStyle), this.map = new this.AMap.Map(e, t), this.addEventListeners();
|
|
109
111
|
}
|
|
110
112
|
addEventListeners() {
|
|
111
113
|
this.map && (this.map.on("complete", this.oncomplete), this.map.on("zoomstart", this.onStartOperating), this.map.on("zoomend", this.onEndOperating_timeout), this.map.on("zoomchange", this.onzoomchange), this.map.on("mousedown", this.onStartOperating), this.map.on("mouseup", this.onEndOperating_timeout), this.map.on("touchstart", this.onStartOperating), this.map.on("touchend", this.onEndOperating_timeout));
|
|
@@ -121,6 +123,6 @@ var d = async (e) => {
|
|
|
121
123
|
</section>`;
|
|
122
124
|
}
|
|
123
125
|
};
|
|
124
|
-
a([r({ type: String })], f.prototype, "version", void 0), a([r({ type: String })], f.prototype, "key", void 0), a([r({ type: String })], f.prototype, "secret", void 0), a([r({ type: String })], f.prototype, "AMapUrl", void 0), a([r({ type: String })], f.prototype, "AMapLocaUrl", void 0), a([r({ type: Array })], f.prototype, "plugins", void 0), a([r({ type: String })], f.prototype, "viewMode", void 0), a([r({ type: Number })], f.prototype, "zoom", void 0), a([r({ type: Array })], f.prototype, "center", void 0), a([r({ type: Array })], f.prototype, "zooms", void 0), a([r({ type: Boolean })], f.prototype, "animateEnable", void 0), a([i()], f.prototype, "loading", void 0), f = a([n("a-map")], f);
|
|
126
|
+
a([r({ type: String })], f.prototype, "version", void 0), a([r({ type: String })], f.prototype, "key", void 0), a([r({ type: String })], f.prototype, "secret", void 0), a([r({ type: String })], f.prototype, "AMapUrl", void 0), a([r({ type: String })], f.prototype, "AMapLocaUrl", void 0), a([r({ type: Array })], f.prototype, "plugins", void 0), a([r({ type: String })], f.prototype, "viewMode", void 0), a([r({ type: String })], f.prototype, "mapStyle", void 0), a([r({ type: Number })], f.prototype, "zoom", void 0), a([r({ type: Array })], f.prototype, "center", void 0), a([r({ type: Array })], f.prototype, "zooms", void 0), a([r({ type: Boolean })], f.prototype, "animateEnable", void 0), a([i()], f.prototype, "loading", void 0), f = a([n("a-map")], f);
|
|
125
127
|
//#endregion
|
|
126
128
|
export { d as n, a as r, f as t };
|
package/dist/index.js
CHANGED
|
@@ -3,11 +3,11 @@ import { t as n } from "./components/Loading/Loading.js";
|
|
|
3
3
|
import { t as r } from "./components/ECharts/ECharts.js";
|
|
4
4
|
import { n as i, t as a } from "./components/Resize/Resize.js";
|
|
5
5
|
import { t as o } from "./components/Button/Button.js";
|
|
6
|
-
import "./tools/date/date.js";
|
|
7
|
-
import { t as
|
|
8
|
-
import { n as
|
|
9
|
-
import { a as
|
|
10
|
-
import { a as
|
|
11
|
-
import { n as
|
|
12
|
-
import { t as
|
|
13
|
-
export { t as AMap, r as EChartsElement,
|
|
6
|
+
import { t as s } from "./tools/date/date.js";
|
|
7
|
+
import { t as c } from "./tools/deepClone/deepClone.js";
|
|
8
|
+
import { n as l, t as u } from "./tools/clipboard/clipboard.js";
|
|
9
|
+
import { a as d, i as f, n as p, o as m, r as h, t as g } from "./tools/fullscreen/fullscreen.js";
|
|
10
|
+
import { a as _, i as v, n as y, r as b, t as x } from "./tools/domSelect/domSelect.js";
|
|
11
|
+
import { n as S, t as C } from "./tools/EventBus/EventBus.js";
|
|
12
|
+
import { t as w } from "./tools/changeCoordinate/changeCoordinate.js";
|
|
13
|
+
export { t as AMap, r as EChartsElement, C as EventBus, w as MapCorrect, o as QCButton, s as QCDate, n as QCLoading, a as QCResize, x as clearSelection, S as createEventBus, i as debounce, c as deepClone, g as enterFullscreen, p as exitFullscreen, h as getFullscreenElement, y as getSelectedText, b as hasSelection, f as isFullscreen, e as loadAMap, d as onFullscreenChange, u as readText, v as selectInputText, _ as selectText, m as toggleFullscreen, l as writeText };
|
package/dist/tools/date/date.js
CHANGED