@ray-js/lamp-style-slider 0.0.3-beta-6 → 0.0.3

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
@@ -63,7 +63,7 @@ function OpacitySlider(props) {
63
63
  wait: 80
64
64
  }).run;
65
65
  const endRefValue = useRef(-1);
66
- const instanceId = useRef(`Color_${String(+new Date()).slice(-4)}_${String(Math.random()).slice(-2)}`);
66
+ const instanceId = useRef(`Color_${String(+new Date()).slice(-4)}_${String(Math.random()).slice(-10)}`);
67
67
  const [controllerValue, setControllerValue] = useState(-1);
68
68
  useEffect(() => {
69
69
  if (!isMove.current && value !== controllerValue) {
@@ -103,7 +103,7 @@ function OpacitySlider(props) {
103
103
  borderRadius: '28rpx'
104
104
  }, trackStyle)
105
105
  }, /*#__PURE__*/React.createElement(Slider, {
106
- instanceId: instanceId.current,
106
+ instanceId: props.instanceId || instanceId.current,
107
107
  min: 0,
108
108
  max: max - min,
109
109
  disable: disable,
package/lib/props.d.ts CHANGED
@@ -1,5 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  export interface IProps {
3
+ /**
4
+ * @description.en instanceId
5
+ * @description.zh 实例id
6
+ */
7
+ instanceId?: string;
3
8
  /**
4
9
  * @description.zh value文字样式
5
10
  * @description.en Value style
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/lamp-style-slider",
3
- "version": "0.0.3-beta-6",
3
+ "version": "0.0.3",
4
4
  "description": "照明样式的基础滑动条",
5
5
  "main": "lib/index",
6
6
  "files": [
@@ -59,7 +59,7 @@
59
59
  ]
60
60
  },
61
61
  "dependencies": {
62
- "@ray-js/components-ty-slider": "0.2.36-beta-6"
62
+ "@ray-js/components-ty-slider": "^0.2.36"
63
63
  },
64
64
  "maintainers": [
65
65
  {