Skip to content

Commit

Permalink
Update README.md and get ready for v1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixwong committed May 24, 2020
1 parent 5eb0064 commit f102ea7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@ yarn dev

For detailed explanation on how things work, checkout the [Vue Cli Guide](https://cli.vuejs.org/guide/).

**NOTE:**
**BREAKING CHANGES**

- Start from `^0.2.0`, we develop Demo pages with [**Yarn**](
https://yarnpkg.com/), [**Pug**](https://pugjs.org/), and [**Stylus**](http://stylus-lang.com/)
- Upgraded to **@vue/cli v4** from `^1.1.1`
- Upgraded to **@vue/cli v4** from `^1.1.1`.

**NOTE**

If you have trouble running `yarn dev` after the _^1.1.1_ upgrade, please try the following process:

1. Remove the existing `node_modules` folder and the `yarn.lock` in this repository's **root** directory.
2. Next, remove the `node_modules` folder and the `yarn.lock` in the **/demo** directory as well.
3. Go back to the repository's root, run `yarn install`, and `yarn dev:init` again.

---

Expand Down
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,21 +487,37 @@ Advance Keyboard support (enabled with `advanced-keyboard`):

Please be aware that after putting the `advanced-keyboard` on, hundreds of additional keyboard event listeners are going to be attached to the component. The amount of listeners depends on how many hours, minutes, and seconds value you enabled in the current Timepicker.

### Blur Delay

```html
<!-- Unit: million second -->
<vue-timepicker :blur-delay="500"></vue-timepicker>
```

Sets the blur delay time for the dropdown. Defaults to `300` if not set.

### Manual Input Support

```html
<vue-timepicker manual-input></vue-timepicker>
```
Let users add or change values through the `<input>` box besides the dropdown picker.

### Blur Delay
### Manual Input Timeout

```html
<!-- Unit: million second -->
<vue-timepicker :blur-delay="500"></vue-timepicker>
<vue-timepicker :manual-input-timeout="1500"></vue-timepicker>
```

Sets the blur delay time for the dropdown. Defaults to `300` if not set.
Works with **manual-input** mode. It sets the timeout for continuous input. Defaults to `1000` if not set.

**How It Works?**

For example, when a user focuses on the **hour** slot (`HH`) of a `"HH:mm"` formatted Timepicker (with the default value `1000`):

- **Case 1:** User first inputs `1`, and then inputs `2` _500ms_ later -> Timepicker takes `12` as the final value and set it to the `"HH"` slot.
- **Case 2:** User inputs `1`, and then presses the key `2` _1200ms_ later -> Timepicker takes `2` as the final value and set it to `02` for the `"HH"` slot.

### Lazy Event Mode

Expand Down Expand Up @@ -582,8 +598,9 @@ Prop | Type | Required | Default Value
**hide-disabled-seconds** | _Boolean_ | no | false
**hide-disabled-items** | _Boolean_ | no | false
**advanced-keyboard** | _Boolean_ | no | false
**manual-input** | _Boolean_ | no | false
**blur-delay** | _Number_ | no | 300
**manual-input** | _Boolean_ | no | false
**manual-input-timeout** | _Number_ | no | 1000
**lazy** | _Boolean_ | no | false
**auto-scroll** | _Boolean_ | no | false
**debug-mode** | _Boolean_ | no | false
Expand Down
1 change: 1 addition & 0 deletions demo/src/components/Playground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ section#playground
:manual-input="manualInput"
:hide-dropdown="toHideDropdown"
:blur-delay="blurDelay"
:manual-input-timeout="manualInputTimeout"
:hide-clear-button="hideClearBtn"
:disabled="disablePicker"
:lazy="lazyMode"
Expand Down

0 comments on commit f102ea7

Please sign in to comment.