refactor(types)!: Remove elements prop, change EdgeTypes/NodeTypes prop to string[]
* no more elements prop - v-model instead! * Instead of passing an object map to components just pass in an array of strings as nodeTypes/edgeTypes object * the string name will either be resolved to a dynamic component with :is="type" or a slot with the type-name * update all examples Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
+4
-4
@@ -14,8 +14,8 @@ export interface Edge<T = any> {
|
||||
label?:
|
||||
| string
|
||||
| {
|
||||
component: any
|
||||
props?: any
|
||||
component: Component | DefineComponent
|
||||
props?: Record<string, any>
|
||||
}
|
||||
labelStyle?: any
|
||||
labelShowBg?: boolean
|
||||
@@ -48,8 +48,8 @@ export interface EdgeSmoothStepProps<T = any> extends EdgeProps<T> {
|
||||
borderRadius?: number
|
||||
}
|
||||
|
||||
export type EdgeType = Component<EdgeProps> | DefineComponent<EdgeSmoothStepProps, any, any, any, any, any> | boolean
|
||||
export type EdgeTypes = Record<string, EdgeType>
|
||||
export type EdgeComponent = Component<EdgeProps> | DefineComponent<EdgeSmoothStepProps, any, any, any, any, any> | string
|
||||
export type EdgeTypes = string[]
|
||||
|
||||
export interface EdgePositions {
|
||||
sourceX: number
|
||||
|
||||
Reference in New Issue
Block a user