tg-map-vue3 3.6.3 → 3.6.4
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/CHANGELOG.md +4 -0
- package/dist/src/components/overlays/TgInfoBox.vue.d.ts +5 -5
- package/dist/src/components/overlays/TgInfoWindow.vue.d.ts +5 -5
- package/dist/src/components/overlays/TgLabel.vue.d.ts +3 -3
- package/dist/src/utils/arrays.d.ts +0 -2
- package/dist/src/utils/mapped-types.d.ts +10 -0
- package/dist/tg-map.js +764 -754
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +6 -6
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- feat: 添加[MapUrls], 支持打开地图网页
|
|
6
6
|
- fix: 百度地图的覆盖物([BaiduShape])不能隐藏填充/线条颜色的问题
|
|
7
|
+
- perf: [TgLabel]/[TgInfoBox]/[TgInfoWindow]和[TgMarker]不必紧密相邻, 可以放其他组件
|
|
7
8
|
- ***BREAKING CHANGE***: `placeService` -> `placesService`
|
|
8
9
|
|
|
9
10
|
## 3.5.x
|
|
@@ -47,6 +48,9 @@
|
|
|
47
48
|
[TgRectangle]: src/components/overlays/TgRectangle.vue
|
|
48
49
|
[TgPolygon]: src/components/overlays/TgPolygon.vue
|
|
49
50
|
[TgPolyline]: src/components/overlays/TgPolyline.vue
|
|
51
|
+
[TgMarker]: src/components/overlays/TgMarker.vue
|
|
52
|
+
[TgInfoBox]: src/components/overlays/TgInfoBox.vue
|
|
53
|
+
[TgInfoWindow]: src/components/overlays/TgInfoWindow.vue
|
|
50
54
|
[Icon]: src/map/map/overlay/icon.ts#L18 "图标"
|
|
51
55
|
[SymbolIcon]: src/map/map/overlay/icon.ts#L55 "Svg图标"
|
|
52
56
|
[PlacesService]: src/map/map/extra/places-service.ts "位置服务"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type EventEmits } from '../../utils/vue-utils';
|
|
2
1
|
import { LatLng } from '../../map/lat-lng';
|
|
3
|
-
import {
|
|
4
|
-
import type { InfoBoxOverlay, InfoBoxOptions } from '../../map/map/overlay/info-box';
|
|
2
|
+
import type { InfoBoxOptions, InfoBoxOverlay } from '../../map/map/overlay/info-box';
|
|
5
3
|
import type { MarkerOverlay } from '../../map/map/overlay/marker';
|
|
4
|
+
import { type EventEmits } from '../../utils/vue-utils';
|
|
5
|
+
import { type TgMarkerPublicInstance } from './TgMarker.vue';
|
|
6
6
|
type TgInfoBoxEmits = {
|
|
7
7
|
'update:show': boolean;
|
|
8
8
|
};
|
|
@@ -26,7 +26,7 @@ declare const TgInfoBox: import("vue").DefineComponent<{
|
|
|
26
26
|
zIndex: {
|
|
27
27
|
type: import("vue").PropType<number>;
|
|
28
28
|
};
|
|
29
|
-
'onUpdate:show': import("vue").Prop<import("
|
|
29
|
+
'onUpdate:show': import("vue").Prop<import("..").EventCallback<boolean>>;
|
|
30
30
|
}, {
|
|
31
31
|
attrs: import("vue").ComputedRef<{
|
|
32
32
|
binds: Record<string, unknown>;
|
|
@@ -62,7 +62,7 @@ declare const TgInfoBox: import("vue").DefineComponent<{
|
|
|
62
62
|
zIndex: {
|
|
63
63
|
type: import("vue").PropType<number>;
|
|
64
64
|
};
|
|
65
|
-
'onUpdate:show': import("vue").Prop<import("
|
|
65
|
+
'onUpdate:show': import("vue").Prop<import("..").EventCallback<boolean>>;
|
|
66
66
|
}>> & {
|
|
67
67
|
"onUpdate:show"?: ((event: boolean) => any) | undefined;
|
|
68
68
|
}, {}, {}>;
|
|
@@ -22,7 +22,7 @@ declare const TgInfoWindow: import("vue").DefineComponent<{
|
|
|
22
22
|
disableAutoPan: {
|
|
23
23
|
type: import("vue").PropType<boolean>;
|
|
24
24
|
};
|
|
25
|
-
'onUpdate:show': import("vue").Prop<import("
|
|
25
|
+
'onUpdate:show': import("vue").Prop<import("..").EventCallback<boolean>>;
|
|
26
26
|
}, {
|
|
27
27
|
attrs: import("vue").ComputedRef<{
|
|
28
28
|
binds: Record<string, unknown>;
|
|
@@ -53,12 +53,12 @@ declare const TgInfoWindow: import("vue").DefineComponent<{
|
|
|
53
53
|
disableAutoPan: {
|
|
54
54
|
type: import("vue").PropType<boolean>;
|
|
55
55
|
};
|
|
56
|
-
'onUpdate:show': import("vue").Prop<import("
|
|
56
|
+
'onUpdate:show': import("vue").Prop<import("..").EventCallback<boolean>>;
|
|
57
57
|
}>> & {
|
|
58
58
|
"onUpdate:show"?: ((event: boolean) => any) | undefined;
|
|
59
|
-
onCloseclick?: ((event: import("
|
|
60
|
-
onOpen?: ((event: import("
|
|
61
|
-
onClose?: ((event: import("
|
|
59
|
+
onCloseclick?: ((event: import("..").Tg.Event) => any) | undefined;
|
|
60
|
+
onOpen?: ((event: import("..").Tg.Event) => any) | undefined;
|
|
61
|
+
onClose?: ((event: import("..").Tg.Event) => any) | undefined;
|
|
62
62
|
}, {}, {}>;
|
|
63
63
|
type TgInfoWindow = InstanceType<typeof TgInfoWindow>;
|
|
64
64
|
export default TgInfoWindow;
|
|
@@ -15,7 +15,7 @@ declare const TgLabel: import("vue").DefineComponent<{
|
|
|
15
15
|
type: import("vue").PropType<number>;
|
|
16
16
|
};
|
|
17
17
|
mapPane: {
|
|
18
|
-
type: import("vue").PropType<import("
|
|
18
|
+
type: import("vue").PropType<import("..").StringEnumValue<typeof MapPane>>;
|
|
19
19
|
};
|
|
20
20
|
}, {
|
|
21
21
|
attrs: import("vue").ComputedRef<{
|
|
@@ -42,10 +42,10 @@ declare const TgLabel: import("vue").DefineComponent<{
|
|
|
42
42
|
type: import("vue").PropType<number>;
|
|
43
43
|
};
|
|
44
44
|
mapPane: {
|
|
45
|
-
type: import("vue").PropType<import("
|
|
45
|
+
type: import("vue").PropType<import("..").StringEnumValue<typeof MapPane>>;
|
|
46
46
|
};
|
|
47
47
|
}>> & {
|
|
48
|
-
onClick?: ((event: import("
|
|
48
|
+
onClick?: ((event: import("..").Tg.Event) => any) | undefined;
|
|
49
49
|
}, {}, {}>;
|
|
50
50
|
type TgLabel = InstanceType<typeof TgLabel>;
|
|
51
51
|
export default TgLabel;
|
|
@@ -19,8 +19,6 @@ export declare namespace Arrays {
|
|
|
19
19
|
* @see https://stackoverflow.com/questions/56006111/is-it-possible-to-define-a-non-empty-array-type-in-typescript
|
|
20
20
|
*/
|
|
21
21
|
function isNotEmpty<T>(arr: T[]): arr is [T, ...T[]];
|
|
22
|
-
/** @see isNotEmpty */
|
|
23
|
-
function isNullOrEmpty<T>(arr: T[] | null | undefined): arr is [] | null | undefined;
|
|
24
22
|
}
|
|
25
23
|
export declare namespace MVCArrays {
|
|
26
24
|
function indexOf<T>(arr: google.maps.MVCArray<T>, item: T): number;
|
|
@@ -32,8 +32,18 @@ export declare function typed<T>(t: T): T;
|
|
|
32
32
|
export declare function isInstanceOf<T>(obj: any, constructor: Constructor<T>): obj is T;
|
|
33
33
|
/** @see isInstanceOf */
|
|
34
34
|
export declare function safeAs<T>(obj: any, constructor: Constructor<T>): T | undefined;
|
|
35
|
+
/** 判断{@link instance}是否是{@link component}的实例 */
|
|
36
|
+
export declare function isComponentByType<C extends Component & AbstractConstructor>(instance: ComponentPublicInstance | null, component: C): instance is InstanceType<C>;
|
|
35
37
|
/** 安全转换组件类型, 若不能转换会返回`undefined` */
|
|
36
38
|
export declare function safeAsComponent<C extends Component & AbstractConstructor>(instance: ComponentPublicInstance | null, component: C): InstanceType<C> | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* 查找[startInstance, endComponent)之间的第一个类型为{@link component}的父组件
|
|
41
|
+
* @param component 查找的组件
|
|
42
|
+
* @param startInstance 查找的开始实例, 包含
|
|
43
|
+
* @param endComponent 查找的终止组件, 不包含
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
export declare function findAncestorComponentByType<C extends Component & AbstractConstructor>(component: C, startInstance: ComponentPublicInstance | null, endComponent?: Component & AbstractConstructor): InstanceType<C> | undefined;
|
|
37
47
|
/** {@link NonNullable} 的反义词 */
|
|
38
48
|
export type Nullable<T> = T | null | undefined;
|
|
39
49
|
/** T的所有value的联合类型 */
|