@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.mjs
CHANGED
|
@@ -1654,11 +1654,13 @@ function followReadActions({
|
|
|
1654
1654
|
readonly,
|
|
1655
1655
|
stage,
|
|
1656
1656
|
grade,
|
|
1657
|
+
attemptsLeft,
|
|
1657
1658
|
labels,
|
|
1658
1659
|
onNext
|
|
1659
1660
|
}) {
|
|
1660
1661
|
if (readonly) return onNext ? [{ key: "next", label: labels.next, onClick: onNext }] : [];
|
|
1661
|
-
|
|
1662
|
+
const finished = stage === "result" && grade && grade !== "noise" || attemptsLeft === 0;
|
|
1663
|
+
if (finished) {
|
|
1662
1664
|
return [{ key: "next", label: labels.next, onClick: onNext }];
|
|
1663
1665
|
}
|
|
1664
1666
|
return [];
|
|
@@ -2096,7 +2098,7 @@ function detailHint({
|
|
|
2096
2098
|
if (readonly) return mode === "lookup" ? labels.submitted : void 0;
|
|
2097
2099
|
if (noise) return labels.noiseHint;
|
|
2098
2100
|
if (grade === "again") return labels.againHint;
|
|
2099
|
-
if (
|
|
2101
|
+
if (attemptsLeft === 0) {
|
|
2100
2102
|
return `${maxAttempts} \u6B21${labels.attemptsUsedUp} \xB7 \u53D6\u6700\u540E\u4E00\u6B21\u6709\u6548\u5206`;
|
|
2101
2103
|
}
|
|
2102
2104
|
if (stage === "result") return labels.submitted;
|
|
@@ -2387,6 +2389,7 @@ function FollowRead({
|
|
|
2387
2389
|
readonly: model.readonly,
|
|
2388
2390
|
stage: model.stage,
|
|
2389
2391
|
grade: model.grade,
|
|
2392
|
+
attemptsLeft: model.attemptsLeft,
|
|
2390
2393
|
labels: model.labels,
|
|
2391
2394
|
onNext
|
|
2392
2395
|
});
|
|
@@ -6941,7 +6944,7 @@ function BlankInput2({
|
|
|
6941
6944
|
}
|
|
6942
6945
|
|
|
6943
6946
|
// src/index.tsx
|
|
6944
|
-
var version = "1.0.
|
|
6947
|
+
var version = "1.0.8";
|
|
6945
6948
|
var questkit = {
|
|
6946
6949
|
version,
|
|
6947
6950
|
QuestShell,
|