|
|
|
@ -1,9 +1,17 @@ |
|
|
|
import { onBeforeUnmount, ref } from 'vue' |
|
|
|
import type { Ref } from 'vue' |
|
|
|
|
|
|
|
type DirectionInfoType = { |
|
|
|
text: string //方向信息
|
|
|
|
textEn: string |
|
|
|
icon: string //大的方向箭头
|
|
|
|
thumbIcon: string //经过店铺时的那个小箭头
|
|
|
|
class: string //动画样式
|
|
|
|
} |
|
|
|
|
|
|
|
export const useStartNavi = (shop: Ref<Shop>, device: Ref<Device>, setPauseRefFn?: () => void) => { |
|
|
|
const pathShopList = ref<Shop[]>([]) |
|
|
|
const directionInfo = ref({}) |
|
|
|
const directionInfo = ref<DirectionInfoType>({} as DirectionInfoType) |
|
|
|
|
|
|
|
startNavi(shop.value) |
|
|
|
|
|
|
|
@ -34,7 +42,7 @@ export const useStartNavi = (shop: Ref<Shop>, device: Ref<Device>, setPauseRefFn |
|
|
|
text: text, //方向信息
|
|
|
|
textEn: 'Move forward', |
|
|
|
icon: require('@/assets/images/nav/big_up.svg'), //大的方向箭头
|
|
|
|
passIcon: require('@/assets/images/nav/up_thumb.svg'), //经过店铺时的那个小箭头
|
|
|
|
thumbIcon: require('@/assets/images/nav/up_thumb.svg'), //经过店铺时的那个小箭头
|
|
|
|
class: 'animate__fadeInUp up' //动画样式
|
|
|
|
} |
|
|
|
|
|
|
|
@ -43,7 +51,7 @@ export const useStartNavi = (shop: Ref<Shop>, device: Ref<Device>, setPauseRefFn |
|
|
|
text: text, |
|
|
|
textEn: 'Departure backwards', |
|
|
|
icon: require('@/assets/images/nav/big_down.svg'), |
|
|
|
passIcon: require('@/assets/images/nav/down_thumb.svg'), |
|
|
|
thumbIcon: require('@/assets/images/nav/down_thumb.svg'), |
|
|
|
class: 'animate__fadeInDown down' |
|
|
|
} |
|
|
|
|
|
|
|
@ -52,7 +60,7 @@ export const useStartNavi = (shop: Ref<Shop>, device: Ref<Device>, setPauseRefFn |
|
|
|
text: text, |
|
|
|
textEn: 'Departure to the left', |
|
|
|
icon: require('@/assets/images/nav/big_left.svg'), |
|
|
|
passIcon: require('@/assets/images/nav/left_thumb.svg'), |
|
|
|
thumbIcon: require('@/assets/images/nav/left_thumb.svg'), |
|
|
|
class: 'animate__fadeInRight left' |
|
|
|
} |
|
|
|
|
|
|
|
@ -61,7 +69,7 @@ export const useStartNavi = (shop: Ref<Shop>, device: Ref<Device>, setPauseRefFn |
|
|
|
text: text, |
|
|
|
textEn: 'Departure to the right', |
|
|
|
icon: require('@/assets/images/nav/big_right.svg'), |
|
|
|
passIcon: require('@/assets/images/nav/right_thumb.svg'), |
|
|
|
thumbIcon: require('@/assets/images/nav/right_thumb.svg'), |
|
|
|
class: 'animate__fadeInLeft right' |
|
|
|
} |
|
|
|
default: |
|
|
|
@ -70,7 +78,7 @@ export const useStartNavi = (shop: Ref<Shop>, device: Ref<Device>, setPauseRefFn |
|
|
|
textEn: '', |
|
|
|
icon: '', |
|
|
|
class: '', |
|
|
|
passIcon: '' |
|
|
|
thumbIcon: '' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|