From f102ea74ed5f290fe53d5b2d7105ca1dff6e596d Mon Sep 17 00:00:00 2001 From: Phoenix Wong Date: Mon, 25 May 2020 00:09:41 +0800 Subject: [PATCH] Update README.md and get ready for v1.1.1 --- CONTRIBUTING.md | 12 ++++++++++-- README.md | 25 +++++++++++++++++++++---- demo/src/components/Playground.vue | 1 + 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1c5a953..99eff46 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. --- diff --git a/README.md b/README.md index 64823ee..78eab6d 100644 --- a/README.md +++ b/README.md @@ -487,6 +487,15 @@ 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 + + +``` + +Sets the blur delay time for the dropdown. Defaults to `300` if not set. + ### Manual Input Support ```html @@ -494,14 +503,21 @@ Please be aware that after putting the `advanced-keyboard` on, hundreds of addit ``` Let users add or change values through the `` box besides the dropdown picker. -### Blur Delay +### Manual Input Timeout ```html - + ``` -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 @@ -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 diff --git a/demo/src/components/Playground.vue b/demo/src/components/Playground.vue index a27964a..3d482cf 100644 --- a/demo/src/components/Playground.vue +++ b/demo/src/components/Playground.vue @@ -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"