@component-hook/picker 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @component-hook/picker
|
|
2
2
|
|
|
3
|
-
Picker component with vue3 and react ([DEMO](https://tzuyi0817.github.io/component-hook/#/component/picker))
|
|
3
|
+
Picker component with vue3 and react ([DEMO](https://tzuyi0817.github.io/component-hook/#/component/vue-picker))
|
|
4
4
|
|
|
5
5
|
<p>
|
|
6
6
|
<a href="https://npm-stat.com/charts.html?package=@component-hook/picker">
|
|
@@ -193,15 +193,15 @@ function onCancel() {
|
|
|
193
193
|
|
|
194
194
|
## Attributes (Common)
|
|
195
195
|
|
|
196
|
-
| Name | Required | Type | Description
|
|
197
|
-
| ------------ | -------- | --------------------- |
|
|
198
|
-
| isShowPicker | true | `boolean` | Control picker show (`vue` use `v-model`)
|
|
199
|
-
| anchor | true | `number` / `number[]` | Picker current select index (single column for `number`、 multiple columns for `
|
|
200
|
-
| data | false | `array` | Picker list `[1, 2, 3]` or `[[1, 2, 3], [1, 2, 3]]`
|
|
201
|
-
| type | false | `string` | Built-in picker type, no need to pass in data (date, time)
|
|
202
|
-
| showKey | false | `string` / `string[]` | Wheel options name (object key)
|
|
203
|
-
| swipeTime | false | `number` | Wheel swipe Time
|
|
204
|
-
| options | false | `object` | Custom text, color and class
|
|
196
|
+
| Name | Required | Type | Description | Default |
|
|
197
|
+
| ------------ | -------- | --------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------- |
|
|
198
|
+
| isShowPicker | true | `boolean` | Control picker show (`vue` use `v-model`) | — |
|
|
199
|
+
| anchor | true | `number` / `number[]` | Picker current select index (single column for `number`、 multiple columns for `number[]`, `vue` use `v-model`) | — |
|
|
200
|
+
| data | false | `array` | Picker list `[1, 2, 3]` or `[[1, 2, 3], [1, 2, 3]]` | — |
|
|
201
|
+
| type | false | `string` | Built-in picker type, no need to pass in data (date, time) | — |
|
|
202
|
+
| showKey | false | `string` / `string[]` | Wheel options name (object key) | — |
|
|
203
|
+
| swipeTime | false | `number` | Wheel swipe Time | 500 |
|
|
204
|
+
| options | false | `object` | Custom text, color and class | See below for details |
|
|
205
205
|
|
|
206
206
|
## Attributes (React)
|
|
207
207
|
|
|
@@ -231,4 +231,4 @@ function onCancel() {
|
|
|
231
231
|
| Event | Description | Type |
|
|
232
232
|
| :--------------------------------- | :------------------------------------------- | :---------------------------------------- |
|
|
233
233
|
| confirm(`vue`), onConfirm(`react`) | Triggered when the confirm button is clicked | `Function (value: selected item) => void` |
|
|
234
|
-
| cancel(`vue`),
|
|
234
|
+
| cancel(`vue`), onCancel(`react`) | Triggered when the cancel button is clicked | `Function () => void` |
|