增加前端格式检查配置
This commit is contained in:
@@ -83,9 +83,9 @@ const {
|
||||
showCancelButton: true,
|
||||
})
|
||||
},
|
||||
notifySuccess: (message) => showToast({ message, icon: 'passed' }),
|
||||
notifyWarning: (message) => showToast({ message, icon: 'warning-o' }),
|
||||
notifyError: (message) => showToast({ message, icon: 'cross' }),
|
||||
notifySuccess: message => showToast({ message, icon: 'passed' }),
|
||||
notifyWarning: message => showToast({ message, icon: 'warning-o' }),
|
||||
notifyError: message => showToast({ message, icon: 'cross' }),
|
||||
})
|
||||
|
||||
const agreementPopupVisible = ref(false)
|
||||
@@ -151,7 +151,7 @@ function selectOnlineEnd(value: string) {
|
||||
type="button"
|
||||
class="radio-btn"
|
||||
:class="{ active: form.server_region === opt }"
|
||||
@click="selectRadio(opt, (value) => (form.server_region = value))"
|
||||
@click="selectRadio(opt, value => (form.server_region = value))"
|
||||
>
|
||||
{{ opt }}
|
||||
</button>
|
||||
@@ -168,7 +168,7 @@ function selectOnlineEnd(value: string) {
|
||||
type="button"
|
||||
class="radio-btn"
|
||||
:class="{ active: form.face_owner === opt }"
|
||||
@click="selectRadio(opt, (value) => (form.face_owner = value))"
|
||||
@click="selectRadio(opt, value => (form.face_owner = value))"
|
||||
>
|
||||
{{ opt }}
|
||||
</button>
|
||||
@@ -194,7 +194,7 @@ function selectOnlineEnd(value: string) {
|
||||
type="button"
|
||||
class="radio-btn"
|
||||
:class="{ active: form.rank_level === opt }"
|
||||
@click="selectRadio(opt, (value) => (form.rank_level = value))"
|
||||
@click="selectRadio(opt, value => (form.rank_level = value))"
|
||||
>
|
||||
{{ opt }}
|
||||
</button>
|
||||
@@ -227,7 +227,7 @@ function selectOnlineEnd(value: string) {
|
||||
type="button"
|
||||
class="radio-btn"
|
||||
:class="{ active: form.season_insurance === opt }"
|
||||
@click="selectRadio(opt, (value) => (form.season_insurance = value))"
|
||||
@click="selectRadio(opt, value => (form.season_insurance = value))"
|
||||
>
|
||||
{{ opt }}
|
||||
</button>
|
||||
@@ -245,7 +245,7 @@ function selectOnlineEnd(value: string) {
|
||||
type="button"
|
||||
class="level-btn"
|
||||
:class="{ active: form.stamina_level === opt }"
|
||||
@click="selectRadio(opt, (value) => (form.stamina_level = value))"
|
||||
@click="selectRadio(opt, value => (form.stamina_level = value))"
|
||||
>
|
||||
{{ opt }}
|
||||
</button>
|
||||
@@ -260,7 +260,7 @@ function selectOnlineEnd(value: string) {
|
||||
type="button"
|
||||
class="level-btn"
|
||||
:class="{ active: form.load_level === opt }"
|
||||
@click="selectRadio(opt, (value) => (form.load_level = value))"
|
||||
@click="selectRadio(opt, value => (form.load_level = value))"
|
||||
>
|
||||
{{ opt }}
|
||||
</button>
|
||||
@@ -287,7 +287,9 @@ function selectOnlineEnd(value: string) {
|
||||
>
|
||||
<span>*</span>{{ item.label }}
|
||||
</strong>
|
||||
<small>{{ isQuantityItemDisabled(item) ? "3*3 已包含,不能填写" : item.price }}</small>
|
||||
<small>{{
|
||||
isQuantityItemDisabled(item) ? '3*3 已包含,不能填写' : item.price
|
||||
}}</small>
|
||||
</div>
|
||||
<input
|
||||
v-model="quantityValues[item.key]"
|
||||
@@ -327,10 +329,7 @@ function selectOnlineEnd(value: string) {
|
||||
<div class="skin-group-title">
|
||||
<span>{{ group.title }}</span>
|
||||
<small>
|
||||
{{
|
||||
group.options.filter((skin) => selectedSkins.includes(skin))
|
||||
.length
|
||||
}} 项
|
||||
{{ group.options.filter(skin => selectedSkins.includes(skin)).length }} 项
|
||||
</small>
|
||||
</div>
|
||||
<div class="multi-chip-group">
|
||||
@@ -357,7 +356,7 @@ function selectOnlineEnd(value: string) {
|
||||
type="button"
|
||||
class="radio-btn"
|
||||
:class="{ active: form.login_method === opt }"
|
||||
@click="selectRadio(opt, (value) => (form.login_method = value))"
|
||||
@click="selectRadio(opt, value => (form.login_method = value))"
|
||||
>
|
||||
{{ opt }}
|
||||
</button>
|
||||
@@ -439,7 +438,7 @@ function selectOnlineEnd(value: string) {
|
||||
type="button"
|
||||
class="radio-btn"
|
||||
:class="{ active: form.ban_record === opt }"
|
||||
@click="selectRadio(opt, (value) => (form.ban_record = value))"
|
||||
@click="selectRadio(opt, value => (form.ban_record = value))"
|
||||
>
|
||||
{{ opt }}
|
||||
</button>
|
||||
@@ -484,11 +483,20 @@ 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>
|
||||
<small v-if="getScreenshotLimitHint(slot.key)">{{
|
||||
getScreenshotLimitHint(slot.key)
|
||||
}}</small>
|
||||
</div>
|
||||
<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}`" />
|
||||
<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
|
||||
@@ -499,7 +507,7 @@ function selectOnlineEnd(value: string) {
|
||||
@click="triggerUpload(slot.key)"
|
||||
>
|
||||
<van-icon name="photograph" :size="22" color="#999" />
|
||||
<span>{{ uploading && activeUploadKey === slot.key ? "上传中" : "继续上传" }}</span>
|
||||
<span>{{ uploading && activeUploadKey === slot.key ? '上传中' : '继续上传' }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
@@ -510,7 +518,7 @@ function selectOnlineEnd(value: string) {
|
||||
@click="triggerUpload(slot.key)"
|
||||
>
|
||||
<van-icon name="photograph" :size="22" color="#999" />
|
||||
<span>{{ uploading && activeUploadKey === slot.key ? "上传中" : "上传" }}</span>
|
||||
<span>{{ uploading && activeUploadKey === slot.key ? '上传中' : '上传' }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -537,7 +545,11 @@ function selectOnlineEnd(value: string) {
|
||||
class="publish-field"
|
||||
>
|
||||
<template #label>
|
||||
<span class="hint-label deposit-label" :data-hint="priceConfig.deposit_placeholder" tabindex="0">
|
||||
<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>
|
||||
@@ -583,7 +595,7 @@ function selectOnlineEnd(value: string) {
|
||||
{{
|
||||
calculatedDefaultSaleRatio > 0
|
||||
? `1元=${formatNumber(calculatedDefaultSaleRatio)}万`
|
||||
: "自动计算"
|
||||
: '自动计算'
|
||||
}}
|
||||
</span>
|
||||
</button>
|
||||
@@ -599,7 +611,7 @@ function selectOnlineEnd(value: string) {
|
||||
{{
|
||||
maxAcceleratedSaleRatio > 0
|
||||
? `1元=${formatNumber(calculatedDefaultSaleRatio)}~${formatNumber(maxAcceleratedSaleRatio)}万`
|
||||
: "自动计算"
|
||||
: '自动计算'
|
||||
}}
|
||||
</span>
|
||||
</button>
|
||||
@@ -626,7 +638,9 @@ function selectOnlineEnd(value: string) {
|
||||
class="publish-field result-field"
|
||||
>
|
||||
<template #label>
|
||||
<span class="hint-label" :data-hint="priceConfig.ratio_description" tabindex="0">卖家比例</span>
|
||||
<span class="hint-label" :data-hint="priceConfig.ratio_description" tabindex="0"
|
||||
>卖家比例</span
|
||||
>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field
|
||||
@@ -638,7 +652,9 @@ function selectOnlineEnd(value: string) {
|
||||
class="publish-field result-field"
|
||||
>
|
||||
<template #label>
|
||||
<span class="hint-label" :data-hint="priceConfig.price_placeholder" tabindex="0">纯币基础价</span>
|
||||
<span class="hint-label" :data-hint="priceConfig.price_placeholder" tabindex="0"
|
||||
>纯币基础价</span
|
||||
>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field
|
||||
@@ -656,9 +672,7 @@ function selectOnlineEnd(value: string) {
|
||||
class="publish-field result-field total-price-field"
|
||||
/>
|
||||
</div>
|
||||
<p class="price-breakdown-hint">
|
||||
卖家价格 = 纯币基础价 + 额外消耗品。
|
||||
</p>
|
||||
<p class="price-breakdown-hint">卖家价格 = 纯币基础价 + 额外消耗品。</p>
|
||||
|
||||
<van-field
|
||||
v-model="form.remark"
|
||||
@@ -699,12 +713,7 @@ function selectOnlineEnd(value: string) {
|
||||
</div>
|
||||
|
||||
<div class="publish-actions">
|
||||
<van-button
|
||||
round
|
||||
class="reset-btn"
|
||||
:disabled="loading"
|
||||
@click="handleResetDraft"
|
||||
>
|
||||
<van-button round class="reset-btn" :disabled="loading" @click="handleResetDraft">
|
||||
重置
|
||||
</van-button>
|
||||
<van-button
|
||||
@@ -721,7 +730,14 @@ function selectOnlineEnd(value: string) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<van-popup v-model:show="agreementPopupVisible" round closeable position="bottom" lock-scroll class="publish-agreement-popup">
|
||||
<van-popup
|
||||
v-model:show="agreementPopupVisible"
|
||||
round
|
||||
closeable
|
||||
position="bottom"
|
||||
lock-scroll
|
||||
class="publish-agreement-popup"
|
||||
>
|
||||
<div class="agreement-popup-body">
|
||||
<h3>{{ activeAgreementTitle }}</h3>
|
||||
<div class="agreement-popup-content">{{ activeAgreementContent }}</div>
|
||||
|
||||
Reference in New Issue
Block a user