mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
fix: 【数据源】API数据源复制设置了主键的表无法修改主键
This commit is contained in:
parent
e5457757b9
commit
b745be32f4
@ -417,6 +417,22 @@ const disabledFieldLength = item => {
|
||||
}
|
||||
}
|
||||
|
||||
const disabledSetKey = item => {
|
||||
if (item.hasOwnProperty('children') && item.children.length > 0) {
|
||||
return true
|
||||
}
|
||||
if (copyItem.value || copyDs.value) {
|
||||
return false
|
||||
}
|
||||
if (editItem.value) {
|
||||
return true
|
||||
}
|
||||
if (!item.checked) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const disabledChangeFieldByChildren = item => {
|
||||
if (apiItem.type == 'params') {
|
||||
return true
|
||||
@ -808,7 +824,7 @@ defineExpose({
|
||||
<el-checkbox
|
||||
:key="scope.row.jsonPath"
|
||||
v-model="scope.row.primaryKey"
|
||||
:disabled="editItem || !scope.row.checked"
|
||||
:disabled="disabledSetKey(scope.row)"
|
||||
>
|
||||
</el-checkbox>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user