fix(stage-ui,stage-pages): many type errors

This commit is contained in:
Neko Ayaka
2026-03-23 14:20:21 +08:00
parent 1bd3472246
commit aad3b3278c
3 changed files with 5 additions and 5 deletions
@@ -77,7 +77,7 @@ function removeKeyValue(index: number, headers: { key: string, value: string }[]
}
watch(headers, (headers) => {
if (headers.length > 0 && (headers.at(-1).key !== '' || headers.at(-1).value !== '')) {
if (headers.length > 0 && (headers.at(-1)!.key !== '' || headers.at(-1)!.value !== '')) {
headers.push({ key: '', value: '' })
}
if (!providers.value[providerId])
@@ -160,7 +160,7 @@ function normalizeHeaderRows(headers: Record<string, string>) {
if (rows.length === 0) {
rows.push({ key: '', value: '' })
}
else if (rows.at(-1).key !== '' || rows.at(-1).value !== '') {
else if (rows.at(-1)!.key !== '' || rows.at(-1)!.value !== '') {
rows.push({ key: '', value: '' })
}
return rows
@@ -35,7 +35,7 @@ function removeKeyValue(index: number, headers: { key: string, value: string }[]
}
watch(emptyHeaders, (headers) => {
if (headers.length > 0 && (headers.at(-1).key !== '' || headers.at(-1).value !== '')) {
if (headers.length > 0 && (headers.at(-1)!.key !== '' || headers.at(-1)!.value !== '')) {
emptyHeaders.value.push({ key: '', value: '' })
}
}, {
@@ -44,7 +44,7 @@ watch(emptyHeaders, (headers) => {
})
watch(singleHeader, (headers) => {
if (headers.length > 0 && (headers.at(-1).key !== '' || headers.at(-1).value !== '')) {
if (headers.length > 0 && (headers.at(-1)!.key !== '' || headers.at(-1)!.value !== '')) {
singleHeader.value.push({ key: '', value: '' })
}
}, {
@@ -53,7 +53,7 @@ watch(singleHeader, (headers) => {
})
watch(multipleHeaders, (headers) => {
if (headers.length > 0 && (headers.at(-1).key !== '' || headers.at(-1).value !== '')) {
if (headers.length > 0 && (headers.at(-1)!.key !== '' || headers.at(-1)!.value !== '')) {
multipleHeaders.value.push({ key: '', value: '' })
}
}, {