@ray-js/lamp-bead-strip 1.1.0-beta-1 → 1.1.0-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
@@ -1,4 +1,6 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ const _excluded = ["standardScale"];
2
4
  import React from 'react';
3
5
  import LampBeadStripRjs from './components';
4
6
  import { getSystemInfoRes } from './utils';
@@ -7,11 +9,15 @@ const {
7
9
  windowWidth = 375
8
10
  } = getSystemInfoRes();
9
11
  const LampBeadStrip = props => {
12
+ const {
13
+ standardScale = 1
14
+ } = props,
15
+ rest = _objectWithoutProperties(props, _excluded);
10
16
  // 组件缩放能力
11
17
 
12
18
  return /*#__PURE__*/React.createElement(LampBeadStripRjs, {
13
- prop: _objectSpread(_objectSpread({}, props), {}, {
14
- scale: props.scale || windowWidth / 375
19
+ prop: _objectSpread(_objectSpread({}, rest), {}, {
20
+ scale: rest.scale || windowWidth / 375 * standardScale
15
21
  })
16
22
  });
17
23
  };
package/lib/props.d.ts CHANGED
@@ -77,5 +77,12 @@ export interface IProps {
77
77
  * @version 1.1.0
78
78
  */
79
79
  customAnimationChangeTime?: number;
80
+ /**
81
+ * @description.zh 标准缩放比例,内部表达式: windowWidth / 375 * standardScale, 目的简化书写
82
+ * @description.en Standard scaling ratio, internal expression: windowWidth / 375 * standardScale, Purpose: Simplify Writing
83
+ * @default 1
84
+ * @version 1.1.0
85
+ */
86
+ standardScale?: number;
80
87
  }
81
88
  export declare const defaultProps: IProps;
package/lib/props.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Author: mjh
3
3
  * @Date: 2024-09-12 09:55:13
4
4
  * @LastEditors: mjh
5
- * @LastEditTime: 2025-01-20 10:16:33
5
+ * @LastEditTime: 2025-01-20 10:37:05
6
6
  * @Description:
7
7
  */
8
8
 
@@ -15,5 +15,6 @@ export const defaultProps = {
15
15
  contentValue: {},
16
16
  closeColor: 'rgb(58,58,58)',
17
17
  className: '',
18
- customAnimationChangeTime: 100
18
+ customAnimationChangeTime: 100,
19
+ standardScale: 1
19
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/lamp-bead-strip",
3
- "version": "1.1.0-beta-1",
3
+ "version": "1.1.0-beta-2",
4
4
  "description": "动画灯珠条带",
5
5
  "main": "lib/index",
6
6
  "files": [