提交 5cd99fb3 authored 作者: zyx's avatar zyx

添加默认值

上级 4c93350c
...@@ -43,7 +43,7 @@ const score = $computed(() => { ...@@ -43,7 +43,7 @@ const score = $computed(() => {
// 提交 // 提交
function handleSubmit() { function handleSubmit() {
const scores = tableList.map((item: any) => { const scores = tableList.map((item: any) => {
if (item.type === 2) { item.score = 0 } if (item.type === '2') { item.score = 0 }
return { id: item.id, score: item.score } return { id: item.id, score: item.score }
}) })
const params = { id: detail.id, scores: JSON.stringify(scores) } const params = { id: detail.id, scores: JSON.stringify(scores) }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论