review:【antd/ele】【mall】营销模块的迁移
This commit is contained in:
@@ -101,7 +101,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
// 当 tab 切换时,更新 Grid 的 columns 和 rowConfig
|
||||
async function onTabChange() {
|
||||
const columns = getColumnsByType();
|
||||
await gridApi.setGridOptions({
|
||||
gridApi.setGridOptions({
|
||||
columns,
|
||||
rowConfig: {
|
||||
keyField: 'id',
|
||||
@@ -115,7 +115,7 @@ async function onTabChange() {
|
||||
async function handleAccountChange(id: number) {
|
||||
accountId.value = id;
|
||||
// 同步设置表单值
|
||||
gridApi.formApi.setValues({ accountId: id });
|
||||
await gridApi.formApi.setValues({ accountId: id });
|
||||
await gridApi.formApi.submitForm();
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ async function handleDelete(id: number) {
|
||||
try {
|
||||
await deletePermanentMaterial(id);
|
||||
ElMessage.success('删除成功');
|
||||
handleRefresh();
|
||||
await handleRefresh();
|
||||
} finally {
|
||||
loadingInstance.close();
|
||||
}
|
||||
@@ -211,7 +211,7 @@ async function handleDelete(id: number) {
|
||||
</ElButton>
|
||||
</template>
|
||||
|
||||
<!-- 图片列的slot -->
|
||||
<!-- 图片列的 slot -->
|
||||
<template #image="{ row }">
|
||||
<div class="flex items-center justify-center" style="height: 192px">
|
||||
<img
|
||||
@@ -222,12 +222,12 @@ async function handleDelete(id: number) {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 语音列的slot -->
|
||||
<!-- 语音列的 slot -->
|
||||
<template #voice="{ row }">
|
||||
<audio :src="row.url" controls style="width: 160px"></audio>
|
||||
</template>
|
||||
|
||||
<!-- 视频列的slot -->
|
||||
<!-- 视频列的 slot -->
|
||||
<template #video="{ row }">
|
||||
<video
|
||||
:src="row.url"
|
||||
@@ -236,16 +236,17 @@ async function handleDelete(id: number) {
|
||||
></video>
|
||||
</template>
|
||||
|
||||
<!-- 操作列的slot -->
|
||||
<!-- 操作列的 slot -->
|
||||
<template #actions="{ row }">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{
|
||||
label: '删除',
|
||||
icon: ACTION_ICON.delete,
|
||||
color: 'danger',
|
||||
label: $t('common.delete'),
|
||||
type: 'danger',
|
||||
link: true,
|
||||
icon: ACTION_ICON.DELETE,
|
||||
auth: ['mp:material:delete'],
|
||||
onClick: () => handleDelete(row.id),
|
||||
onClick: () => handleDelete(row.id!),
|
||||
},
|
||||
]"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user