@jswork/react-questkit 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +6 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1724,11 +1724,13 @@ function followReadActions({
|
|
|
1724
1724
|
readonly,
|
|
1725
1725
|
stage,
|
|
1726
1726
|
grade,
|
|
1727
|
+
attemptsLeft,
|
|
1727
1728
|
labels,
|
|
1728
1729
|
onNext
|
|
1729
1730
|
}) {
|
|
1730
1731
|
if (readonly) return onNext ? [{ key: "next", label: labels.next, onClick: onNext }] : [];
|
|
1731
|
-
|
|
1732
|
+
const finished = stage === "result" && grade && grade !== "noise" || attemptsLeft === 0;
|
|
1733
|
+
if (finished) {
|
|
1732
1734
|
return [{ key: "next", label: labels.next, onClick: onNext }];
|
|
1733
1735
|
}
|
|
1734
1736
|
return [];
|
|
@@ -2166,7 +2168,7 @@ function detailHint({
|
|
|
2166
2168
|
if (readonly) return mode === "lookup" ? labels.submitted : void 0;
|
|
2167
2169
|
if (noise) return labels.noiseHint;
|
|
2168
2170
|
if (grade === "again") return labels.againHint;
|
|
2169
|
-
if (
|
|
2171
|
+
if (attemptsLeft === 0) {
|
|
2170
2172
|
return `${maxAttempts} \u6B21${labels.attemptsUsedUp} \xB7 \u53D6\u6700\u540E\u4E00\u6B21\u6709\u6548\u5206`;
|
|
2171
2173
|
}
|
|
2172
2174
|
if (stage === "result") return labels.submitted;
|
|
@@ -2457,6 +2459,7 @@ function FollowRead({
|
|
|
2457
2459
|
readonly: model.readonly,
|
|
2458
2460
|
stage: model.stage,
|
|
2459
2461
|
grade: model.grade,
|
|
2462
|
+
attemptsLeft: model.attemptsLeft,
|
|
2460
2463
|
labels: model.labels,
|
|
2461
2464
|
onNext
|
|
2462
2465
|
});
|
|
@@ -7011,7 +7014,7 @@ function BlankInput2({
|
|
|
7011
7014
|
}
|
|
7012
7015
|
|
|
7013
7016
|
// src/index.tsx
|
|
7014
|
-
var version = "1.0.
|
|
7017
|
+
var version = "1.0.8";
|
|
7015
7018
|
var questkit = {
|
|
7016
7019
|
version,
|
|
7017
7020
|
QuestShell,
|