【代码优化】商城: 满减活动范围支持分类多选

pull/547/head
puhui999 2024-09-10 15:11:57 +08:00
parent 4fcc33ec60
commit 1a0ff0215d
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@
label="分类"
prop="productCategoryIds"
>
<ProductCategorySelect v-model="formData.productCategoryIds" />
<ProductCategorySelect v-model="formData.productCategoryIds" :multiple="true" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注" />
@ -188,7 +188,7 @@ const getProductScope = async () => {
case PromotionProductScopeEnum.CATEGORY.scope:
await nextTick()
let productCategoryIds = formData.value.productScopeValues as any
if (Array.isArray(productCategoryIds) && productCategoryIds.length > 0) {
if (Array.isArray(productCategoryIds) && productCategoryIds.length === 1) {
// 使
productCategoryIds = productCategoryIds[0]
}