diff --git a/src/core/icons.ts b/src/core/icons.ts index 3c8ff6241..5aaa35944 100644 --- a/src/core/icons.ts +++ b/src/core/icons.ts @@ -36,6 +36,8 @@ import IconCheckboxCircle from "~icons/ri/checkbox-circle-line"; import IconInformation from "~icons/ri/information-line"; // @ts-ignore import IconCloseCircle from "~icons/ri/close-circle-line"; +// @ts-ignore +import IconDeleteBin from "~icons/ri/delete-bin-2-line"; export { IconDashboard, @@ -57,4 +59,5 @@ export { IconCheckboxCircle, IconInformation, IconCloseCircle, + IconDeleteBin, }; diff --git a/src/views/posts/PostList.vue b/src/views/posts/PostList.vue index 77a530431..3d9736e07 100644 --- a/src/views/posts/PostList.vue +++ b/src/views/posts/PostList.vue @@ -3,6 +3,25 @@ import FilledLayout from "@/layouts/FilledLayout.vue"; import { VButton } from "@/components/base/button"; import { VTag } from "@/components/base/tag"; import { IconBookRead } from "@/core/icons"; +import { posts } from "./posts-mock"; +import { ref } from "vue"; + +const postsRef = ref( + posts.map((item) => { + return { + ...item, + checked: false, + }; + }) +); + +const checkAll = ref(false); + +const handleCheckAll = () => { + postsRef.value.forEach((item) => { + item.checked = checkAll.value; + }); +};