修改猪栏卡片和猪舍时列表不折叠
This commit is contained in:
@@ -88,12 +88,13 @@ export default {
|
||||
loading.value = true;
|
||||
try {
|
||||
const submitData = { name: formData.name, description: formData.description };
|
||||
let response;
|
||||
if (props.isEdit) {
|
||||
await updatePigHouse(formData.id, submitData);
|
||||
response = await updatePigHouse(formData.id, submitData);
|
||||
} else {
|
||||
await createPigHouse(submitData);
|
||||
response = await createPigHouse(submitData);
|
||||
}
|
||||
emit('success');
|
||||
emit('success', response.data);
|
||||
handleClose();
|
||||
} catch (error) {
|
||||
ElMessage.error((props.isEdit ? '更新' : '创建') + '猪舍失败: ' + (error.message || '未知错误'));
|
||||
|
||||
Reference in New Issue
Block a user