fix: 封装 SpuSelect SpuAndSkuList 为商品活动商品选择商品编辑通用组件

This commit is contained in:
puhui999
2023-06-25 16:43:49 +08:00
parent 76ccc54a35
commit 51e79f29cc
12 changed files with 229 additions and 177 deletions

View File

@@ -14,8 +14,19 @@ interface Properties {
}
interface RuleConfig {
name: string // 需要校验的字段
geValue: number // TODO 暂定大于一个数字
// 需要校验的字段
// 例name: 'name' 则表示校验 sku.name 的值
// 例name: 'productConfig.stock' 则表示校验 sku.productConfig.name 的值,此处 productConfig 表示我在 Sku 上扩展的属性
name: string
// 校验规格为一个毁掉函数,其中 arg 为需要校验的字段的值。
// 例需要校验价格必须大于0.01
// {
// name:'price',
// rule:(arg) => arg > 0.01
// }
rule: (arg: any) => boolean
// 校验不通过时的消息提示
message: string
}
/**