chore(lint): Update eslint rules

* Remove semi
This commit is contained in:
Braks
2021-10-20 22:39:54 +02:00
parent 5ed1094dfe
commit 77eac0c12a
74 changed files with 2007 additions and 1827 deletions
+17 -17
View File
@@ -1,5 +1,5 @@
import RevueFlow, { addEdge, MiniMap, Controls, Connection, Edge, Elements } from '../../src';
import { defineComponent, ref, watchEffect } from 'vue';
import RevueFlow, { addEdge, MiniMap, Controls, Connection, Edge, Elements } from '../../src'
import { defineComponent, ref, watchEffect } from 'vue'
const initialElements: Elements = [
{ id: '1', type: 'input', data: { label: 'Node 1' }, position: { x: 250, y: 5 } },
@@ -9,26 +9,26 @@ const initialElements: Elements = [
{ id: 'e1-2', source: '1', target: '2' },
{ id: 'e1-3', source: '1', target: '3' },
{ id: 'e3-4', source: '3', target: '4' }
] as Elements;
] as Elements
const HiddenFlow = defineComponent({
setup() {
const elements = ref<Elements>(initialElements);
const isHidden = ref<boolean>(false);
const onConnect = (params: Connection | Edge) => (elements.value = addEdge(params, elements.value));
const elements = ref<Elements>(initialElements)
const isHidden = ref<boolean>(false)
const onConnect = (params: Connection | Edge) => (elements.value = addEdge(params, elements.value))
watchEffect(() => {
console.log(isHidden.value);
console.log(isHidden.value)
elements.value = elements.value.map((e) => {
e.isHidden = isHidden.value;
return e;
});
});
e.isHidden = isHidden.value
return e
})
})
const toggle = (event) => {
console.log(event.target);
isHidden.value = event.target?.checked;
};
console.log(event.target)
isHidden.value = event.target?.checked
}
return () => (
<RevueFlow v-model={elements.value} onConnect={onConnect}>
@@ -44,8 +44,8 @@ const HiddenFlow = defineComponent({
</div>
</div>
</RevueFlow>
);
)
}
});
})
export default HiddenFlow;
export default HiddenFlow