Skip to content

Commit

Permalink
refactor(vue-cesium): ♻️ improve types
Browse files Browse the repository at this point in the history
  • Loading branch information
zouyaoji committed Mar 27, 2024
1 parent b805ab3 commit ec2235a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/components/viewer/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/*
* @Author: zouyaoji@https://github.com/zouyaoji
* @Date: 2021-09-16 09:28:13
* @LastEditTime: 2022-08-12 11:40:04
* @LastEditors: zouyaoji
* @LastEditTime: 2024-03-17 18:08:40
* @LastEditors: zouyaoji 370681295@qq.com
* @Description:
* @FilePath: \10_vue-cesium\packages\components\viewer\src\index.ts
* @FilePath: \vue-cesium\packages\components\viewer\src\index.ts
*/
import { defineComponent, provide, getCurrentInstance, h, createCommentVNode, withDirectives, computed } from 'vue'
import type { VNode } from 'vue'
import useViewer, { viewerProps } from './useViewer'
import type { VcViewerProps } from './useViewer'
import type {
VcCamera,
VcComponentInternalInstance,
VcDatasource,
VcTerrainProvider,
Expand Down Expand Up @@ -86,7 +87,8 @@ const emits = {
wheel: (delta: number) => true,
imageryLayersUpdatedEvent: () => true,
tileLoadProgressEvent: (length: number) => true,
touchEnd: evt => true
touchEnd: evt => true,
'update:camera': (evt: VcCamera) => true
}
export default defineComponent({
name: 'VcViewer',
Expand Down
4 changes: 4 additions & 0 deletions packages/components/viewer/src/useViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1851,6 +1851,10 @@ export interface VcViewerProps {
*/
onTileLoadProgressEvent?: (length: number) => void
onTouchEnd?: (evt: any) => void
/**
* Triggers when the camera has changed by percentageChanged.
*/
'onUpdate:camera'?: (evt: VcCamera) => void
}

export interface VcViewerSlots {
Expand Down

0 comments on commit ec2235a

Please sign in to comment.