|
@@ -25,15 +25,10 @@
|
|
|
class="mt-4 space-y-2"
|
|
|
>
|
|
|
<div
|
|
|
- v-for="(item, index) in block.data.conditions"
|
|
|
+ v-for="item in block.data.conditions"
|
|
|
:key="item.id"
|
|
|
- class="flex items-center group justify-end"
|
|
|
+ class="flex items-center justify-end"
|
|
|
>
|
|
|
- <v-remixicon
|
|
|
- name="riDeleteBin7Line"
|
|
|
- class="mr-2 cursor-pointer group-hover:visible invisible"
|
|
|
- @click="deleteCondition(index)"
|
|
|
- />
|
|
|
<div
|
|
|
class="flex items-center flex-1 p-2 bg-box-transparent rounded-lg overflow-hidden w-44"
|
|
|
>
|
|
@@ -92,7 +87,7 @@ function editBlock() {
|
|
|
}
|
|
|
function addConditionEmit({ id }) {
|
|
|
if (id !== block.id) return;
|
|
|
-
|
|
|
+ console.log(block);
|
|
|
const { length } = block.data.conditions;
|
|
|
|
|
|
if (length >= 10) return;
|
|
@@ -108,14 +103,6 @@ function deleteConditionEmit({ index, id }) {
|
|
|
if (block.data.conditions.length === 0)
|
|
|
props.editor.removeNodeOutput(block.id, `output_1`);
|
|
|
}
|
|
|
-function deleteCondition(index) {
|
|
|
- block.data.conditions.splice(index, 1);
|
|
|
- emitter.emit('conditions-block:delete-cond', {
|
|
|
- index,
|
|
|
- id: block.id,
|
|
|
- });
|
|
|
- deleteConditionEmit({ index, id: block.id });
|
|
|
-}
|
|
|
|
|
|
watch(
|
|
|
() => block.data.conditions,
|