优化:添加商品时0库存商品无法保存改为可以保存

(cherry picked from commit dee8215da2)
pull/420/head
ZENGlei11350 2023-12-04 13:42:18 +08:00 committed by shizhong
parent 776fed6a5d
commit 7b0ff72a2b
2 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": true "source.fixAll.eslint": "explicit"
}, },
"[vue]": { "[vue]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint" "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"

View File

@ -197,7 +197,7 @@ defineOptions({ name: 'ProductSpuBasicInfoForm' })
const ruleConfig: RuleConfig[] = [ const ruleConfig: RuleConfig[] = [
{ {
name: 'stock', name: 'stock',
rule: (arg) => arg >= 1, rule: (arg) => arg >= 0,
message: '商品库存必须大于等于 1 ' message: '商品库存必须大于等于 1 '
}, },
{ {
@ -213,7 +213,7 @@ const ruleConfig: RuleConfig[] = [
{ {
name: 'costPrice', name: 'costPrice',
rule: (arg) => arg >= 0.01, rule: (arg) => arg >= 0.01,
message: '商品成本价格必须大于等于 0.01 元!!!' message: '商品成本价格必须大于等于 0.00 元!!!'
} }
] ]