添加清空流程功能

This commit is contained in:
fofolee
2025-02-16 15:42:49 +08:00
parent fec8eb3f09
commit 9f7d8dde05
2 changed files with 26 additions and 0 deletions

View File

@@ -54,6 +54,15 @@
>
<q-tooltip>保存</q-tooltip>
</q-btn>
<q-btn
dense
flat
icon="delete_sweep"
@click="handleClear"
v-if="!disabledButtons.includes('clear')"
>
<q-tooltip>清空所有流程</q-tooltip>
</q-btn>
<q-btn
flat
dense
@@ -138,6 +147,14 @@ export default defineComponent({
const code = generateFlowsCode(this.flows);
this.$emit("action", "apply", code);
},
handleClear() {
quickcommand
.showConfirmBox("确定要清空所有流程吗?", "FBI WARNING")
.then((isConfirm) => {
if (!isConfirm) return;
this.$emit("action", "clear");
});
},
},
});
</script>