Browse Source

refactor: ♻️ 修改容器方式

pull/1/head
jiangx 3 years ago
parent
commit
883869048b
  1. 4
      src/components/Map/Map.vue
  2. 3
      src/composables/useHandleScreen.ts
  3. 2
      src/store/root/getters.ts
  4. 4
      src/types/native.d.ts

4
src/components/Map/Map.vue

@ -51,8 +51,8 @@ function handleDetail() {
/* stylelint-disable-next-line selector-id-pattern */
#mapContainer {
position: relative;
width: 1080px;
height: 1920px;
width: 100vw;
height: 100vh;
}
.map-flex {
display: flex;

3
src/composables/useHandleScreen.ts

@ -94,6 +94,7 @@ export const useHandleScreen = (callback: () => void) => {
if (!nativeMethods.value?.hasProgram()) {
return
}
checkHandleScreen()
}
})
@ -101,7 +102,7 @@ export const useHandleScreen = (callback: () => void) => {
onMounted(() => {
//获取返回首页和进入屏保的具体时间
getBackTime().then(({ data }) => {
const noWallpaper = data[1]
const noWallpaper = data[1] <= 0
totalTime.value = noWallpaper ? [data[0], -1] : data
toIndexTime.value = data[0]
toWallpaperTime.value = noWallpaper ? -1 : data[1]

2
src/store/root/getters.ts

@ -18,7 +18,7 @@ export const getters: GenGetters = {
if (this.device.label === DEVICE.ANDROID) {
return window.android
}
return window.chrome?.webview?.hostObjects?.sync?.csobj
return window?.chrome?.webview?.hostObjects?.csobj
},
//当前设备所处楼栋的楼层列表
currentBuildingFloorsList() {

4
src/types/native.d.ts

@ -47,9 +47,7 @@ export declare global {
chrome: {
webview: {
hostObjects: {
sync: {
csobj: NativeMethods
}
csobj: NativeMethods
}
}
}

Loading…
Cancel
Save