flow-topology-vue3
Version:
flow-topology-vue3是一个用于创建流拓扑图的Vue 3组件库。它提供了一组可重用的组件和实用程序,以帮助您构建交互式的、具有视觉吸引力的流程图、流程图或表示数据流的任何其他类型的图
45 lines (39 loc) • 971 B
TypeScript
// global.d.ts
declare global {
declare interface BranchVO {
id: string | number
label: string
to?: Array<number | string>
}
declare interface IPosition {
x: number
y: number
}
declare interface NodeVO {
id: string | number
position: IPosition
canDrag?: boolean
title?: string
content?: string
width?: number
branches: Array<BranchVO>
[prop: string]: any
}
declare interface LineVO {
fromNodeId: string | number
fromBranchId: string | number
toNodeId: string | number
}
declare interface TempConnection {
active: boolean
fromNodeId: null | string | number
fromBranchId: null | string | number
startX: number
startY: number
endX: number
endY: number
toNodeId: null | string | number
}
}
// 这样这些类型就可以在整个项目中使用了
export {} // 这一行很重要,确保文件被视为模块