From b45854218d803ed26a8bbbaed92a879c02a847ca Mon Sep 17 00:00:00 2001 From: Egor Aristov Date: Sun, 23 Feb 2025 17:21:04 +0300 Subject: [PATCH] make model definitions more correct --- README.md | 2 +- .../wizard-vue/src/components/EditUrlModal.vue | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 92a46e8..fc5531a 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Each worker can process 1 page at a time, so to scale you should run multiple wo ## Development You need -- Go 1.23 (most of application), +- Go 1.23 (most of application) - Node.js 20 (frontend) - Nats (with jetstream) - Redis diff --git a/frontend/wizard-vue/src/components/EditUrlModal.vue b/frontend/wizard-vue/src/components/EditUrlModal.vue index d5c3d5a..8cf8c23 100644 --- a/frontend/wizard-vue/src/components/EditUrlModal.vue +++ b/frontend/wizard-vue/src/components/EditUrlModal.vue @@ -16,18 +16,19 @@ const field: FieldSpec = { validate: validateOr(validateUrl, validatePreset), } -const visible = defineModel('visible'); -const {modelValue} = defineProps({ - modelValue: { - type: String, - required: true, - } +const visible = defineModel('visible', { + type: Boolean, + required: true +}); +const modelValue = defineModel({ + type: String, + required: true }); const emit = defineEmits(['update:modelValue', 'update:visible']); -const url = ref(modelValue); +const url = ref(modelValue.value); watch(visible, () => { - url.value = modelValue; + url.value = modelValue.value; }); const valid = ref(false);