File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * store 状态管理
3+ * @copyright 火星科技 mars3d.cn
4+ * @author 火星吴彦祖 2021-12-30
5+ */
16declare 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配置数组
Original file line number Diff line number Diff line change @@ -12,15 +12,10 @@ import * as mars3d from "mars3d"
1212import { getQueryString , isPc } from " @mars/utils/mars-util"
1313import { $alert , $message } from " @mars/components/mars-ui/index"
1414
15-
1615// Mars3D地图内部使用,如右键菜单弹窗
1716window .globalAlert = $alert
1817window .globalMsg = $message
1918
20-
21- // console.clear()
22-
23- // props选项
2419const props = withDefaults (
2520 defineProps <{
2621 url: string
@@ -113,6 +108,7 @@ const initMars3d = (option: any) => {
113108onBeforeUnmount (() => {
114109 if (map ) {
115110 map .destroy ()
111+ map = null
116112 }
117113})
118114 </script >
You can’t perform that action at this time.
0 commit comments