@ray-js/ray-ipc-half-horizontal-drag 0.0.4-beta-1 → 0.0.4-beta-2

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
@@ -3,6 +3,7 @@ import "core-js/modules/esnext.iterator.map.js";
3
3
  import React from 'react';
4
4
  import { View } from '@ray-js/ray';
5
5
  import clsx from 'clsx';
6
+ import { v4 as uuidv4 } from 'uuid';
6
7
  import styles from './index.module.less';
7
8
  const NILL = () => null;
8
9
  const HalfHorizontalDrag = props => {
@@ -41,6 +42,7 @@ const HalfHorizontalDrag = props => {
41
42
  }, tag)));
42
43
  }
43
44
  if (data.length === 2) {
45
+ const key = uuidv4();
44
46
  return /*#__PURE__*/React.createElement(View, {
45
47
  className: clsx(styles.content, styles.towContent, className)
46
48
  }, data.map(item => {
@@ -52,6 +54,8 @@ const HalfHorizontalDrag = props => {
52
54
  onClick = NILL
53
55
  } = item;
54
56
  return /*#__PURE__*/React.createElement(View, {
57
+ key: key // eslint-disable-line
58
+ ,
55
59
  style: _objectSpread(_objectSpread({}, item.style), {}, {
56
60
  backgroundImage: item.backgroundImage ? `url(${item.backgroundImage})` : undefined,
57
61
  background: item.background || undefined
@@ -69,6 +73,7 @@ const HalfHorizontalDrag = props => {
69
73
  }));
70
74
  }
71
75
  if (data.length >= 3) {
76
+ const key = uuidv4();
72
77
  return /*#__PURE__*/React.createElement(View, {
73
78
  className: clsx(styles.content, styles.moreContent, className)
74
79
  }, data.map(item => {
@@ -80,6 +85,8 @@ const HalfHorizontalDrag = props => {
80
85
  onClick = NILL
81
86
  } = item;
82
87
  return /*#__PURE__*/React.createElement(View, {
88
+ key: key // eslint-disable-line
89
+ ,
83
90
  style: _objectSpread(_objectSpread({}, item.style), {}, {
84
91
  backgroundImage: item.backgroundImage ? `url(${item.backgroundImage})` : undefined,
85
92
  background: item.background || undefined
package/lib/props.d.ts CHANGED
@@ -27,14 +27,4 @@ export interface IProps {
27
27
  * @description.en Style
28
28
  */
29
29
  style?: React.CSSProperties;
30
- /**
31
- * @description.zh 点击事件
32
- * @description.en bg image
33
- */
34
- onBgClick?: (data: Data) => void;
35
- /**
36
- * @description.zh 点击事件
37
- * @description.en bg image
38
- */
39
- onRightClick?: (data: Data) => void;
40
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ray-ipc-half-horizontal-drag",
3
- "version": "0.0.4-beta-1",
3
+ "version": "0.0.4-beta-2",
4
4
  "description": "水平方向可拖动,显示出下一个组件的小部分内容",
5
5
  "main": "lib/index",
6
6
  "files": [
@@ -34,19 +34,20 @@
34
34
  "@ray-js/ray": "^1.4.9"
35
35
  },
36
36
  "dependencies": {
37
- "clsx": "^1.2.1"
37
+ "clsx": "^1.2.1",
38
+ "uuid": "^11.0.4"
38
39
  },
39
40
  "devDependencies": {
40
41
  "@commitlint/cli": "^7.2.1",
41
42
  "@commitlint/config-conventional": "^9.0.1",
42
43
  "@ray-js/cli": "^1.4.9",
44
+ "@ray-js/panel-sdk": "^1.13.0-storage.7",
43
45
  "@ray-js/ray": "^1.4.9",
44
46
  "core-js": "^3.19.1",
45
47
  "eslint-config-tuya-panel": "^0.4.2",
46
48
  "husky": "^1.2.0",
47
49
  "lint-staged": "^10.2.11",
48
- "standard-version": "9.3.2",
49
- "@ray-js/panel-sdk": "^1.13.0-storage.7"
50
+ "standard-version": "9.3.2"
50
51
  },
51
52
  "resolutions": {
52
53
  "@ray-js/builder-mp": "1.4.15"