diff --git a/src/views/product/goodsImg/goodsImgs.vue b/src/views/product/goodsImg/goodsImgs.vue index 707ca81..db2ca0c 100644 --- a/src/views/product/goodsImg/goodsImgs.vue +++ b/src/views/product/goodsImg/goodsImgs.vue @@ -43,10 +43,16 @@ @selection-change="handleSelectionChange" > - - + - + + 编辑图片 + - 保存 + 保存条码 @@ -66,8 +72,8 @@ clearable size="small" class="barcode-input" - :disabled="scope.row.saveLoading" - @change="handleBarcodeChange(scope.row)" + :disabled="scope.row.saveLoading" + @change="handleBarcodeChange(scope.row)" /> @@ -85,6 +91,32 @@ 无主图 + + + + + { + if (scope.row.product_image_list && scope.row.product_image_list[index]) { + scope.row.product_image_list[index].imageUrl = ''; + } + }" + /> + + 无副图 + + + @@ -114,15 +146,21 @@ :disabled="pagination.total === 0" /> - + + @@ -335,7 +369,6 @@ export default { font-size: 12px; } -// 调整条码输入框样式,使其更贴合表格 .barcode-input { width: 100%; } @@ -348,4 +381,24 @@ export default { margin-top: 10px; text-align: right; } + +.sub-img-group { + display: flex; + flex-wrap: nowrap; + gap: 4px; + align-items: center; + overflow-x: auto; // 如果太多图允许横向滚动 +} + +.sub-img-item { + flex: 0 0 auto; +} + +.sub-img-thumb { + width: 46px; + height: 46px; + border-radius: 3px; + object-fit: cover; + cursor: pointer; +} \ No newline at end of file diff --git a/src/views/product/goodsImg/imgEdit.vue b/src/views/product/goodsImg/imgEdit.vue new file mode 100644 index 0000000..d37bf3d --- /dev/null +++ b/src/views/product/goodsImg/imgEdit.vue @@ -0,0 +1,356 @@ + + + + 正在编辑商品: {{ formData.name }} + (条码: {{ formData.barcode || '无条码' }}) + + + + + + + + + + 支持 JPG, PNG 格式,建议尺寸 800x800px + + + + + + + + + {{ __('取消') }} + {{ __('提交修改') }} + + + + + + + \ No newline at end of file