This commit is contained in:
dzc committed 2025-10-17 13:01:55 +08:00
commit 5485c3b85a
94 files changed
+10131

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import { ref } from "vue";
let count = 0;
const useList = () => {
const notificationList = ref([]);
const add = (optionProps) => {
notificationList.value.push({ id: count++, ...optionProps });
};
const remove = (id) => {
notificationList.value = notificationList.value.filter((item) => item.id !== id);
};
const clear = () => {
notificationList.value = [];
}
return { notificationList, add, remove, clear };
};
export default useList;