mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 14:31:00 +08:00
fix: 【数据源】API数据源复制设置了主键的表无法修改主键
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user