feat: 更新组件和API,优化数据处理逻辑
- 将 TreeSelect 组件的 fieldNames 属性更改为 props - 更新商品分类API的请求路径 - 在多个模块中引入 ElMessageBox 以增强用户交互体验 - 新增售后管理和订单管理的详细视图组件 - 优化了多个表单组件的逻辑,提升了用户体验
This commit is contained in:
@@ -4,7 +4,7 @@ import type { MallArticleApi } from '#/api/mall/promotion/article';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { ElLoading, ElMessage } from 'element-plus';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { deleteArticle, getArticlePage } from '#/api/mall/promotion/article';
|
||||
@@ -35,17 +35,14 @@ function handleEdit(row: MallArticleApi.Article) {
|
||||
|
||||
/** 删除品牌 */
|
||||
async function handleDelete(row: MallArticleApi.Article) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.title]),
|
||||
fullscreen: true,
|
||||
await ElMessageBox.confirm('确定删除该文章吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
});
|
||||
try {
|
||||
await deleteArticle(row.id as number);
|
||||
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.title]));
|
||||
onRefresh();
|
||||
} finally {
|
||||
loadingInstance.close();
|
||||
}
|
||||
await deleteArticle(row.id as number);
|
||||
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.title]));
|
||||
onRefresh();
|
||||
}
|
||||
|
||||
const [Grid, gridApi] = useVbenVxeGrid({
|
||||
|
||||
Reference in New Issue
Block a user