fix(admin): 支持移除新增权益图片 (bug #24031)
| | |
| | | |
| | | .equity-upload-row { |
| | | display: grid; |
| | | grid-template-columns: 42px 180px 72px; |
| | | grid-template-columns: 42px 180px repeat(2, 72px); |
| | | gap: 12px 24px; |
| | | align-items: center; |
| | | margin: 24px 0 0 18px; |
| | |
| | | }) |
| | | } |
| | | |
| | | function removeImage(index: number) { |
| | | const images = currentConfig().images |
| | | if (images.length <= 1) return |
| | | images.splice(index, 1) |
| | | } |
| | | |
| | | async function uploadImage(item: EquityImageItem) { |
| | | const input = document.createElement('input') |
| | | input.type = 'file' |
| | |
| | | <el-icon v-else><Picture /></el-icon> |
| | | </div> |
| | | <el-button type="primary" :loading="uploadingImageId === item.id" @click="uploadImage(item)">上传</el-button> |
| | | <el-button v-if="currentConfig().images.length > 1" @click="removeImage(index)">移除</el-button> |
| | | </div> |
| | | </div> |
| | | |