add submit to enter functionality for endpoint preview

Before, if you modified the URL and pressed enter in the box, the whole page would reload. Now it simply sends the request
This commit is contained in:
Nemo Godebski-Pedersen 2025-05-07 15:52:50 +02:00
parent 24fb09a5e7
commit 503911f896

View File

@ -264,10 +264,16 @@ const onError = (error) => {
<template>
<main>
<el-form ref="requestFormRef" :model="requestForm">
<el-form ref="requestFormRef" :model="requestForm" @submit.prevent>
<el-form-item prop="url">
<div class="flex-request-preview-panel">
<input type="text" v-model="url" :set="(requestForm.url = url)" id="search-input" />
<input
type="text"
v-model="url"
:set="(requestForm.url = url)"
id="search-input"
@keyup.enter="submit(requestFormRef, submitRequest)"
/>
<el-button
:type="type"
id="search-button"