fix: no use of fragments for nodes as it results in warning from vue and we got enough of those as is
* some typing issues
This commit is contained in:
@@ -29,11 +29,11 @@ const DefaultNode = defineComponent({
|
||||
},
|
||||
setup(props) {
|
||||
return () => (
|
||||
<>
|
||||
<div>
|
||||
<Handle type="target" position={props.targetPosition} isConnectable={props.isConnectable} />
|
||||
{props.data?.label}
|
||||
<Handle type="source" position={props.sourcePosition} isConnectable={props.isConnectable} />
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -24,10 +24,10 @@ const InputNode = defineComponent({
|
||||
},
|
||||
setup(props) {
|
||||
return () => (
|
||||
<>
|
||||
<div>
|
||||
{props.data?.label}
|
||||
<Handle type="source" position={props.sourcePosition} isConnectable={props.isConnectable} />
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -24,10 +24,10 @@ const OutputNode = defineComponent({
|
||||
},
|
||||
setup(props) {
|
||||
return () => (
|
||||
<>
|
||||
<div>
|
||||
{props.data?.label}
|
||||
<Handle type="source" position={props.targetPosition} isConnectable={props.isConnectable} />
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Node, RevueFlowStore, WrapNodeProps } from '../../types';
|
||||
import { computed, CSSProperties, defineComponent, inject, onMounted, provide, ref } from 'vue';
|
||||
import { computed, CSSProperties, DefineComponent, defineComponent, inject, onMounted, provide, ref } from 'vue';
|
||||
import { DraggableCore, DraggableEventHandler } from '@braks/revue-draggable';
|
||||
|
||||
export default (NodeComponent: any) => {
|
||||
export default (NodeComponent: DefineComponent<WrapNodeProps>) => {
|
||||
return defineComponent({
|
||||
props: WrapNodeProps,
|
||||
setup(props) {
|
||||
|
||||
Reference in New Issue
Block a user