review:【ANTD】批量删除代码

pull/88/MERGE
YunaiV 2025-05-20 21:02:28 +08:00
parent 0e6c46ea09
commit f03d8fa9ee
5 changed files with 4 additions and 3 deletions

View File

@ -47,6 +47,7 @@ export function deleteDemo01Contact(id: number) {
} }
/** 批量删除示例联系人 */ /** 批量删除示例联系人 */
// TODO @puhui999ByIds这种按照约定是不带的针对 Id 的情况哈。
export function deleteDemo01ContactListByIds(ids: number[]) { export function deleteDemo01ContactListByIds(ids: number[]) {
return requestClient.delete( return requestClient.delete(
`/infra/demo01-contact/delete-list?ids=${ids.join(',')}`, `/infra/demo01-contact/delete-list?ids=${ids.join(',')}`,

View File

@ -18,7 +18,7 @@ export function useTableToolbar() {
const table = tableRef.value; const table = tableRef.value;
const tableToolbar = tableToolbarRef.value; const tableToolbar = tableToolbarRef.value;
if (table && tableToolbar) { if (table && tableToolbar) {
// TODO @puhui999通过 nexttick 可以解决么?试过不得行🤣刚好列表组件出现后延迟一秒挂载很稳 // 延迟 1 秒,确保 toolbar 组件已经挂载
setTimeout(async () => { setTimeout(async () => {
const toolbar = tableToolbar.getToolbarRef(); const toolbar = tableToolbar.getToolbarRef();
if (!toolbar) { if (!toolbar) {

View File

@ -77,6 +77,8 @@ async function onDeleteBatch() {
} }
} }
// TODO @puhui999 handleRowCheckboxChange
// TODO @puhui999deleteIds => checkedIds
const deleteIds = ref<number[]>([]); // ID const deleteIds = ref<number[]>([]); // ID
function setDeleteIds({ function setDeleteIds({
records, records,

View File

@ -199,7 +199,6 @@ export function useDemo03CourseGridEditColumns(
minWidth: 60, minWidth: 60,
align: 'center', align: 'center',
fixed: 'right', fixed: 'right',
showOverflow: false, showOverflow: false,
cellRender: { cellRender: {
attrs: { attrs: {

View File

@ -198,7 +198,6 @@ export function useDemo03CourseGridEditColumns(
minWidth: 60, minWidth: 60,
align: 'center', align: 'center',
fixed: 'right', fixed: 'right',
showOverflow: false, showOverflow: false,
cellRender: { cellRender: {
attrs: { attrs: {