Skip to content

Commit

Permalink
fix(Description): slove valueType as Second calc problem (#7929)
Browse files Browse the repository at this point in the history
* fix: slove valueType as Second calc problem

* fix: update snapshot
  • Loading branch information
ONLY-yours committed Nov 28, 2023
1 parent e8ca845 commit 81249b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/field/src/components/Second/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type FieldDigitProps = {
export function formatSecond(result: number) {
let formatText = '';
const d = Math.floor(result / (3600 * 24));
const h = Math.floor(result / 3600);
const h = Math.floor((result / 3600) % 24);
const m = Math.floor((result / 60) % 60);
const s = Math.floor(result % 60);
formatText = `${s}秒`;
Expand Down
2 changes: 1 addition & 1 deletion tests/field/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/base.tsx correctl
class="ant-descriptions-item-content"
>
<span>
23天555小时33分钟20秒
23天3小时33分钟20秒
</span>
</span>
</div>
Expand Down

0 comments on commit 81249b3

Please sign in to comment.