feat(recycle): add customer recycle list
This commit is contained in:
@@ -56,6 +56,7 @@ const props = withDefaults(defineProps<{
|
||||
title?: string;
|
||||
manage?: boolean;
|
||||
showStatus?: boolean;
|
||||
accountItems?: boolean;
|
||||
selectedId?: string;
|
||||
items?: RecycleItem[];
|
||||
loading?: boolean;
|
||||
@@ -65,6 +66,7 @@ const props = withDefaults(defineProps<{
|
||||
title: "选择回收物",
|
||||
manage: false,
|
||||
showStatus: false,
|
||||
accountItems: false,
|
||||
selectedId: "",
|
||||
loading: false,
|
||||
emptyText: "暂无回收物"
|
||||
@@ -86,6 +88,10 @@ async function load(): Promise<void> {
|
||||
if (internalLoading.value) return;
|
||||
internalLoading.value = true;
|
||||
try {
|
||||
if (props.accountItems) {
|
||||
loadedItems.value = await RecycleAPI.accountItems();
|
||||
return;
|
||||
}
|
||||
const result: RecycleItem[] = [];
|
||||
let offset = 0;
|
||||
let total = 0;
|
||||
|
||||
Reference in New Issue
Block a user