@ray-js/lamp-style-slider 0.0.2-beta-2 → 0.0.2-beta-4

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
@@ -32,6 +32,7 @@ function OpacitySlider(props) {
32
32
  disable = _props$disable === void 0 ? false : _props$disable,
33
33
  valueStyle = props.valueStyle,
34
34
  trackBackgroundColor = props.trackBackgroundColor,
35
+ enableTouch = props.enableTouch,
35
36
  onTouchStart = props.onTouchStart,
36
37
  onTouchMove = props.onTouchMove,
37
38
  onTouchEnd = props.onTouchEnd;
@@ -99,7 +100,12 @@ function OpacitySlider(props) {
99
100
  minPercent: min
100
101
  }), "%")));
101
102
  }(), /*#__PURE__*/React.createElement(View, {
102
- style: trackStyle
103
+ style: _objectSpread({
104
+ width: '646rpx',
105
+ height: '56rpx',
106
+ position: 'relative',
107
+ borderRadius: '28rpx'
108
+ }, trackStyle)
103
109
  }, /*#__PURE__*/React.createElement(Slider, {
104
110
  instanceId: instanceId.current,
105
111
  min: 0,
@@ -108,7 +114,7 @@ function OpacitySlider(props) {
108
114
  disable: disable,
109
115
  end: controllerValue - min,
110
116
  step: 1,
111
- enableTouch: true,
117
+ enableTouch: enableTouch,
112
118
  maxRangeOffset: 38,
113
119
  bindstart: function handleTouchStart(_ref) {
114
120
  var detail = _ref.detail;
package/lib/props.d.ts CHANGED
@@ -3,19 +3,19 @@ export interface IProps {
3
3
  /**
4
4
  * @description.zh value文字样式
5
5
  * @description.en Value style
6
- * @default false
6
+ * @default {}
7
7
  */
8
8
  valueStyle?: React.CSSProperties;
9
9
  /**
10
10
  * @description.zh slider的背景颜色
11
11
  * @description.en Slider track background color
12
- * @default false
12
+ * @default '''
13
13
  */
14
14
  trackBackgroundColor?: string;
15
15
  /**
16
16
  * @description.zh 整体外层样式
17
17
  * @description.en Style
18
- * @default false
18
+ * @default {}
19
19
  */
20
20
  style?: React.CSSProperties;
21
21
  /**
@@ -27,13 +27,13 @@ export interface IProps {
27
27
  /**
28
28
  * @description.zh 值的标签,不传不显示标签和值
29
29
  * @description.en label
30
- * @default false
30
+ * @default ''
31
31
  */
32
32
  label?: string;
33
33
  /**
34
34
  * @description.zh 自定义值显示,不传默认按百分比显示
35
35
  * @description.en custom textValue
36
- * @default false
36
+ * @default '''
37
37
  */
38
38
  textValue?: string;
39
39
  /**
@@ -62,9 +62,15 @@ export interface IProps {
62
62
  /**
63
63
  * @description.zh slider值 最大值
64
64
  * @description.en slider max value
65
- * @default 0
65
+ * @default 1000
66
66
  */
67
67
  max?: number;
68
+ /**
69
+ * @description.zh 是否支持点击
70
+ * @description.en enable touch
71
+ * @default true
72
+ */
73
+ enableTouch?: boolean;
68
74
  /**
69
75
  * @description.zh slider 手指点击时触发
70
76
  * @description.en slider Value changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/lamp-style-slider",
3
- "version": "0.0.2-beta-2",
3
+ "version": "0.0.2-beta-4",
4
4
  "description": "照明样式的基础滑动条",
5
5
  "main": "lib/index",
6
6
  "files": [