fix: 修复MaterialCard中get_model命令未找到的错误

- 将MaterialCard组件中的'get_model'命令调用修改为'get_model_by_id'
- 确保前端调用的命令名称与后端注册的命令名称一致
- 解决'Command get_model not found'错误
- 修复素材卡片中获取关联模特信息失败的问题
This commit is contained in:
imeepos 2025-07-15 13:44:07 +08:00
parent cc46115a26
commit ba34481052
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ export const MaterialCard: React.FC<MaterialCardProps> = ({ material, onEdit, on
setLoadingModel(true); setLoadingModel(true);
try { try {
const model = await invoke<Model>('get_model', { id: material.model_id }); const model = await invoke<Model>('get_model_by_id', { id: material.model_id });
setAssociatedModel(model); setAssociatedModel(model);
} catch (error) { } catch (error) {
console.error('获取关联模特失败:', error); console.error('获取关联模特失败:', error);