@ray-js/lamp-style-slider 0.0.2-beta-6 → 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,
@@ -97,7 +99,7 @@ function OpacitySlider(props) {
97
99
  style: valueStyle
98
100
  }, textValue || "".concat(formatPercent(controllerValue, {
99
101
  min: min,
100
- max: 1000,
102
+ max: max,
101
103
  minPercent: min
102
104
  }), "%")));
103
105
  }(), /*#__PURE__*/React.createElement(View, {
@@ -116,7 +118,7 @@ function OpacitySlider(props) {
116
118
  end: controllerValue - min,
117
119
  step: 1,
118
120
  enableTouch: enableTouch,
119
- maxRangeOffset: 38,
121
+ maxRangeOffset: rangeOffset,
120
122
  bindstart: function handleTouchStart(_ref) {
121
123
  var detail = _ref.detail;
122
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
@@ -6,6 +6,7 @@ export var defaultProps = {
6
6
  trackStyle: {},
7
7
  enableTouch: true,
8
8
  trackBackgroundColor: 'transparent',
9
+ rangeOffset: 38,
9
10
  style: {},
10
11
  min: 0,
11
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-6",
3
+ "version": "0.0.2-beta-7",
4
4
  "description": "照明样式的基础滑动条",
5
5
  "main": "lib/index",
6
6
  "files": [