Commit f8b21bc26e0928e6a1d86fa38afd6353abd91d80
1 parent
c75a83ef
分数设置问题
Showing
1 changed file
with
3 additions
and
3 deletions
src/views/basic/test/components/scoreSet.vue
@@ -157,9 +157,9 @@ export default { | @@ -157,9 +157,9 @@ export default { | ||
157 | }, | 157 | }, |
158 | }, | 158 | }, |
159 | methods: { | 159 | methods: { |
160 | - setScore(val, max, obj, keys) { | ||
161 | - if (val > max) { | ||
162 | - obj[keys] = max; | 160 | + setScore(val, max, obj, questionId) { |
161 | + if (max && Number(val) > Number(max)) { | ||
162 | + obj[questionId] = max; | ||
163 | } | 163 | } |
164 | }, | 164 | }, |
165 | closeScoreSet() { | 165 | closeScoreSet() { |