@hi-ui/time-picker 4.0.0-alpha.12 → 4.0.0-alpha.13

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.
Files changed (2) hide show
  1. package/README.md +37 -7
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -1,11 +1,41 @@
1
- # `@hi-ui/time-picker`
1
+ # TimePicker 时间选择器
2
2
 
3
- > TODO: description
3
+ ## 使用示例
4
4
 
5
- ## Usage
5
+ <!-- Inject Stories -->
6
6
 
7
- ```
8
- const TimePicker = require('@hi-ui/time-picker');
7
+ ## Props
9
8
 
10
- // TODO: DEMONSTRATE API
11
- ```
9
+ | 参数 | 说明 | 类型 | 可选值 | 默认值 |
10
+ | --------------- | -------- | ---------------------------------------------------------------------- | ------------------------ | --------- |
11
+ | type | 选择器类型 | string | 'default' \| 'timerange' | 'default' |
12
+ | value | 显示的日期 | Date \| string \| number \| object \| - | - | - |
13
+ | format | 格式化时间 | string | - | - |
14
+ | inputReadOnly | 设置输入框为只读 | boolean | true \| false | false |
15
+ | bordered | 是否有边框 | boolean | true \| false | true |
16
+ | hourStep | 小时选项间隔 | number | - | 1 |
17
+ | minuteStep | 分钟选项间隔 | number | - | 1 |
18
+ | secondStep | 秒选项间隔 | number | - | 1 |
19
+ | disabled | 是否禁用 | boolean | true \| false | false |
20
+ | placeholder | 设置输入框占位 | string \| string[] | - | - |
21
+ | disabledHours | 禁止选择的小时 | () => number[] \| number[] | - | - |
22
+ | disabledMinutes | 禁止选择的分钟 | (selectedHour: number) => number[] \| number[] | - | - |
23
+ | disabledSeconds | 禁止选择的秒数 | (selectedHour: number, selectedMinute: number) => number[] \| number[] | - | - |
24
+
25
+ ## Events
26
+
27
+ | 名称 | 说明 | 类型 | 参数 | 返回值 |
28
+ | -------- | ------ | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | --- |
29
+ | onChange | 选择后的回调 | (date: Date \| DateRange, dateStr: string \| DateRange ) => void | date: 选中的日期(普通选择) \| 选中的日期范围{start: Date, end: Date}(范围选择) <br/> dateStr: 选中的日期字符串(普通选择) \| 选中的日期字符串对象{start: string, end: string}(范围选择) | - |
30
+
31
+ ## CHANGELOG
32
+
33
+ | 参数 | 变更类型 | 变更内容 | 解决的问题 |
34
+ | --------------------------------------------- | ------- | ---------------------------------- | ------------------- |
35
+ | disabledHours、disabledMinutes、disabledSeconds | feature | 函数式方法集体最后添加参数 panel,代表当前计算的是开始还是结束 | 无法根据开始结束对特定panel做限制 |
36
+ | value | update | 类型变更为 string[] | 类型收敛 |
37
+ | defaultValue | feature | 新增非受控态 | |
38
+ | placeholder | update | 类型变更为 string[] | 类型收敛 |
39
+ | itemHeight | feature | 新增选择器高 | |
40
+ | fullDisplayItemNumber | feature | 完全展示Item的数目 | |
41
+ | onChange | update | 参数类型变更为 string[] | 类型收敛 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/time-picker",
3
- "version": "4.0.0-alpha.12",
3
+ "version": "4.0.0-alpha.13",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HIUI <mi-hiui@xiaomi.com>",
@@ -44,14 +44,14 @@
44
44
  "url": "https://github.com/XiaoMi/hiui/issues"
45
45
  },
46
46
  "dependencies": {
47
- "@hi-ui/button": "^4.0.0-alpha.20",
47
+ "@hi-ui/button": "^4.0.0-alpha.21",
48
48
  "@hi-ui/classname": "^4.0.0-alpha.3",
49
49
  "@hi-ui/core": "^4.0.0-alpha.17",
50
50
  "@hi-ui/core-css": "^4.0.0-alpha.13",
51
51
  "@hi-ui/env": "^4.0.0-alpha.5",
52
- "@hi-ui/icons": "^4.0.0-alpha.24",
53
- "@hi-ui/popper": "^4.0.0-alpha.20",
54
- "@hi-ui/use-uncontrolled-state": "^4.0.0-alpha.12"
52
+ "@hi-ui/icons": "^4.0.0-alpha.25",
53
+ "@hi-ui/popper": "^4.0.0-alpha.21",
54
+ "@hi-ui/use-uncontrolled-state": "^4.0.0-alpha.13"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "react": ">=16.8.6",
@@ -62,5 +62,5 @@
62
62
  "react": "^17.0.1",
63
63
  "react-dom": "^17.0.1"
64
64
  },
65
- "gitHead": "88a8b8aa1b659b247bfca62f2f8ba594c25b90f6"
65
+ "gitHead": "5a8f028a385e4a547748df37875653cfb416beb9"
66
66
  }