fix: API数据源数据表请求参数全部填满后最后一条参数无法删除 #7336

This commit is contained in:
dataeaseShu 2023-12-28 09:48:16 +08:00
parent 288343cede
commit df08a6eab8

View File

@ -63,7 +63,7 @@ const typeChange = item => {
}
const remove = (index: number) => {
if (isDisable(index)) return
if (isDisable()) return
//
parameters.value.splice(index, 1)
}
@ -77,8 +77,8 @@ const change = () => {
})
)
}
const isDisable = (index: number) => {
return parameters.value.length - 1 === index
const isDisable = () => {
return parameters.value.length === 1
}
const querySearch = (queryString, cb) => {
const results = queryString
@ -169,7 +169,7 @@ const createFilter = (queryString: string) => {
</el-col>
<el-col :span="1">
<el-button text :disabled="isDisable(index) || isReadOnly" @click="remove(index)">
<el-button text :disabled="isDisable() || isReadOnly" @click="remove(index)">
<template #icon>
<Icon name="icon_delete-trash_outlined"></Icon>
</template>