@heycar/heycars-map 0.8.4 → 0.8.6
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.cjs +49 -33
- package/dist/index.js +49 -33
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
9
9
|
const Vue = require("vue");
|
|
10
10
|
const style = "";
|
|
11
11
|
const name = "@heycar/heycars-map";
|
|
12
|
-
const version = "0.8.
|
|
12
|
+
const version = "0.8.6";
|
|
13
13
|
const type = "module";
|
|
14
14
|
const scripts = {
|
|
15
15
|
dev: "vite -c vite.config.dev.ts",
|
|
@@ -2224,7 +2224,6 @@ const useAmapLngLatToVw = (props) => {
|
|
|
2224
2224
|
const [x1, y1] = apiMapLngLatToVw(point1);
|
|
2225
2225
|
const [x2, y2] = apiMapLngLatToVw(point2);
|
|
2226
2226
|
const result = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
2227
|
-
console.log("distance = ", result);
|
|
2228
2227
|
return result;
|
|
2229
2228
|
};
|
|
2230
2229
|
return { apiMapLngLatToVw, apiMapDistanceVwOfPoints };
|
|
@@ -6085,7 +6084,6 @@ const useMapZoom = (props) => {
|
|
|
6085
6084
|
const { supplier } = useMapSupplier();
|
|
6086
6085
|
return supplier === "gmap" ? useGmapZoom(props) : useAmapZoom(props);
|
|
6087
6086
|
};
|
|
6088
|
-
const reverse = (direction) => direction === "left" ? "right" : "left";
|
|
6089
6087
|
const usePointsLabelDirection = (props) => {
|
|
6090
6088
|
const { widthLimit, heightLimit } = props;
|
|
6091
6089
|
const mapRef = useMap();
|
|
@@ -6115,18 +6113,13 @@ const usePointsLabelDirection = (props) => {
|
|
|
6115
6113
|
distanceFn: diffVw
|
|
6116
6114
|
});
|
|
6117
6115
|
const directions = createLabelDirections({
|
|
6118
|
-
sortedPoints:
|
|
6116
|
+
sortedPoints: noOverlapPlaces.map(place2point),
|
|
6119
6117
|
widthLimit,
|
|
6120
6118
|
heightLimit,
|
|
6121
6119
|
distanceFn: diffVw
|
|
6122
6120
|
});
|
|
6123
6121
|
directionsRef.value = directions;
|
|
6124
6122
|
labeledPlacesRef.value = noOverlapPlaces;
|
|
6125
|
-
console.log(
|
|
6126
|
-
"usePointsLabelDirection basePlace, noOverlapPlaces = ",
|
|
6127
|
-
basePlace.displayName,
|
|
6128
|
-
noOverlapPlaces.map((item) => item.displayName)
|
|
6129
|
-
);
|
|
6130
6123
|
}
|
|
6131
6124
|
);
|
|
6132
6125
|
return { directionsRef, labeledPlacesRef, isContainBasePlaceRef };
|
|
@@ -6135,27 +6128,41 @@ function createLabelDirections(props) {
|
|
|
6135
6128
|
const { sortedPoints, widthLimit, heightLimit, distanceFn } = props;
|
|
6136
6129
|
const len = sortedPoints.length;
|
|
6137
6130
|
const result = [];
|
|
6131
|
+
const calcDirection = (isLimited2, isDoubleLimited2, prevDx2, prevDirection2) => {
|
|
6132
|
+
if (isLimited2)
|
|
6133
|
+
return prevDx2 > 0 ? "right" : "left";
|
|
6134
|
+
if (isDoubleLimited2 && prevDx2 < 0 && prevDirection2 === "left")
|
|
6135
|
+
return "left";
|
|
6136
|
+
return "right";
|
|
6137
|
+
};
|
|
6138
6138
|
let prevDirection = "right";
|
|
6139
6139
|
let isLimited = false;
|
|
6140
|
+
let isDoubleLimited = false;
|
|
6141
|
+
let prevDx = Infinity;
|
|
6140
6142
|
for (let idx = 0; idx < len; idx++) {
|
|
6143
|
+
debugger;
|
|
6141
6144
|
if (idx === len - 1) {
|
|
6142
|
-
const direction2 = isLimited
|
|
6145
|
+
const direction2 = calcDirection(isLimited, isDoubleLimited, prevDx, prevDirection);
|
|
6143
6146
|
result.push(direction2);
|
|
6144
6147
|
continue;
|
|
6145
6148
|
}
|
|
6146
6149
|
if (idx === 0) {
|
|
6147
6150
|
const [dx2, dy2] = distanceFn(sortedPoints[idx], sortedPoints[idx + 1]);
|
|
6148
6151
|
isLimited = dx2 > -widthLimit && dx2 < widthLimit && dy2 > -heightLimit && dy2 < heightLimit;
|
|
6152
|
+
isDoubleLimited = dx2 > -widthLimit * 2 && dx2 < widthLimit * 2 && dy2 > -heightLimit && dy2 < heightLimit;
|
|
6149
6153
|
const direction2 = !isLimited ? "right" : dx2 > 0 ? "left" : "right";
|
|
6150
6154
|
result.push(direction2);
|
|
6151
6155
|
prevDirection = direction2;
|
|
6156
|
+
prevDx = dx2;
|
|
6152
6157
|
continue;
|
|
6153
6158
|
}
|
|
6154
6159
|
const [dx, dy] = distanceFn(sortedPoints[idx], sortedPoints[idx + 1]);
|
|
6155
|
-
const direction = isLimited
|
|
6160
|
+
const direction = calcDirection(isLimited, isDoubleLimited, prevDx, prevDirection);
|
|
6156
6161
|
result.push(direction);
|
|
6157
6162
|
prevDirection = direction;
|
|
6163
|
+
prevDx = dx;
|
|
6158
6164
|
isLimited = dx > -widthLimit && dx < widthLimit && dy > -heightLimit && dy < heightLimit;
|
|
6165
|
+
isDoubleLimited = dx > -widthLimit * 2 && dx < widthLimit * 2 && dy > -heightLimit && dy < heightLimit;
|
|
6159
6166
|
}
|
|
6160
6167
|
return result;
|
|
6161
6168
|
}
|
|
@@ -6164,7 +6171,8 @@ function filterNoOverlapPlaces(props) {
|
|
|
6164
6171
|
const measureOverlap = (place1, place2) => {
|
|
6165
6172
|
const [dx, dy] = distanceFn(place2point(place1), place2point(place2));
|
|
6166
6173
|
const isOverlap = dx > -widthLimit && dx < widthLimit && dy > -heightLimit && dy < heightLimit;
|
|
6167
|
-
|
|
6174
|
+
spaceLog(
|
|
6175
|
+
"usePointsLabelDirection",
|
|
6168
6176
|
"p1, p2, dx, dy, isOverlap = ",
|
|
6169
6177
|
place1.displayName,
|
|
6170
6178
|
place2.displayName,
|
|
@@ -6186,7 +6194,7 @@ function filterNoOverlapPlaces(props) {
|
|
|
6186
6194
|
}
|
|
6187
6195
|
return nextPlaces;
|
|
6188
6196
|
}
|
|
6189
|
-
const
|
|
6197
|
+
const findSequenceRelation = (places, measureRelate) => {
|
|
6190
6198
|
let isPrevRelated = false;
|
|
6191
6199
|
let isNextRelated = false;
|
|
6192
6200
|
let isFound = false;
|
|
@@ -6228,6 +6236,14 @@ const findMax = (list, measure) => {
|
|
|
6228
6236
|
}
|
|
6229
6237
|
return list[index];
|
|
6230
6238
|
};
|
|
6239
|
+
const find3ItemFullRelation = (places, measureRelate) => {
|
|
6240
|
+
const [p1, p2, p3] = places;
|
|
6241
|
+
const count = Number(measureRelate(p1, p2)) + Number(measureRelate(p1, p3)) + Number(measureRelate(p2, p3));
|
|
6242
|
+
return count >= 2 ? places : [];
|
|
6243
|
+
};
|
|
6244
|
+
const findRelation = (places, measureRelate) => {
|
|
6245
|
+
return places.length === 3 ? find3ItemFullRelation(places, measureRelate) : findSequenceRelation(places, measureRelate);
|
|
6246
|
+
};
|
|
6231
6247
|
var AnchorType = /* @__PURE__ */ ((AnchorType2) => {
|
|
6232
6248
|
AnchorType2["topLeft"] = "top-left";
|
|
6233
6249
|
AnchorType2["topCenter"] = "top-center";
|
|
@@ -6248,25 +6264,23 @@ var labelLayout = "fhyw8b";
|
|
|
6248
6264
|
var labelStroke = "fhyw8d fhyw8c";
|
|
6249
6265
|
var placeCircleLayout = createRuntimeFn({ defaultClassName: "fhyw80", variantClassNames: { textAlign: { left: "fhyw81", right: "fhyw82" } }, defaultVariants: {}, compoundVariants: [] });
|
|
6250
6266
|
var placeIcon = createRuntimeFn({ defaultClassName: "fhyw88", variantClassNames: { hideIcon: { true: "fhyw89", false: "fhyw8a" } }, defaultVariants: {}, compoundVariants: [] });
|
|
6267
|
+
const DEFAULT_TEXT_ALIGN = "right";
|
|
6251
6268
|
const APlaceCircle = defineSetup(function APlaceCircle2(props, {
|
|
6252
6269
|
emit
|
|
6253
6270
|
}) {
|
|
6254
|
-
const textAlignRef = Vue.computed(() => {
|
|
6255
|
-
var _a;
|
|
6256
|
-
return (_a = props.textAlign) != null ? _a : "right";
|
|
6257
|
-
});
|
|
6258
6271
|
const contentRef = Vue.computed(() => {
|
|
6259
6272
|
const {
|
|
6260
|
-
hideIcon = false
|
|
6273
|
+
hideIcon = false,
|
|
6274
|
+
textAlign = DEFAULT_TEXT_ALIGN
|
|
6261
6275
|
} = props;
|
|
6262
6276
|
return `
|
|
6263
6277
|
<div class="APlaceCircle ${placeCircleLayout({
|
|
6264
|
-
textAlign
|
|
6278
|
+
textAlign
|
|
6265
6279
|
})}">
|
|
6266
6280
|
<img class="${placeIcon({
|
|
6267
6281
|
hideIcon
|
|
6268
6282
|
})} ${amapPlaceIconLayout({
|
|
6269
|
-
textAlign
|
|
6283
|
+
textAlign
|
|
6270
6284
|
})}" src="${imgPlaceCircle}">
|
|
6271
6285
|
<div class="${labelLayout}">
|
|
6272
6286
|
<div class="${labelStroke}">${props.label}</div>
|
|
@@ -6277,23 +6291,27 @@ const APlaceCircle = defineSetup(function APlaceCircle2(props, {
|
|
|
6277
6291
|
});
|
|
6278
6292
|
const contentWithoutLabelRef = Vue.computed(() => {
|
|
6279
6293
|
const {
|
|
6280
|
-
hideIcon = false
|
|
6294
|
+
hideIcon = false,
|
|
6295
|
+
textAlign = DEFAULT_TEXT_ALIGN
|
|
6281
6296
|
} = props;
|
|
6282
6297
|
return `<img class="APlaceCircle ${placeIcon({
|
|
6283
6298
|
hideIcon
|
|
6284
6299
|
})} ${amapPlaceIconLayout({
|
|
6285
|
-
textAlign
|
|
6300
|
+
textAlign
|
|
6286
6301
|
})}" src="${imgPlaceCircle}">`;
|
|
6287
6302
|
});
|
|
6288
6303
|
const handleClick = () => {
|
|
6289
6304
|
emit("click", props.position);
|
|
6290
6305
|
};
|
|
6291
6306
|
return () => {
|
|
6307
|
+
const {
|
|
6308
|
+
textAlign = DEFAULT_TEXT_ALIGN
|
|
6309
|
+
} = props;
|
|
6292
6310
|
return Vue.h(AmapMarker, {
|
|
6293
6311
|
"attrs": {
|
|
6294
6312
|
"position": props.position,
|
|
6295
6313
|
"content": props.label ? contentRef.value : contentWithoutLabelRef.value,
|
|
6296
|
-
"anchor":
|
|
6314
|
+
"anchor": textAlign === "left" ? AnchorType.middleRight : AnchorType.middleLeft,
|
|
6297
6315
|
"zIndex": ZINDEX_PLACE_LAYER
|
|
6298
6316
|
},
|
|
6299
6317
|
"on": {
|
|
@@ -6305,19 +6323,16 @@ const APlaceCircle = defineSetup(function APlaceCircle2(props, {
|
|
|
6305
6323
|
const GPlaceCircle = defineSetup(function GPlaceCircle2(props, {
|
|
6306
6324
|
emit
|
|
6307
6325
|
}) {
|
|
6308
|
-
const textAlignRef = Vue.computed(() => {
|
|
6309
|
-
var _a;
|
|
6310
|
-
return (_a = props.textAlign) != null ? _a : "right";
|
|
6311
|
-
});
|
|
6312
6326
|
const contentRef = Vue.computed(() => {
|
|
6313
6327
|
const {
|
|
6314
|
-
hideIcon = false
|
|
6328
|
+
hideIcon = false,
|
|
6329
|
+
textAlign = DEFAULT_TEXT_ALIGN
|
|
6315
6330
|
} = props;
|
|
6316
6331
|
return createDom("div", {
|
|
6317
6332
|
class: `GPlaceCircle ${placeCircleLayout({
|
|
6318
|
-
textAlign
|
|
6333
|
+
textAlign
|
|
6319
6334
|
})} ${gmapPlaceIconLayout({
|
|
6320
|
-
textAlign
|
|
6335
|
+
textAlign
|
|
6321
6336
|
})}`
|
|
6322
6337
|
}, `
|
|
6323
6338
|
<img class="${placeIcon({
|
|
@@ -6331,13 +6346,14 @@ const GPlaceCircle = defineSetup(function GPlaceCircle2(props, {
|
|
|
6331
6346
|
});
|
|
6332
6347
|
const contentWithoutLabelRef = Vue.computed(() => {
|
|
6333
6348
|
const {
|
|
6334
|
-
hideIcon = false
|
|
6349
|
+
hideIcon = false,
|
|
6350
|
+
textAlign = DEFAULT_TEXT_ALIGN
|
|
6335
6351
|
} = props;
|
|
6336
6352
|
return createDom("img", {
|
|
6337
6353
|
class: `GPlaceCircle ${placeIcon({
|
|
6338
6354
|
hideIcon
|
|
6339
6355
|
})} ${gmapPlaceIconLayout({
|
|
6340
|
-
textAlign
|
|
6356
|
+
textAlign
|
|
6341
6357
|
})}`,
|
|
6342
6358
|
src: imgPlaceCircle
|
|
6343
6359
|
});
|
|
@@ -6386,7 +6402,7 @@ const PickupPoints = defineSetup(function PickupPoints2(props, {
|
|
|
6386
6402
|
basePlace: Vue.toRef(props, "basePlace"),
|
|
6387
6403
|
places: Vue.toRef(props, "places"),
|
|
6388
6404
|
heightLimit: 9,
|
|
6389
|
-
widthLimit:
|
|
6405
|
+
widthLimit: 34
|
|
6390
6406
|
}));
|
|
6391
6407
|
return () => {
|
|
6392
6408
|
const {
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7
7
|
import Vue, { defineComponent, h, computed, inject, provide, watch, onMounted, onUnmounted, watchPostEffect, shallowRef, ref, watchEffect, reactive, toRefs, toRef } from "vue";
|
|
8
8
|
const style = "";
|
|
9
9
|
const name = "@heycar/heycars-map";
|
|
10
|
-
const version = "0.8.
|
|
10
|
+
const version = "0.8.6";
|
|
11
11
|
const type = "module";
|
|
12
12
|
const scripts = {
|
|
13
13
|
dev: "vite -c vite.config.dev.ts",
|
|
@@ -2222,7 +2222,6 @@ const useAmapLngLatToVw = (props) => {
|
|
|
2222
2222
|
const [x1, y1] = apiMapLngLatToVw(point1);
|
|
2223
2223
|
const [x2, y2] = apiMapLngLatToVw(point2);
|
|
2224
2224
|
const result = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
2225
|
-
console.log("distance = ", result);
|
|
2226
2225
|
return result;
|
|
2227
2226
|
};
|
|
2228
2227
|
return { apiMapLngLatToVw, apiMapDistanceVwOfPoints };
|
|
@@ -6083,7 +6082,6 @@ const useMapZoom = (props) => {
|
|
|
6083
6082
|
const { supplier } = useMapSupplier();
|
|
6084
6083
|
return supplier === "gmap" ? useGmapZoom(props) : useAmapZoom(props);
|
|
6085
6084
|
};
|
|
6086
|
-
const reverse = (direction) => direction === "left" ? "right" : "left";
|
|
6087
6085
|
const usePointsLabelDirection = (props) => {
|
|
6088
6086
|
const { widthLimit, heightLimit } = props;
|
|
6089
6087
|
const mapRef = useMap();
|
|
@@ -6113,18 +6111,13 @@ const usePointsLabelDirection = (props) => {
|
|
|
6113
6111
|
distanceFn: diffVw
|
|
6114
6112
|
});
|
|
6115
6113
|
const directions = createLabelDirections({
|
|
6116
|
-
sortedPoints:
|
|
6114
|
+
sortedPoints: noOverlapPlaces.map(place2point),
|
|
6117
6115
|
widthLimit,
|
|
6118
6116
|
heightLimit,
|
|
6119
6117
|
distanceFn: diffVw
|
|
6120
6118
|
});
|
|
6121
6119
|
directionsRef.value = directions;
|
|
6122
6120
|
labeledPlacesRef.value = noOverlapPlaces;
|
|
6123
|
-
console.log(
|
|
6124
|
-
"usePointsLabelDirection basePlace, noOverlapPlaces = ",
|
|
6125
|
-
basePlace.displayName,
|
|
6126
|
-
noOverlapPlaces.map((item) => item.displayName)
|
|
6127
|
-
);
|
|
6128
6121
|
}
|
|
6129
6122
|
);
|
|
6130
6123
|
return { directionsRef, labeledPlacesRef, isContainBasePlaceRef };
|
|
@@ -6133,27 +6126,41 @@ function createLabelDirections(props) {
|
|
|
6133
6126
|
const { sortedPoints, widthLimit, heightLimit, distanceFn } = props;
|
|
6134
6127
|
const len = sortedPoints.length;
|
|
6135
6128
|
const result = [];
|
|
6129
|
+
const calcDirection = (isLimited2, isDoubleLimited2, prevDx2, prevDirection2) => {
|
|
6130
|
+
if (isLimited2)
|
|
6131
|
+
return prevDx2 > 0 ? "right" : "left";
|
|
6132
|
+
if (isDoubleLimited2 && prevDx2 < 0 && prevDirection2 === "left")
|
|
6133
|
+
return "left";
|
|
6134
|
+
return "right";
|
|
6135
|
+
};
|
|
6136
6136
|
let prevDirection = "right";
|
|
6137
6137
|
let isLimited = false;
|
|
6138
|
+
let isDoubleLimited = false;
|
|
6139
|
+
let prevDx = Infinity;
|
|
6138
6140
|
for (let idx = 0; idx < len; idx++) {
|
|
6141
|
+
debugger;
|
|
6139
6142
|
if (idx === len - 1) {
|
|
6140
|
-
const direction2 = isLimited
|
|
6143
|
+
const direction2 = calcDirection(isLimited, isDoubleLimited, prevDx, prevDirection);
|
|
6141
6144
|
result.push(direction2);
|
|
6142
6145
|
continue;
|
|
6143
6146
|
}
|
|
6144
6147
|
if (idx === 0) {
|
|
6145
6148
|
const [dx2, dy2] = distanceFn(sortedPoints[idx], sortedPoints[idx + 1]);
|
|
6146
6149
|
isLimited = dx2 > -widthLimit && dx2 < widthLimit && dy2 > -heightLimit && dy2 < heightLimit;
|
|
6150
|
+
isDoubleLimited = dx2 > -widthLimit * 2 && dx2 < widthLimit * 2 && dy2 > -heightLimit && dy2 < heightLimit;
|
|
6147
6151
|
const direction2 = !isLimited ? "right" : dx2 > 0 ? "left" : "right";
|
|
6148
6152
|
result.push(direction2);
|
|
6149
6153
|
prevDirection = direction2;
|
|
6154
|
+
prevDx = dx2;
|
|
6150
6155
|
continue;
|
|
6151
6156
|
}
|
|
6152
6157
|
const [dx, dy] = distanceFn(sortedPoints[idx], sortedPoints[idx + 1]);
|
|
6153
|
-
const direction = isLimited
|
|
6158
|
+
const direction = calcDirection(isLimited, isDoubleLimited, prevDx, prevDirection);
|
|
6154
6159
|
result.push(direction);
|
|
6155
6160
|
prevDirection = direction;
|
|
6161
|
+
prevDx = dx;
|
|
6156
6162
|
isLimited = dx > -widthLimit && dx < widthLimit && dy > -heightLimit && dy < heightLimit;
|
|
6163
|
+
isDoubleLimited = dx > -widthLimit * 2 && dx < widthLimit * 2 && dy > -heightLimit && dy < heightLimit;
|
|
6157
6164
|
}
|
|
6158
6165
|
return result;
|
|
6159
6166
|
}
|
|
@@ -6162,7 +6169,8 @@ function filterNoOverlapPlaces(props) {
|
|
|
6162
6169
|
const measureOverlap = (place1, place2) => {
|
|
6163
6170
|
const [dx, dy] = distanceFn(place2point(place1), place2point(place2));
|
|
6164
6171
|
const isOverlap = dx > -widthLimit && dx < widthLimit && dy > -heightLimit && dy < heightLimit;
|
|
6165
|
-
|
|
6172
|
+
spaceLog(
|
|
6173
|
+
"usePointsLabelDirection",
|
|
6166
6174
|
"p1, p2, dx, dy, isOverlap = ",
|
|
6167
6175
|
place1.displayName,
|
|
6168
6176
|
place2.displayName,
|
|
@@ -6184,7 +6192,7 @@ function filterNoOverlapPlaces(props) {
|
|
|
6184
6192
|
}
|
|
6185
6193
|
return nextPlaces;
|
|
6186
6194
|
}
|
|
6187
|
-
const
|
|
6195
|
+
const findSequenceRelation = (places, measureRelate) => {
|
|
6188
6196
|
let isPrevRelated = false;
|
|
6189
6197
|
let isNextRelated = false;
|
|
6190
6198
|
let isFound = false;
|
|
@@ -6226,6 +6234,14 @@ const findMax = (list, measure) => {
|
|
|
6226
6234
|
}
|
|
6227
6235
|
return list[index];
|
|
6228
6236
|
};
|
|
6237
|
+
const find3ItemFullRelation = (places, measureRelate) => {
|
|
6238
|
+
const [p1, p2, p3] = places;
|
|
6239
|
+
const count = Number(measureRelate(p1, p2)) + Number(measureRelate(p1, p3)) + Number(measureRelate(p2, p3));
|
|
6240
|
+
return count >= 2 ? places : [];
|
|
6241
|
+
};
|
|
6242
|
+
const findRelation = (places, measureRelate) => {
|
|
6243
|
+
return places.length === 3 ? find3ItemFullRelation(places, measureRelate) : findSequenceRelation(places, measureRelate);
|
|
6244
|
+
};
|
|
6229
6245
|
var AnchorType = /* @__PURE__ */ ((AnchorType2) => {
|
|
6230
6246
|
AnchorType2["topLeft"] = "top-left";
|
|
6231
6247
|
AnchorType2["topCenter"] = "top-center";
|
|
@@ -6246,25 +6262,23 @@ var labelLayout = "fhyw8b";
|
|
|
6246
6262
|
var labelStroke = "fhyw8d fhyw8c";
|
|
6247
6263
|
var placeCircleLayout = createRuntimeFn({ defaultClassName: "fhyw80", variantClassNames: { textAlign: { left: "fhyw81", right: "fhyw82" } }, defaultVariants: {}, compoundVariants: [] });
|
|
6248
6264
|
var placeIcon = createRuntimeFn({ defaultClassName: "fhyw88", variantClassNames: { hideIcon: { true: "fhyw89", false: "fhyw8a" } }, defaultVariants: {}, compoundVariants: [] });
|
|
6265
|
+
const DEFAULT_TEXT_ALIGN = "right";
|
|
6249
6266
|
const APlaceCircle = defineSetup(function APlaceCircle2(props, {
|
|
6250
6267
|
emit
|
|
6251
6268
|
}) {
|
|
6252
|
-
const textAlignRef = computed(() => {
|
|
6253
|
-
var _a;
|
|
6254
|
-
return (_a = props.textAlign) != null ? _a : "right";
|
|
6255
|
-
});
|
|
6256
6269
|
const contentRef = computed(() => {
|
|
6257
6270
|
const {
|
|
6258
|
-
hideIcon = false
|
|
6271
|
+
hideIcon = false,
|
|
6272
|
+
textAlign = DEFAULT_TEXT_ALIGN
|
|
6259
6273
|
} = props;
|
|
6260
6274
|
return `
|
|
6261
6275
|
<div class="APlaceCircle ${placeCircleLayout({
|
|
6262
|
-
textAlign
|
|
6276
|
+
textAlign
|
|
6263
6277
|
})}">
|
|
6264
6278
|
<img class="${placeIcon({
|
|
6265
6279
|
hideIcon
|
|
6266
6280
|
})} ${amapPlaceIconLayout({
|
|
6267
|
-
textAlign
|
|
6281
|
+
textAlign
|
|
6268
6282
|
})}" src="${imgPlaceCircle}">
|
|
6269
6283
|
<div class="${labelLayout}">
|
|
6270
6284
|
<div class="${labelStroke}">${props.label}</div>
|
|
@@ -6275,23 +6289,27 @@ const APlaceCircle = defineSetup(function APlaceCircle2(props, {
|
|
|
6275
6289
|
});
|
|
6276
6290
|
const contentWithoutLabelRef = computed(() => {
|
|
6277
6291
|
const {
|
|
6278
|
-
hideIcon = false
|
|
6292
|
+
hideIcon = false,
|
|
6293
|
+
textAlign = DEFAULT_TEXT_ALIGN
|
|
6279
6294
|
} = props;
|
|
6280
6295
|
return `<img class="APlaceCircle ${placeIcon({
|
|
6281
6296
|
hideIcon
|
|
6282
6297
|
})} ${amapPlaceIconLayout({
|
|
6283
|
-
textAlign
|
|
6298
|
+
textAlign
|
|
6284
6299
|
})}" src="${imgPlaceCircle}">`;
|
|
6285
6300
|
});
|
|
6286
6301
|
const handleClick = () => {
|
|
6287
6302
|
emit("click", props.position);
|
|
6288
6303
|
};
|
|
6289
6304
|
return () => {
|
|
6305
|
+
const {
|
|
6306
|
+
textAlign = DEFAULT_TEXT_ALIGN
|
|
6307
|
+
} = props;
|
|
6290
6308
|
return h(AmapMarker, {
|
|
6291
6309
|
"attrs": {
|
|
6292
6310
|
"position": props.position,
|
|
6293
6311
|
"content": props.label ? contentRef.value : contentWithoutLabelRef.value,
|
|
6294
|
-
"anchor":
|
|
6312
|
+
"anchor": textAlign === "left" ? AnchorType.middleRight : AnchorType.middleLeft,
|
|
6295
6313
|
"zIndex": ZINDEX_PLACE_LAYER
|
|
6296
6314
|
},
|
|
6297
6315
|
"on": {
|
|
@@ -6303,19 +6321,16 @@ const APlaceCircle = defineSetup(function APlaceCircle2(props, {
|
|
|
6303
6321
|
const GPlaceCircle = defineSetup(function GPlaceCircle2(props, {
|
|
6304
6322
|
emit
|
|
6305
6323
|
}) {
|
|
6306
|
-
const textAlignRef = computed(() => {
|
|
6307
|
-
var _a;
|
|
6308
|
-
return (_a = props.textAlign) != null ? _a : "right";
|
|
6309
|
-
});
|
|
6310
6324
|
const contentRef = computed(() => {
|
|
6311
6325
|
const {
|
|
6312
|
-
hideIcon = false
|
|
6326
|
+
hideIcon = false,
|
|
6327
|
+
textAlign = DEFAULT_TEXT_ALIGN
|
|
6313
6328
|
} = props;
|
|
6314
6329
|
return createDom("div", {
|
|
6315
6330
|
class: `GPlaceCircle ${placeCircleLayout({
|
|
6316
|
-
textAlign
|
|
6331
|
+
textAlign
|
|
6317
6332
|
})} ${gmapPlaceIconLayout({
|
|
6318
|
-
textAlign
|
|
6333
|
+
textAlign
|
|
6319
6334
|
})}`
|
|
6320
6335
|
}, `
|
|
6321
6336
|
<img class="${placeIcon({
|
|
@@ -6329,13 +6344,14 @@ const GPlaceCircle = defineSetup(function GPlaceCircle2(props, {
|
|
|
6329
6344
|
});
|
|
6330
6345
|
const contentWithoutLabelRef = computed(() => {
|
|
6331
6346
|
const {
|
|
6332
|
-
hideIcon = false
|
|
6347
|
+
hideIcon = false,
|
|
6348
|
+
textAlign = DEFAULT_TEXT_ALIGN
|
|
6333
6349
|
} = props;
|
|
6334
6350
|
return createDom("img", {
|
|
6335
6351
|
class: `GPlaceCircle ${placeIcon({
|
|
6336
6352
|
hideIcon
|
|
6337
6353
|
})} ${gmapPlaceIconLayout({
|
|
6338
|
-
textAlign
|
|
6354
|
+
textAlign
|
|
6339
6355
|
})}`,
|
|
6340
6356
|
src: imgPlaceCircle
|
|
6341
6357
|
});
|
|
@@ -6384,7 +6400,7 @@ const PickupPoints = defineSetup(function PickupPoints2(props, {
|
|
|
6384
6400
|
basePlace: toRef(props, "basePlace"),
|
|
6385
6401
|
places: toRef(props, "places"),
|
|
6386
6402
|
heightLimit: 9,
|
|
6387
|
-
widthLimit:
|
|
6403
|
+
widthLimit: 34
|
|
6388
6404
|
}));
|
|
6389
6405
|
return () => {
|
|
6390
6406
|
const {
|