Browse Source

chore: 🔨 格式化代码

pull/1/head
jiangx 3 years ago
parent
commit
c3865117dc
  1. 21
      src/components/PublicComponent/PublicComponent.vue
  2. 2
      src/composables/useChangeNavMethod.ts

21
src/components/PublicComponent/PublicComponent.vue

@ -1,7 +1,7 @@
<template>
<div></div>
<!-- 地图容器 -->
<!-- <Map @handle-go="handleGO" @handle-detail="handleDetail" /> -->
<Map @handle-go="handleGO" @handle-detail="handleDetail" />
<!-- 退出弹框 -->
<Logout v-model="logout" />
@ -18,8 +18,9 @@ import { storeToRefs } from 'pinia'
import { useStore } from '@/store/root'
import { useRouter, useRoute } from 'vue-router'
import { useHandleScreen } from '@/composables/useHandleScreen'
// import { useInitMap } from '@/composables/useInitMap'
// import Map from '@/components/Map/Map.vue'
import { useInitMap } from '@/composables/useInitMap'
import Map from '@/components/Map/Map.vue'
const Logout = defineAsyncComponent(() => import('@/base/Logout/Logout.vue'))
const AutoBackNotification = defineAsyncComponent(() => import('@/base/AutoBackNotification/AutoBackNotification.vue'))
@ -37,14 +38,14 @@ function handleScreen() {
language.value !== 'zh' && store.SET_LANGUAGE('zh')
router.push('/transfer')
}
// function handleGO() {
// router.push('/nav')
// }
// function handleDetail() {
// store.SET_SHOW_DETAIL(true)
// }
function handleGO() {
router.push('/nav')
}
function handleDetail() {
store.SET_SHOW_DETAIL(true)
}
onMounted(() => {
// !window.Map_QM && useInitMap()
!window.Map_QM && useInitMap()
window.addEventListener('touchend', checkHandleScreen)
})
onBeforeUnmount(() => {

2
src/composables/useChangeNavMethod.ts

@ -2,8 +2,6 @@ import { ref } from 'vue'
import { NavMethods, methodsList } from '@/views/Nav/methodsList'
/**
*
*
* @param {Function} callback
*/
export const useChangeNavMethod = (callback: ({ direction, wayList }: { direction: Direction; wayList: Shop[] }) => void) => {

Loading…
Cancel
Save