Browse Source

fix: webhook no reset when addHook

pull/5223/head
诗人的咸鱼 2 years ago
parent
commit
3368a3d132
  1. 7
      packages/nc-gui/components/webhook/Drawer.vue

7
packages/nc-gui/components/webhook/Drawer.vue

@ -19,6 +19,11 @@ async function editHook(hook: Record<string, any>) {
editOrAdd.value = true editOrAdd.value = true
currentHook.value = hook currentHook.value = hook
} }
async function addHook() {
editOrAdd.value = true
currentHook.value = undefined
}
</script> </script>
<template> <template>
@ -35,7 +40,7 @@ async function editHook(hook: Record<string, any>) {
<a-layout-content class="px-10 py-5 scrollbar-thin-primary"> <a-layout-content class="px-10 py-5 scrollbar-thin-primary">
<LazyWebhookEditor v-if="editOrAdd" :hook="currentHook" @back-to-list="editOrAdd = false" /> <LazyWebhookEditor v-if="editOrAdd" :hook="currentHook" @back-to-list="editOrAdd = false" />
<LazyWebhookList v-else @edit="editHook" @add="editOrAdd = true" /> <LazyWebhookList v-else @edit="editHook" @add="addHook" />
</a-layout-content> </a-layout-content>
<a-layout-footer class="!bg-white border-t flex"> <a-layout-footer class="!bg-white border-t flex">

Loading…
Cancel
Save