fix(CRUD):修复生成的远程下拉 pk 属性可能错误的问题

This commit is contained in:
妙码生花 2023-07-08 20:31:02 +08:00
parent cb9a97a3dc
commit b1ae057cc8

View File

@ -754,7 +754,7 @@ class Crud extends Backend
$formField['@keyup.enter.stop'] = '';
$formField['@keyup.ctrl.enter'] = 'baTable.onSubmit(formRef)';
} elseif ($field['designType'] == 'remoteSelect' || $field['designType'] == 'remoteSelects') {
$formField[':input-attr']['pk'] = TableManager::tableName($field['form']['remote-table'], false) . '.' . ($field['form']['remote-pk'] ?? 'id');
$formField[':input-attr']['pk'] = TableManager::tableName($field['form']['remote-table']) . '.' . ($field['form']['remote-pk'] ?? 'id');
$formField[':input-attr']['field'] = $field['form']['remote-field'] ?? 'name';
$formField[':input-attr']['remote-url'] = $this->getRemoteSelectUrl($field);
} elseif ($field['designType'] == 'number') {