diff --git a/packages/nc-gui-v2/components/webhook/Drawer.vue b/packages/nc-gui-v2/components/webhook/Drawer.vue index 65894820e5..ca8083d6d4 100644 --- a/packages/nc-gui-v2/components/webhook/Drawer.vue +++ b/packages/nc-gui-v2/components/webhook/Drawer.vue @@ -3,21 +3,15 @@ interface Props { modelValue: boolean } -const { modelValue } = defineProps() -const emit = defineEmits(['update:modelValue']) +const props = defineProps() + +const emits = defineEmits(['update:modelValue']) const editOrAdd = ref(false) const webhookEditorRef = ref() -const dialogShow = computed({ - get() { - return modelValue - }, - set(v: boolean) { - emit('update:modelValue', v) - }, -}) +const vModel = useVModel(props, 'modelValue', emits) async function editHook(hook: Record) { editOrAdd.value = true @@ -29,7 +23,7 @@ async function editHook(hook: Record) {