feat: auto increment headers and parameters list on input

This commit is contained in:
liyasthomas
2021-08-01 15:01:31 +05:30
parent 9afe415c2d
commit 462d17de17
2 changed files with 28 additions and 24 deletions

View File

@@ -197,18 +197,19 @@ export default {
),
}
},
// watch: {
// params$: {
// handler(newValue) {
// if (
// newValue[newValue.length - 1]?.key !== "" ||
// newValue[newValue.length - 1]?.value !== ""
// )
// this.addParam()
// },
// deep: true,
// },
// },
watch: {
params$: {
handler(newValue) {
if (
(newValue[newValue.length - 1]?.key !== "" ||
newValue[newValue.length - 1]?.value !== "") &&
newValue.length
)
this.addParam()
},
deep: true,
},
},
mounted() {
if (!this.params$?.length) {
this.addParam()