fix: proper key for v-for loops
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<div
|
||||
v-for="(param, index) in bodyParams"
|
||||
:key="index"
|
||||
:key="`param-${index}`"
|
||||
class="
|
||||
flex
|
||||
border-b border-dashed
|
||||
@@ -76,9 +76,9 @@
|
||||
<div v-else class="file-chips-container">
|
||||
<div class="file-chips-wrapper">
|
||||
<SmartDeletableChip
|
||||
v-for="(file, i) in Array.from(bodyParams[index].value)"
|
||||
:key="`body-param-${index}-file-${i}`"
|
||||
@chip-delete="chipDelete(index, i)"
|
||||
v-for="(file, fileIndex) in Array.from(bodyParams[index].value)"
|
||||
:key="`param-${index}-file-${fileIndex}`"
|
||||
@chip-delete="chipDelete(index, fileIndex)"
|
||||
>
|
||||
{{ file.name }}
|
||||
</SmartDeletableChip>
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
</span>
|
||||
</template>
|
||||
<SmartItem
|
||||
v-for="gen in codegens"
|
||||
:key="gen.id"
|
||||
v-for="(gen, index) in codegens"
|
||||
:key="`gen-${index}`"
|
||||
:label="gen.name"
|
||||
@click.native="
|
||||
requestType = gen.id
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
<div
|
||||
v-for="(header, index) in headers$"
|
||||
:key="index"
|
||||
:key="`header-${index}`"
|
||||
class="
|
||||
flex
|
||||
border-b border-dashed
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
<div
|
||||
v-for="(param, index) in params$"
|
||||
:key="index"
|
||||
:key="`param-${index}`"
|
||||
class="
|
||||
flex
|
||||
border-b border-dashed
|
||||
|
||||
@@ -34,12 +34,12 @@
|
||||
/>
|
||||
</template>
|
||||
<SmartItem
|
||||
v-for="(methodMenuItem, index) in methodMenuItems"
|
||||
v-for="(method, index) in methods"
|
||||
:key="`method-${index}`"
|
||||
:label="methodMenuItem"
|
||||
:label="method"
|
||||
class="font-mono"
|
||||
@click.native="
|
||||
updateMethod(methodMenuItem)
|
||||
updateMethod(method)
|
||||
$refs.options.tippy().hide()
|
||||
"
|
||||
/>
|
||||
@@ -257,7 +257,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
newMethod$: "",
|
||||
methodMenuItems: [
|
||||
methods: [
|
||||
"GET",
|
||||
"HEAD",
|
||||
"POST",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<ul v-for="(token, index) in tokens" :key="index">
|
||||
<ul v-for="(token, index) in tokens" :key="`token-${index}`">
|
||||
<li>
|
||||
<input
|
||||
class="input"
|
||||
|
||||
Reference in New Issue
Block a user