@ray-js/ray-ipc-half-horizontal-drag 0.0.4-beta-1 → 0.0.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
@@ -43,7 +43,7 @@ const HalfHorizontalDrag = props => {
43
43
  if (data.length === 2) {
44
44
  return /*#__PURE__*/React.createElement(View, {
45
45
  className: clsx(styles.content, styles.towContent, className)
46
- }, data.map(item => {
46
+ }, data.map((item, idx) => {
47
47
  const {
48
48
  title,
49
49
  tag,
@@ -52,6 +52,8 @@ const HalfHorizontalDrag = props => {
52
52
  onClick = NILL
53
53
  } = item;
54
54
  return /*#__PURE__*/React.createElement(View, {
55
+ key: idx // eslint-disable-line
56
+ ,
55
57
  style: _objectSpread(_objectSpread({}, item.style), {}, {
56
58
  backgroundImage: item.backgroundImage ? `url(${item.backgroundImage})` : undefined,
57
59
  background: item.background || undefined
@@ -71,7 +73,7 @@ const HalfHorizontalDrag = props => {
71
73
  if (data.length >= 3) {
72
74
  return /*#__PURE__*/React.createElement(View, {
73
75
  className: clsx(styles.content, styles.moreContent, className)
74
- }, data.map(item => {
76
+ }, data.map((item, idx) => {
75
77
  const {
76
78
  title,
77
79
  tag,
@@ -79,7 +81,10 @@ const HalfHorizontalDrag = props => {
79
81
  tagClassName,
80
82
  onClick = NILL
81
83
  } = item;
82
- return /*#__PURE__*/React.createElement(View, {
84
+ return /*#__PURE__*/React.createElement(View
85
+ // eslint-disable-next-line react/no-array-index-key
86
+ , {
87
+ key: idx,
83
88
  style: _objectSpread(_objectSpread({}, item.style), {}, {
84
89
  backgroundImage: item.backgroundImage ? `url(${item.backgroundImage})` : undefined,
85
90
  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",
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"