freeCodeCamp/curriculum/challenges/chinese/03-front-end-libraries/front-end-libraries-projects/build-a-pomodoro-clock.chin...

39 lines
7.1 KiB
Markdown
Raw Normal View History

---
id: bd7158d8c442eddfaeb5bd0f
title: Build a Pomodoro Clock
isRequired: true
challengeType: 3
videoUrl: ''
localeTitle: 建立一个番茄钟
---
## Description
<section id="description"> <strong>目标:</strong>构建一个功能类似于此的<a href="https://codepen.io" target="_blank">CodePen.io</a>应用程序: <a href="https://codepen.io/freeCodeCamp/full/XpKrrW" target="_blank">https</a> <strong></strong> <a href="https://codepen.io" target="_blank">//codepen.io/freeCodeCamp/full/XpKrrW</a> 。完成以下<a href="https://en.wikipedia.org/wiki/User_story" target="_blank">用户故事</a>并通过所有测试。给它你自己的个人风格。您可以使用HTMLJavaScriptCSSBootstrapSASSReactRedux和jQuery的任意组合来完成此项目。您应该使用前端框架例如React因为本节是关于学习前端框架的。不建议使用上面未列出的其他技术使用它们的风险由您自行承担。我们正在寻求支持其他前端框架如Angular和Vue但目前不支持它们。我们将接受并尝试修复所有使用建议的技术堆栈的问题报告。快乐的编码 <strong>用户故事1</strong>我可以看到一个<code>id=&quot;break-label&quot;</code>的元素其中包含一个字符串例如“Break Length”<strong>用户故事2</strong>我可以看到一个<code>id=&quot;session-label&quot;</code>的元素其中包含一个字符串例如“Session Length”<strong>用户故事3</strong>我可以看到两个具有相应ID的可点击元素 <code>id=&quot;break-decrement&quot;</code><code>id=&quot;session-decrement&quot;</code><strong>用户故事4</strong>我可以看到两个具有相应ID的可点击元素 <code>id=&quot;break-increment&quot;</code><code>id=&quot;session-increment&quot;</code><strong>用户故事5</strong>我可以看到一个具有相应<code>id=&quot;break-length&quot;</code>的元素默认情况下加载时显示值5. <strong>用户故事6</strong>我可以看到一个元素具有相应的<code>id=&quot;session-length&quot;</code> 默认情况下显示值25. <strong>用户故事7</strong>我可以看到一个具有相应<code>id=&quot;timer-label&quot;</code>的元素其中包含一个表示会话已初始化的字符串例如”Session“<strong>用户故事8</strong>我可以看到一个对应<code>id=&quot;time-left&quot;</code>的元素。注意:暂停或运行时,此字段中的值应始终以<code>mm:ss</code>格式显示即25:00<strong>用户故事9</strong>我可以看到一个具有相应<code>id=&quot;start_stop&quot;</code>的可点击元素。 <strong>用户故事10</strong>我可以看到一个具有相应<code>id=&quot;reset&quot;</code>的可点击元素。 <strong>用户故事11</strong>当我单击id为<code>reset</code>的元素时,应该停止任何正在运行的计时器, <code>id=&quot;break-length&quot;</code>的值应该返回<code>5</code> <code>id=&quot;session-length&quot;</code>应该返回到25并且<code>id=&quot;time-left&quot;</code>的元素应该重置为它的默认状态。 <strong>用户故事12</strong>当我单击id为<code>break-decrement</code>的元素时, <code>id=&quot;break-length&quot;</code>的值会减1我可以看到更新后的值。 <strong>用户故事13</strong>当我单击id为<code>break-increment</code>的元素时, <code>id=&quot;break-length&quot;</code>的值会增加1我可以看到更新后的值。 <strong>用户故事14</strong>当我单击<code>session-decrement</code> id的元素时 <code>id=&quot;session-length&quot;</code>的值减1我可以看到更新后的值。 <strong>用户故事15</strong>当我单击<code>session-increment</code>为id的元素时 <code>id=&quot;session-length&quot;</code>的值会增加1我可以看到更新后的值。 <strong>用户故事16</strong>我不能将会话或休息长度设置为&lt;= 0. <strong>用户故事17</strong>我不能将会话或休息时间设置为&gt; 60. <strong>用户故事18</strong>当我首先单击<code>id=&quot;start_stop&quot;</c
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests: []
```
</section>
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>