添加商品图片(临时从OC复制过来)
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 97 KiB |
|
After Width: | Height: | Size: 131 KiB |
|
After Width: | Height: | Size: 133 KiB |
|
After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
|
@ -36,7 +36,10 @@
|
|||
<x-admin-form-input-locale name="descriptions.*.name" title="名称" :value="$descriptions" required />
|
||||
<x-admin::form.row title="图片">
|
||||
<div class="product-images d-flex flex-wrap">
|
||||
<div v-for="image, index in form.images" :key="index" class="wh-80 border d-flex justify-content-center align-items-center me-2">
|
||||
<div v-for="image, index in form.images" :key="index" class="wh-80 position-relative border d-flex justify-content-center align-items-center me-2">
|
||||
<div class="position-absolute top-0 end-0">
|
||||
<button class="btn btn-danger btn-sm wh-20 p-0" @click="removeImages(index)" type="button"><i class="bi bi-trash"></i></button>
|
||||
</div>
|
||||
<img :src="thumbnail(image)" class="img-fluid">
|
||||
<input type="hidden" name="images[]" :value="image">
|
||||
</div>
|
||||
|
|
@ -357,6 +360,10 @@
|
|||
})
|
||||
},
|
||||
|
||||
removeImages(index) {
|
||||
this.form.images.splice(index, 1)
|
||||
},
|
||||
|
||||
dialogVariablesFormSubmit(form) {
|
||||
const name = JSON.parse(JSON.stringify(this.dialogVariables.form.name));
|
||||
const variantIndex = this.dialogVariables.variantIndex;
|
||||
|
|
|
|||