@ray-js/lamp-saturation-slider 1.1.1-beta-1 → 1.1.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 +12 -12
- package/lib/props.d.ts +0 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,12 +23,6 @@ export interface IProps {
|
|
|
23
23
|
* @default false
|
|
24
24
|
*/
|
|
25
25
|
disable?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* @description.zh slider方向
|
|
28
|
-
* @description.en slider direction
|
|
29
|
-
* @default horizontal
|
|
30
|
-
*/
|
|
31
|
-
direction?: 'horizontal' | 'vertical';
|
|
32
26
|
/**
|
|
33
27
|
* @description.zh 滑动槽样式
|
|
34
28
|
* @description.en
|
|
@@ -41,6 +35,12 @@ export interface IProps {
|
|
|
41
35
|
* @default 0
|
|
42
36
|
*/
|
|
43
37
|
value: number;
|
|
38
|
+
/**
|
|
39
|
+
* @description.zh slider 展示的颜色值 对应hsv的hue
|
|
40
|
+
* @description.en slider value
|
|
41
|
+
* @default 0
|
|
42
|
+
*/
|
|
43
|
+
hue: number; // 0 - 359
|
|
44
44
|
/**
|
|
45
45
|
* @description.zh slider 手指点击时触发
|
|
46
46
|
* @description.en slider Value changes
|
|
@@ -73,21 +73,21 @@ export const defaultProps: IProps = {
|
|
|
73
73
|
import { LampSaturationSlider } from '@ray-js/components-ty-lamp';
|
|
74
74
|
|
|
75
75
|
export default () => {
|
|
76
|
-
const [
|
|
76
|
+
const [saturation, setSaturation] = useState(100);
|
|
77
77
|
|
|
78
78
|
useEffect(() => {
|
|
79
|
-
//
|
|
79
|
+
// 模拟dp上报
|
|
80
80
|
setTimeout(() => {
|
|
81
|
-
|
|
81
|
+
setSaturation(321);
|
|
82
82
|
}, 3000);
|
|
83
83
|
}, []);
|
|
84
84
|
|
|
85
85
|
return (
|
|
86
86
|
<LampSaturationSlider
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
hue={100}
|
|
88
|
+
value={saturation}
|
|
89
89
|
onTouchEnd={val => {
|
|
90
|
-
|
|
90
|
+
setSaturation(val);
|
|
91
91
|
}}
|
|
92
92
|
/>
|
|
93
93
|
);
|
package/lib/props.d.ts
CHANGED
|
@@ -6,12 +6,6 @@ export interface IProps {
|
|
|
6
6
|
* @default false
|
|
7
7
|
*/
|
|
8
8
|
disable?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* @description.zh slider方向
|
|
11
|
-
* @description.en slider direction
|
|
12
|
-
* @default horizontal
|
|
13
|
-
*/
|
|
14
|
-
direction?: "horizontal" | "vertical";
|
|
15
9
|
/**
|
|
16
10
|
* @description.zh 滑动槽样式
|
|
17
11
|
* @description.en Sliding groove style
|