fix: type
This commit is contained in:
parent
7fcae06d4d
commit
b1997c51ad
1 changed files with 3 additions and 3 deletions
|
|
@ -240,7 +240,7 @@ const useCustomerStore = defineStore('api-customer', () => {
|
||||||
|
|
||||||
async function create(
|
async function create(
|
||||||
data: CustomerCreate,
|
data: CustomerCreate,
|
||||||
imgList: {
|
imgList?: {
|
||||||
selectedImage: string;
|
selectedImage: string;
|
||||||
list: { url: string; imgFile: File | null; name: string }[];
|
list: { url: string; imgFile: File | null; name: string }[];
|
||||||
},
|
},
|
||||||
|
|
@ -277,11 +277,11 @@ const useCustomerStore = defineStore('api-customer', () => {
|
||||||
customerId: undefined,
|
customerId: undefined,
|
||||||
codeCustomer: undefined,
|
codeCustomer: undefined,
|
||||||
})),
|
})),
|
||||||
selectedImage: imgList.selectedImage,
|
selectedImage: imgList?.selectedImage,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (imgList.list.length > 0 && res.data.id) {
|
if (imgList && imgList.list.length > 0 && res.data.id) {
|
||||||
for (let index = 0; index < imgList.list.length; index++) {
|
for (let index = 0; index < imgList.list.length; index++) {
|
||||||
const imgFile = imgList.list[index].imgFile;
|
const imgFile = imgList.list[index].imgFile;
|
||||||
if (imgFile)
|
if (imgFile)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue