feat: 价格限制最低4港币
This commit is contained in:
@@ -1759,6 +1759,7 @@ export default {
|
||||
learnMore: '了解更多',
|
||||
requiredFieldTips: '请填写{field}',
|
||||
requiredFieldTipsWithPage: '第 {index} 个商品:请填写{field}',
|
||||
priceMinMessage: '价格不能低于4港币',
|
||||
draftSaved: '草稿已保存',
|
||||
draftDesc: '您的商品已保存为草稿。\n您可以继续编辑,或稍后在“我的商品”中发布。',
|
||||
listingLive: '商品已上架',
|
||||
|
||||
@@ -1810,6 +1810,7 @@ export default {
|
||||
learnMore:'Learn more',
|
||||
requiredFieldTips:'Please fill in {field}',
|
||||
requiredFieldTipsWithPage:'Listing {index}: Please fill in {field}',
|
||||
priceMinMessage: 'Price cannot be less than HK$4',
|
||||
draftSaved: 'Draft Saved',
|
||||
draftDesc: 'Your listing has been saved as a draft. \nYou can continue editing or publish it later from My Listings.',
|
||||
listingLive:'Listing Live',
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
:gender-options="genderOptions"
|
||||
:category-options="categoryOptions"
|
||||
@update:product-name="currentListing.productName = $event"
|
||||
@update:price="currentListing.price = $event"
|
||||
@update:price="handleUpdatePrice"
|
||||
@update:desc="currentListing.desc = $event"
|
||||
@update:gender="handleUpdateGender"
|
||||
@update:category="currentListing.category = $event"
|
||||
@@ -171,6 +171,16 @@
|
||||
currentListing.value.category = null
|
||||
}
|
||||
|
||||
const handleUpdatePrice = (value: string) => {
|
||||
const num = Number(value)
|
||||
if (value && !Number.isNaN(num) && num < 4) {
|
||||
currentListing.value.price = "4"
|
||||
message.warning(t("SellerListEdit.priceMinMessage"))
|
||||
} else {
|
||||
currentListing.value.price = value
|
||||
}
|
||||
}
|
||||
|
||||
const previewImageMap = computed(() => ({
|
||||
sketch: currentListing.value.sketch,
|
||||
mainProductImage: currentListing.value.mainProductImage,
|
||||
|
||||
Reference in New Issue
Block a user