feat: script setup style

* Replace jsx with script setup syntax
* Simplify logic and make it more "composable"
    * Move Zoom functions to useZoom composable
* Update eslint config & tsconfig
This commit is contained in:
Braks
2021-10-20 22:39:54 +02:00
parent fec2ef40da
commit 9307c9066a
28 changed files with 1732 additions and 296 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { ComponentPublicInstance, HTMLAttributes, VNode } from 'vue'
import { DefineComponent, HTMLAttributes, VNode } from 'vue'
import { ArrowHeadType, ElementId, Position } from './types'
import { Connection } from './connection'
@@ -64,6 +64,6 @@ export interface EdgeTextProps extends HTMLAttributes {
labelBgBorderRadius?: number
}
export type EdgeType = ComponentPublicInstance<EdgeSmoothStepProps>
export type EdgeType = DefineComponent<EdgeSmoothStepProps>
export type OnEdgeUpdateFunc<T = any> = (oldEdge: Edge<T>, newConnection: Connection) => void