Skip to content

Commit a17fe25

Browse files
committed
修改错误
1 parent d0301b1 commit a17fe25

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/common/store/widget.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* store 状态管理
3+
* @copyright 火星科技 mars3d.cn
4+
* @author 火星吴彦祖 2021-12-30
5+
*/
16
declare module "@mars/common/store/widget" {
27
// 为 store state 声明类型
38
export interface DefaultOption {
@@ -27,7 +32,7 @@ declare module "@mars/common/store/widget" {
2732

2833
export const key: InjectionKey<Store<WidgetState>> = Symbol("widget")
2934

30-
export const injectState: (options: StoreOptions<State>) => Store<State>
35+
export const injectState: (options: StoreOptions<WidgetState>) => Store<WidgetState>
3136

3237
export const useWidget: () => {
3338
// 本页面widget配置数组

src/components/mars-work/mars-map.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,10 @@ import * as mars3d from "mars3d"
1212
import { getQueryString, isPc } from "@mars/utils/mars-util"
1313
import { $alert, $message } from "@mars/components/mars-ui/index"
1414
15-
1615
// Mars3D地图内部使用,如右键菜单弹窗
1716
window.globalAlert = $alert
1817
window.globalMsg = $message
1918
20-
21-
// console.clear()
22-
23-
// props选项
2419
const props = withDefaults(
2520
defineProps<{
2621
url: string
@@ -113,6 +108,7 @@ const initMars3d = (option: any) => {
113108
onBeforeUnmount(() => {
114109
if (map) {
115110
map.destroy()
111+
map = null
116112
}
117113
})
118114
</script>

0 commit comments

Comments
 (0)