fix(types): node/edge label type
* add Component to label type
This commit is contained in:
@@ -6,12 +6,7 @@ interface Props {
|
||||
centerX: number
|
||||
centerY: number
|
||||
path: string
|
||||
label?:
|
||||
| string
|
||||
| {
|
||||
props?: any
|
||||
component: any
|
||||
}
|
||||
label?: any
|
||||
style?: CSSProperties
|
||||
labelStyle?: any
|
||||
labelShowBg?: boolean
|
||||
|
||||
@@ -41,6 +41,7 @@ export default {
|
||||
<slot v-bind="props">
|
||||
<component :is="props.label" v-if="typeof props.label !== 'string' && typeof props.label" />
|
||||
<template v-else v-html="props.label">
|
||||
Floo
|
||||
{{ props.label }}
|
||||
</template>
|
||||
</slot>
|
||||
|
||||
Reference in New Issue
Block a user