add package
This commit is contained in:
@@ -43,10 +43,12 @@ interface Props {
|
||||
modelValue: string | string[];
|
||||
visible: boolean;
|
||||
selectionMode?: SelectionMode;
|
||||
storeId?: string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
selectionMode: "single"
|
||||
selectionMode: "single",
|
||||
storeId: ""
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -100,6 +102,7 @@ async function loadCustomers(): Promise<void> {
|
||||
const result = await CustomerAPI.list({
|
||||
index: pageIndex.value,
|
||||
size: pageSize,
|
||||
storeId: props.storeId || undefined,
|
||||
likesExample: {
|
||||
code: keyword.value || undefined,
|
||||
name: keyword.value || undefined,
|
||||
@@ -195,6 +198,14 @@ watch(() => props.visible, async (value) => {
|
||||
await bindScrollListener();
|
||||
});
|
||||
|
||||
watch(() => props.storeId, async () => {
|
||||
if (!props.visible) {
|
||||
return;
|
||||
}
|
||||
await reloadCustomers();
|
||||
await bindScrollListener();
|
||||
});
|
||||
|
||||
watch(keyword, async () => {
|
||||
if (!props.visible) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user