feat:【ele】【ai】modal 部分的代码迁移

This commit is contained in:
YunaiV
2025-10-26 16:32:43 +08:00
parent e301bee211
commit 67952762ed
8 changed files with 50 additions and 47 deletions

View File

@@ -23,24 +23,24 @@ function handleRefresh() {
gridApi.query();
}
/** 创建 */
/** 创建聊天角色 */
function handleCreate() {
formModalApi.setData({ formType: 'create' }).open();
}
/** 编辑 */
/** 编辑聊天角色 */
function handleEdit(row: AiModelChatRoleApi.ChatRole) {
formModalApi.setData({ formType: 'update', ...row }).open();
}
/** 删除 */
/** 删除聊天角色 */
async function handleDelete(row: AiModelChatRoleApi.ChatRole) {
const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting', [row.name]),
duration: 0,
});
try {
await deleteChatRole(row.id as number);
await deleteChatRole(row.id!);
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
handleRefresh();
} finally {