update(script-setup): Refactor remaining files to script setup style

This commit is contained in:
Braks
2021-10-20 22:39:54 +02:00
parent 9b2f4b7406
commit 560bdc203b
62 changed files with 1683 additions and 1425 deletions
+44
View File
@@ -0,0 +1,44 @@
<script lang="ts" setup>
import { VNode } from 'vue'
import SmoothStepEdge from './SmoothStepEdge.vue'
import { ArrowHeadType, ElementId, Position } from '~/types'
export interface EdgeStepProps<T = any> {
id: ElementId
source: ElementId
target: ElementId
sourceX: number
sourceY: number
targetX: number
targetY: number
selected?: boolean
animated?: boolean
sourcePosition?: Position
targetPosition?: Position
label?: string | VNode
labelStyle?: any
labelShowBg?: boolean
labelBgStyle?: any
labelBgPadding?: [number, number]
labelBgBorderRadius?: number
style?: any
arrowHeadType?: ArrowHeadType
markerEndId?: string
data?: T
sourceHandleId?: ElementId | null
targetHandleId?: ElementId | null
}
const props = withDefaults(defineProps<EdgeStepProps>(), {
selected: false,
sourcePosition: Position.Bottom,
targetPosition: Position.Top,
label: () => '',
labelStyle: () => ({}),
labelShowBg: true,
labelBgStyle: () => ({}),
})
</script>
<template>
<SmoothStepEdge v-bind="props" :border-radius="0" />
</template>