refactor: img dialog => remove img function
This commit is contained in:
parent
42bb43f618
commit
7ab9f69ef8
6 changed files with 82 additions and 78 deletions
|
|
@ -4280,15 +4280,15 @@ watch(
|
|||
@add-image="
|
||||
async (v) => {
|
||||
if (!v) return;
|
||||
if (!currentIdProduct) return;
|
||||
if (!currentIdProduct && !currentIdService) return;
|
||||
const res = await productServiceStore.addImageList(
|
||||
v,
|
||||
currentIdProduct,
|
||||
dialogProductEdit ? currentIdProduct : currentIdService,
|
||||
Date.now(),
|
||||
dialogProductEdit ? 'product' : 'service',
|
||||
);
|
||||
await fetchImageList(
|
||||
currentIdProduct,
|
||||
dialogProductEdit ? currentIdProduct : currentIdService,
|
||||
res,
|
||||
dialogProductEdit ? 'product' : 'service',
|
||||
);
|
||||
|
|
@ -4308,7 +4308,9 @@ watch(
|
|||
);
|
||||
await fetchImageList(
|
||||
dialogProductEdit ? currentIdProduct : currentIdService,
|
||||
name,
|
||||
dialogProductEdit
|
||||
? formDataProduct.selectedImage || ''
|
||||
: formDataProductService.selectedImage || '',
|
||||
type,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue