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(
|
||||
data: CustomerCreate,
|
||||
imgList: {
|
||||
imgList?: {
|
||||
selectedImage: string;
|
||||
list: { url: string; imgFile: File | null; name: string }[];
|
||||
},
|
||||
|
|
@ -277,11 +277,11 @@ const useCustomerStore = defineStore('api-customer', () => {
|
|||
customerId: 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++) {
|
||||
const imgFile = imgList.list[index].imgFile;
|
||||
if (imgFile)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue