@ray-js/lamp-style-slider 0.0.2-beta-5 → 0.0.2-beta-7

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/lib/index.js CHANGED
@@ -21,6 +21,8 @@ function OpacitySlider(props) {
21
21
  min = _props$min === void 0 ? 0 : _props$min,
22
22
  _props$max = props.max,
23
23
  max = _props$max === void 0 ? 1000 : _props$max,
24
+ _props$rangeOffset = props.rangeOffset,
25
+ rangeOffset = _props$rangeOffset === void 0 ? 38 : _props$rangeOffset,
24
26
  value = props.value,
25
27
  style = props.style,
26
28
  _props$trackStyle = props.trackStyle,
@@ -32,7 +34,8 @@ function OpacitySlider(props) {
32
34
  disable = _props$disable === void 0 ? false : _props$disable,
33
35
  valueStyle = props.valueStyle,
34
36
  trackBackgroundColor = props.trackBackgroundColor,
35
- enableTouch = props.enableTouch,
37
+ _props$enableTouch = props.enableTouch,
38
+ enableTouch = _props$enableTouch === void 0 ? true : _props$enableTouch,
36
39
  onTouchStart = props.onTouchStart,
37
40
  onTouchMove = props.onTouchMove,
38
41
  onTouchEnd = props.onTouchEnd;
@@ -96,7 +99,7 @@ function OpacitySlider(props) {
96
99
  style: valueStyle
97
100
  }, textValue || "".concat(formatPercent(controllerValue, {
98
101
  min: min,
99
- max: 1000,
102
+ max: max,
100
103
  minPercent: min
101
104
  }), "%")));
102
105
  }(), /*#__PURE__*/React.createElement(View, {
@@ -115,7 +118,7 @@ function OpacitySlider(props) {
115
118
  end: controllerValue - min,
116
119
  step: 1,
117
120
  enableTouch: enableTouch,
118
- maxRangeOffset: 38,
121
+ maxRangeOffset: rangeOffset,
119
122
  bindstart: function handleTouchStart(_ref) {
120
123
  var detail = _ref.detail;
121
124
  if (!onTouchStart || disable) {
package/lib/props.d.ts CHANGED
@@ -53,6 +53,12 @@ export interface IProps {
53
53
  * @default 0
54
54
  */
55
55
  value: number;
56
+ /**
57
+ * @description.zh 滑块偏移量
58
+ * @description.en thumb offset
59
+ * @default 38
60
+ */
61
+ rangeOffset?: number;
56
62
  /**
57
63
  * @description.zh slider最小值
58
64
  * @description.en slider min value
package/lib/props.js CHANGED
@@ -4,7 +4,9 @@
4
4
  export var defaultProps = {
5
5
  value: 1,
6
6
  trackStyle: {},
7
+ enableTouch: true,
7
8
  trackBackgroundColor: 'transparent',
9
+ rangeOffset: 38,
8
10
  style: {},
9
11
  min: 0,
10
12
  max: 1000,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/lamp-style-slider",
3
- "version": "0.0.2-beta-5",
3
+ "version": "0.0.2-beta-7",
4
4
  "description": "照明样式的基础滑动条",
5
5
  "main": "lib/index",
6
6
  "files": [