reactor:优化批量删除的代码,从 as number 变成 !

This commit is contained in:
YunaiV
2025-09-02 09:28:19 +08:00
parent 67da079606
commit c25ea731fd
73 changed files with 102 additions and 97 deletions

View File

@@ -59,15 +59,6 @@ async function handleDelete(row: SystemNoticeApi.Notice) {
}
}
const checkedIds = ref<number[]>([]);
function handleRowCheckboxChange({
records,
}: {
records: SystemNoticeApi.Notice[];
}) {
checkedIds.value = records.map((item) => item.id as number);
}
/** 批量删除公告 */
async function handleDeleteBatch() {
const hideLoading = message.loading({
@@ -85,6 +76,15 @@ async function handleDeleteBatch() {
}
}
const checkedIds = ref<number[]>([]);
function handleRowCheckboxChange({
records,
}: {
records: SystemNoticeApi.Notice[];
}) {
checkedIds.value = records.map((item) => item.id as number);
}
/** 推送公告 */
async function handlePush(row: SystemNoticeApi.Notice) {
const hideLoading = message.loading({