make model definitions more correct

This commit is contained in:
Egor Aristov 2025-02-23 17:21:04 +03:00
parent 3d907bfa04
commit 2130e92ec1
2 changed files with 10 additions and 9 deletions

View File

@ -65,7 +65,7 @@ Each worker can process 1 page at a time, so to scale you should run multiple wo
## Development ## Development
You need You need
- Go 1.23 (most of application), - Go 1.23 (most of application)
- Node.js 20 (frontend) - Node.js 20 (frontend)
- Nats (with jetstream) - Nats (with jetstream)
- Redis - Redis

View File

@ -16,18 +16,19 @@ const field: FieldSpec = {
validate: validateOr(validateUrl, validatePreset), validate: validateOr(validateUrl, validatePreset),
} }
const visible = defineModel('visible'); const visible = defineModel('visible', {
const {modelValue} = defineProps({ type: Boolean,
modelValue: { required: true
});
const modelValue = defineModel({
type: String, type: String,
required: true, required: true
}
}); });
const emit = defineEmits(['update:modelValue', 'update:visible']); const emit = defineEmits(['update:modelValue', 'update:visible']);
const url = ref(modelValue); const url = ref(modelValue.value);
watch(visible, () => { watch(visible, () => {
url.value = modelValue; url.value = modelValue.value;
}); });
const valid = ref(false); const valid = ref(false);