@ray-js/ray-ipc-half-horizontal-drag 0.0.2-beta-1 → 0.0.2-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.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
- import { IProps } from './props';
2
+ import { IProps, IPropDatas } from './props';
3
3
  declare const HalfHorizontalDrag: React.FC<IProps>;
4
+ export { type IProps, type IPropDatas };
4
5
  export default HalfHorizontalDrag;
package/lib/index.js CHANGED
@@ -13,6 +13,7 @@ const HalfHorizontalDrag = props => {
13
13
  } = props;
14
14
  const onCurRightImage = (e, data) => {
15
15
  onRightClick && onRightClick(data);
16
+ e.stopPropagation();
16
17
  };
17
18
  const onCurBgClick = (e, data) => {
18
19
  onBgClick && onBgClick(data);
@@ -27,29 +28,37 @@ const HalfHorizontalDrag = props => {
27
28
  return /*#__PURE__*/React.createElement(React.Fragment, null, datas.map(data => {
28
29
  return /*#__PURE__*/React.createElement(View, {
29
30
  className: `${styles.container_box} ${classBox} ${classNameBox}`,
30
- key: data.name
31
+ key: data.id
31
32
  }, /*#__PURE__*/React.createElement(View, {
32
- className: styles.container_box_content
33
+ className: styles.container_box_content,
34
+ onClick: e => onCurBgClick(e, data)
33
35
  }, /*#__PURE__*/React.createElement(Image, {
34
36
  className: styles.container_box_content_bg,
35
- mode: "widthFix",
37
+ mode: "aspectFill",
36
38
  src: data.bgImage
37
39
  }), /*#__PURE__*/React.createElement(View, {
40
+ style: {
41
+ flex: 1,
42
+ width: '100%',
43
+ display: 'flex',
44
+ flexDirection: 'row',
45
+ position: 'relative'
46
+ }
47
+ }, /*#__PURE__*/React.createElement(View, {
38
48
  style: {
39
49
  flex: 1,
40
50
  overflow: 'hidden'
41
- },
42
- onClick: e => onCurBgClick(e, data)
51
+ }
43
52
  }, /*#__PURE__*/React.createElement(View, {
44
53
  className: `${styles.container_box_content_name}`
45
54
  }, data.name), /*#__PURE__*/React.createElement(View, {
46
55
  className: `${styles.container_box_content_subName}`
47
56
  }, data.subName)), /*#__PURE__*/React.createElement(Image, {
48
57
  className: styles.container_box_content_icon,
49
- mode: "widthFix",
58
+ mode: "aspectFill",
50
59
  src: data.rightIcon,
51
60
  onClick: e => onCurRightImage(e, data)
52
- })));
61
+ }))));
53
62
  }));
54
63
  };
55
64
  return /*#__PURE__*/React.createElement(React.Fragment, null, (() => {
@@ -70,4 +79,5 @@ const HalfHorizontalDrag = props => {
70
79
  })());
71
80
  };
72
81
  HalfHorizontalDrag.displayName = 'HalfHorizontalDrag';
82
+ export {};
73
83
  export default HalfHorizontalDrag;
@@ -48,7 +48,6 @@
48
48
  top: 0;
49
49
  width: 100%;
50
50
  height: 100%;
51
- z-index: -1;
52
51
  }
53
52
 
54
53
  &_name {
package/lib/props.d.ts CHANGED
@@ -37,6 +37,11 @@ export interface IPropDatas {
37
37
  * @description.en name
38
38
  */
39
39
  name: string;
40
+ /**
41
+ * @description.zh 唯一标识
42
+ * @description.en id
43
+ */
44
+ id: string;
40
45
  /**
41
46
  * @description.zh 子名称
42
47
  * @description.en sub name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ray-ipc-half-horizontal-drag",
3
- "version": "0.0.2-beta-1",
3
+ "version": "0.0.2-beta-2",
4
4
  "description": "水平方向可拖动,显示出下一个组件的小部分内容",
5
5
  "main": "lib/index",
6
6
  "files": [