From e94ff515740dc03d1ad28867e154afd0aadcfa5f Mon Sep 17 00:00:00 2001 From: unknown <2391580279@qq.com> Date: Wed, 15 May 2024 17:13:29 +0800 Subject: [PATCH] fix: toggle pageNum --- src/views/Rating/modal.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/views/Rating/modal.js b/src/views/Rating/modal.js index c9a50792..6a7e92bb 100644 --- a/src/views/Rating/modal.js +++ b/src/views/Rating/modal.js @@ -130,6 +130,12 @@ function RatingModal({ data, isMobile, onFinish }, ref) { setPage(page); selectOpenQs = list[newPage]; setSelectOpenQs({ ...selectOpenQs }); + const obj = { + score: selectOpenQs?.rate ? Number((selectOpenQs?.rate * 0.2 * selectOpenQs.score).toFixed(1)) : null, + annotation: selectOpenQs?.annotation || "" + } + rateCache = obj; + setRateCache({...rateCache}); } function setAnnotation(text) {