qc-ui-lit 0.2.1 → 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 };
|