Skip to content

Commit

Permalink
feat(useTrackAnimation): options 更改为可选
Browse files Browse the repository at this point in the history
  • Loading branch information
yue1123 committed Dec 15, 2022
1 parent 0c87faa commit 009951d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/hooks/useTrackAnimation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,13 @@ const statusMap: Record<number, AnimationStatus> = {
* @param {UseTrackAnimationOptions} options 轨迹动画配置
* @returns { setPath, start, stop}
*/
// FIXME: 默认值处理
export function useTrackAnimation(map: any, options: UseTrackAnimationOptions) {
export function useTrackAnimation(map: any, options?: UseTrackAnimationOptions) {
let instance: BMapGLLib.TrackAnimation
let pl: BMapGL.Polyline | null
let mapComponentInstance: any
let mapInstance: BMapGL.Map
const status = ref<AnimationStatus>('INITIAL')

options = options || {}
watch(
() => map.value,
(n) => {
Expand Down

0 comments on commit 009951d

Please sign in to comment.