Skip to content

Commit

Permalink
Merge pull request #2 from cloudhao1999/master
Browse files Browse the repository at this point in the history
feat: 批量删除增加非空判断
  • Loading branch information
luoqiz committed Jul 28, 2022
2 parents 3e45916 + 58029e6 commit 4749864
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/hooks/useSimpleList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ function useSimpleList<T, U = any>(url: Partial<UrlListType>) {
handleCurrentChange,
handleSelectionChange,
dataSource,
ids,
ipagination,
modalFormRef,
loading
Expand Down
6 changes: 5 additions & 1 deletion src/views/design/ArticlePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ const searchParams = ref(initialValues);
const filterOptions = computed(() => {
return articleFilterOptions.value;
});
const isEmpty = computed(() => {
return ids.value.length === 0;
});
const {
ids,
loading,
dataSource,
ipagination,
Expand Down Expand Up @@ -56,7 +60,7 @@ const {
@confirm="handleBatchDelete()"
>
<template #reference>
<el-button type="danger" icon="delete" circle />
<el-button :disabled="isEmpty" type="danger" icon="delete" circle />
</template>
</el-popconfirm>
</template>
Expand Down

0 comments on commit 4749864

Please sign in to comment.