From 055556a8be44309b160cea732742e3bf20792c15 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Fri, 2 Oct 2020 17:38:26 +0900 Subject: [PATCH] Add range default value to documentation --- docs/widgets/README.md | 63 +++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- yarn.lock | 8 +++--- 3 files changed, 67 insertions(+), 6 deletions(-) diff --git a/docs/widgets/README.md b/docs/widgets/README.md index 3e3d8f8..88c5d09 100644 --- a/docs/widgets/README.md +++ b/docs/widgets/README.md @@ -369,7 +369,7 @@ DIALOG meetingTime ## Range -The `range` widget lets users choose a number between `min` and `max` values that the scriptwriter chooses. The scriptwriter can also choose an optional `unit` label. +The `range` widget lets users choose a number between `min` and `max` values that the scriptwriter chooses. The scriptwriter can also add an optional `default` value, and choose an optional `unit` label.

@@ -427,6 +427,67 @@ RUN minutesQuestion ``` +
+ +With default value: + + +``` +DIALOG minutesQuestion + TEMPLATE range + { + formText: "Minutes", + min: 1, + max: 200, + default: 100, + unit: "分" + } + "How long did it take?" + >>minutes + /TEMPLATE +/DIALOG +RUN minutesQuestion +``` + + + +``` +DIALOG minutesQuestion + TEMPLATE range + { + formText: "Minutes", + min: 1, + max: 200, + default: 100, + unit: "分" + } + "How long did it take?" + >>minutes + /TEMPLATE +/DIALOG +RUN minutesQuestion +``` + + + +``` +DIALOG minutesQuestion + TEMPLATE range + { + formText: "Minutes", + min: 1, + max: 200, + default: 100, + unit: "分" + } + "How long did it take?" + >>minutes + /TEMPLATE +/DIALOG +RUN minutesQuestion +``` + + ## Dynamic-list The `dynamic-list` widget lets users enter items into a list. The variable is stored as an array in the `UpilInstance`. The scriptwriter can also pass an optional `placeholder` label. diff --git a/package.json b/package.json index fe95275..2fec95d 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@appsocially/userpil-core": "^1.1.10", - "@appsocially/vue-upil": "^2.4.2", + "@appsocially/vue-upil": "^2.4.4", "core-js": "^3.6.5", "vee-validate": "^3.3.7", "vue": "^2.6.11", diff --git a/yarn.lock b/yarn.lock index 157db51..a4ca8a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -37,10 +37,10 @@ redux "^4.0.1" vue-loader "^15.7.1" -"@appsocially/vue-upil@^2.4.2": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@appsocially/vue-upil/-/vue-upil-2.4.2.tgz#c48146d2859e44a6d6e26f23400a043de8af9989" - integrity sha512-EUEb8o6CPzLgdaEqL8I/bLdsqR/Y5u0OzMhHwq/zr8SLpp94YSkDSP2C61EUFILfHunS2cyrrSuMcGK/VcDU7g== +"@appsocially/vue-upil@^2.4.4": + version "2.4.4" + resolved "https://registry.yarnpkg.com/@appsocially/vue-upil/-/vue-upil-2.4.4.tgz#a8cda2e8675ef74bede13646aac973ff1001e7b2" + integrity sha512-rIfXWHsMPbz/4aSB9D8VxyzwE7KnP0gbYQqT/UhNC8DJ2x5jczX9szGQBb77y19KlL5l0RDPqrDMa92eTHnNTw== dependencies: core-js "^3.6.4" date-fns "^2.15.0"