优化发布截图上传与押金提示
This commit is contained in:
@@ -22,7 +22,6 @@ const {
|
||||
form,
|
||||
quantityValues,
|
||||
quantityModes,
|
||||
screenshotFiles,
|
||||
selectedSkins,
|
||||
serverOptions,
|
||||
faceOptions,
|
||||
@@ -57,7 +56,12 @@ const {
|
||||
triggerUpload,
|
||||
handleScreenshotUpload,
|
||||
removeScreenshot,
|
||||
getScreenshotURLs,
|
||||
getScreenshotCount,
|
||||
getScreenshotPreviewURL,
|
||||
isMultiScreenshotSlot,
|
||||
canAddScreenshot,
|
||||
getScreenshotLimitHint,
|
||||
handleFireLevelInput,
|
||||
handleAcceleratedSaleRatioInput,
|
||||
useRecommendedDeposit,
|
||||
@@ -480,10 +484,23 @@ function selectOnlineEnd(value: string) {
|
||||
{{ slot.label }}<span v-if="isScreenshotRequired(slot)">*</span>
|
||||
</strong>
|
||||
<small>{{ slot.hint }}</small>
|
||||
<small v-if="getScreenshotLimitHint(slot.key)">{{ getScreenshotLimitHint(slot.key) }}</small>
|
||||
</div>
|
||||
<div v-if="screenshotFiles[slot.key]" class="upload-preview">
|
||||
<img :src="getScreenshotPreviewURL(slot.key)" :alt="slot.label" />
|
||||
<button type="button" @click="removeScreenshot(slot.key)">移除</button>
|
||||
<div v-if="getScreenshotCount(slot.key)" class="upload-preview-list">
|
||||
<div v-for="(url, index) in getScreenshotURLs(slot.key)" :key="`${slot.key}-${url}`" class="upload-preview">
|
||||
<img :src="getScreenshotPreviewURL(slot.key, index)" :alt="`${slot.label}${index + 1}`" />
|
||||
<button type="button" @click="removeScreenshot(slot.key, index)">移除</button>
|
||||
</div>
|
||||
<button
|
||||
v-if="canAddScreenshot(slot.key)"
|
||||
type="button"
|
||||
class="upload-add"
|
||||
:disabled="uploading"
|
||||
@click="triggerUpload(slot.key)"
|
||||
>
|
||||
<van-icon name="photograph" :size="22" color="#999" />
|
||||
<span>{{ uploading && activeUploadKey === slot.key ? "上传中" : "继续上传" }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
v-else
|
||||
@@ -502,6 +519,7 @@ function selectOnlineEnd(value: string) {
|
||||
ref="fileInput"
|
||||
type="file"
|
||||
accept="image/jpeg,image/png,image/webp"
|
||||
:multiple="isMultiScreenshotSlot(activeUploadKey)"
|
||||
style="display: none"
|
||||
@change="handleScreenshotUpload"
|
||||
/>
|
||||
@@ -519,7 +537,9 @@ function selectOnlineEnd(value: string) {
|
||||
class="publish-field"
|
||||
>
|
||||
<template #label>
|
||||
<span class="hint-label" :data-hint="priceConfig.deposit_placeholder" tabindex="0">押金</span>
|
||||
<span class="hint-label deposit-label" :data-hint="priceConfig.deposit_placeholder" tabindex="0">
|
||||
押金<em v-if="priceConfig.deposit_hint">{{ priceConfig.deposit_hint }}</em>
|
||||
</span>
|
||||
</template>
|
||||
</van-field>
|
||||
<button class="deposit-recommend-btn" type="button" @click="useRecommendedDeposit">
|
||||
|
||||
Reference in New Issue
Block a user