chore(examples): cleanup options api example
This commit is contained in:
@@ -5,6 +5,7 @@ import { VueFlow, isNode } from '@vue-flow/core'
|
|||||||
import { Background } from '@vue-flow/background'
|
import { Background } from '@vue-flow/background'
|
||||||
import { Controls } from '@vue-flow/controls'
|
import { Controls } from '@vue-flow/controls'
|
||||||
import { MiniMap } from '@vue-flow/minimap'
|
import { MiniMap } from '@vue-flow/minimap'
|
||||||
|
import type { UnwrapNestedRefs } from 'vue'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'BasicOptionsAPI',
|
name: 'BasicOptionsAPI',
|
||||||
@@ -45,9 +46,9 @@ export default defineComponent({
|
|||||||
onNodeDragStop(e: FlowEvents['nodeDragStop']) {
|
onNodeDragStop(e: FlowEvents['nodeDragStop']) {
|
||||||
console.log('drag stop', e)
|
console.log('drag stop', e)
|
||||||
},
|
},
|
||||||
onPaneReady(instance: FlowEvents['paneReady']) {
|
onPaneReady(instance: UnwrapNestedRefs<FlowEvents['paneReady']>) {
|
||||||
instance.fitView()
|
instance.fitView()
|
||||||
this.instance = instance as any
|
this.instance = instance
|
||||||
},
|
},
|
||||||
onConnect(params: FlowEvents['connect']) {
|
onConnect(params: FlowEvents['connect']) {
|
||||||
this.instance?.addEdges(params)
|
this.instance?.addEdges(params)
|
||||||
|
|||||||
Reference in New Issue
Block a user