修复商品库存与网络摘要并校验订购编号
This commit is contained in:
1 parent
28894e0813
commit
d8224ec5b7
15 files changed
+529
-68
No files matched your search
@@ -0,0 +1,11 @@
|
||||
/** radio 的 value 是可选值;step/total 的 value 可能只是占位,默认值应从区间下限读取。 */
|
||||
export function resourceOptionValue(option) {
|
||||
if (!option) return;
|
||||
const value =
|
||||
option.type === "step" || option.type === "total"
|
||||
? (option.min_value ?? option.value)
|
||||
: option.value;
|
||||
if (value == null || value === "") return;
|
||||
const number = Number(value);
|
||||
return Number.isFinite(number) ? number : undefined;
|
||||
}
|
||||
Reference in new issue
Block a user