* add vue-tsc to emit d.ts files from vue components * use absolute paths in components * avoids conflicts with ts custom paths in vue-tsc generated vue.d.ts files Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
27 lines
751 B
Vue
27 lines
751 B
Vue
<script lang="ts" setup>
|
|
import Handle from '../Handle/Handle.vue'
|
|
import { NodeProps, Position } from '../../types'
|
|
|
|
interface InputNodeProps extends NodeProps {
|
|
data?: NodeProps['data']
|
|
connectable?: NodeProps['connectable']
|
|
sourcePosition?: NodeProps['sourcePosition']
|
|
}
|
|
|
|
const props = withDefaults(defineProps<InputNodeProps>(), {
|
|
data: () => {},
|
|
connectable: false,
|
|
sourcePosition: Position.Bottom,
|
|
})
|
|
</script>
|
|
<script lang="ts">
|
|
export default {
|
|
inheritAttrs: false,
|
|
}
|
|
</script>
|
|
<template>
|
|
<component :is="props.data?.label" v-if="typeof props.data?.label !== 'string'" />
|
|
<span v-else v-html="props.data?.label"></span>
|
|
<Handle type="source" :position="props.sourcePosition" :connectable="props.connectable" />
|
|
</template>
|