mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-08-09 23:51:52 +08:00
fix: 数组操作添加 ? 可选操作符,避免属性值为 null 时报错
This commit is contained in:
@@ -104,7 +104,7 @@ const getDetail = async () => {
|
||||
formLoading.value = true
|
||||
try {
|
||||
const res = (await ProductSpuApi.getSpu(id)) as ProductSpuApi.Spu
|
||||
res.skus!.forEach((item) => {
|
||||
res.skus?.forEach((item) => {
|
||||
// 回显价格分转元
|
||||
item.price = formatToFraction(item.price)
|
||||
item.marketPrice = formatToFraction(item.marketPrice)
|
||||
|
Reference in New Issue
Block a user