@glodon-aiot/dataset-annotation 3.25.1-alpha.0 → 3.25.1-alpha.1

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.
@@ -154,17 +154,13 @@ const At = (b) => {
154
154
  return;
155
155
  const e = Z + 1;
156
156
  if (e >= u.length) {
157
+ if (D.current)
158
+ return;
157
159
  let n = I;
158
- if (x === "hascode" && (n = I - z - A), x === "nocode" && (n = z), x === "pending" && (n = A), (f.current - 1) * f.pageSize + e >= n)
159
- B.error("已经是最后一个了");
160
- else {
161
- if (D.current)
162
- return;
163
- D.current = !0, S((a) => g(m({}, a), {
164
- current: a.current + 1,
165
- type: "next"
166
- }));
167
- }
160
+ x === "hascode" && (n = I - z - A), x === "nocode" && (n = z), x === "pending" && (n = A), (f.current - 1) * f.pageSize + e >= n ? B.error("已经是最后一个了") : (D.current = !0, S((a) => g(m({}, a), {
161
+ current: a.current + 1,
162
+ type: "next"
163
+ })));
168
164
  } else {
169
165
  y(e);
170
166
  const n = u[e];
@@ -174,18 +170,14 @@ const At = (b) => {
174
170
  if (!u)
175
171
  return;
176
172
  const e = Z - 1;
177
- if (e < 0)
178
- if ((f.current - 1) * f.pageSize + e < 0)
179
- B.error("已经是第一个了");
180
- else {
181
- if (D.current)
182
- return;
183
- D.current = !0, S((r) => g(m({}, r), {
184
- current: r.current - 1,
185
- type: "prev"
186
- }));
187
- }
188
- else {
173
+ if (e < 0) {
174
+ if (D.current)
175
+ return;
176
+ (f.current - 1) * f.pageSize + e < 0 ? B.error("已经是第一个了") : (D.current = !0, S((r) => g(m({}, r), {
177
+ current: r.current - 1,
178
+ type: "prev"
179
+ })));
180
+ } else {
189
181
  y(e);
190
182
  const n = u[e];
191
183
  k(n);