@ray-js/components 1.7.56-beta.0 → 1.7.56-beta.10

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.
@@ -0,0 +1,208 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import "core-js/modules/es.string.trim.js";
3
+ import "core-js/modules/esnext.iterator.constructor.js";
4
+ import "core-js/modules/esnext.iterator.filter.js";
5
+ import "core-js/modules/esnext.iterator.map.js";
6
+ import "core-js/modules/web.dom-collections.iterator.js";
7
+ // @ts-nocheck
8
+ /**
9
+ * TyAnimated - 高性能动画组件(小程序原生层)
10
+ */
11
+
12
+ // 小程序原生组件注册
13
+ Component({
14
+ properties: {
15
+ __mode: {
16
+ type: String,
17
+ value: 'view'
18
+ },
19
+ __text: {
20
+ type: String,
21
+ value: ''
22
+ },
23
+ __style: {
24
+ type: String,
25
+ value: ''
26
+ },
27
+ __className: {
28
+ type: String,
29
+ value: ''
30
+ },
31
+ onAnimationStart: {
32
+ type: null,
33
+ value: null
34
+ },
35
+ // 动画结束回调函数
36
+ onAnimationEnd: {
37
+ type: null,
38
+ value: null
39
+ }
40
+ },
41
+ // 定义外部事件
42
+ externalClasses: [],
43
+ data: {
44
+ __text: '',
45
+ __style: '',
46
+ __className: '',
47
+ __animData: null // 动画数据
48
+ },
49
+ lifetimes: {
50
+ attached() {
51
+ // 组件初始化
52
+ },
53
+ detached() {
54
+ // 清理工作
55
+ }
56
+ },
57
+ methods: {
58
+ /**
59
+ * 事件处理器
60
+ */
61
+ __handleTiggerEvent(eventName, e) {
62
+ // 触发自定义事件,让外部可以监听
63
+ this.triggerEvent(eventName, e, {
64
+ // bubbles: true,
65
+ composed: true
66
+ });
67
+ },
68
+ /**
69
+ * 创建 IntersectionObserver
70
+ */
71
+ createIntersectionObserver(options) {
72
+ try {
73
+ // @ts-ignore
74
+ if (typeof ty !== 'undefined' && ty.createIntersectionObserver) {
75
+ return ty.createIntersectionObserver(this, options);
76
+ }
77
+ } catch (e) {
78
+ console.error('createIntersectionObserver error:', e);
79
+ }
80
+ return null;
81
+ },
82
+ /**
83
+ * 获取小程序的 createAnimation 方法
84
+ */
85
+ _getCreateAnimation() {
86
+ try {
87
+ // @ts-ignore
88
+ if (typeof ty !== 'undefined' && ty.createAnimation) {
89
+ return ty.createAnimation;
90
+ }
91
+ } catch (e) {
92
+ // ignore
93
+ }
94
+ return null;
95
+ },
96
+ /**
97
+ * 解析样式字符串为对象
98
+ */
99
+ _parseStyle(styleString) {
100
+ if (!styleString) return {};
101
+ const result = {};
102
+ const styles = styleString.split(';').filter(Boolean);
103
+ for (const style of styles) {
104
+ const colonIndex = style.indexOf(':');
105
+ if (colonIndex > 0) {
106
+ const key = style.substring(0, colonIndex).trim();
107
+ const value = style.substring(colonIndex + 1).trim();
108
+ if (key && value) {
109
+ result[key] = value;
110
+ }
111
+ }
112
+ }
113
+ return result;
114
+ },
115
+ /**
116
+ * 样式对象转字符串
117
+ */
118
+ _styleToString(styleObj) {
119
+ return Object.entries(styleObj).map(_ref => {
120
+ let [key, value] = _ref;
121
+ return "".concat(key, ":").concat(value);
122
+ }).join(';');
123
+ },
124
+ setCustomStyle(value, callback) {
125
+ // 防止传入 undefined 或 null 导致小程序报错
126
+ if (value === undefined || value === null) {
127
+ console.warn('[TyAnimatedComponent] setCustomStyle: value is undefined or null, ignored');
128
+ if (callback) callback();
129
+ return;
130
+ }
131
+
132
+ // 合并样式
133
+ const currentStyle = this._parseStyle(this.data.__style || '');
134
+ const newStyle = this._parseStyle(value);
135
+ const mergedStyle = _objectSpread(_objectSpread({}, currentStyle), newStyle);
136
+ let mergedStyleString = this._styleToString(mergedStyle);
137
+ if (mergedStyleString === this.data.__style && this.data.__animData !== null) {
138
+ console.log('[TyAnimated] 样式值相同但有动画数据,添加时间戳强制更新');
139
+ // 添加一个不影响渲染的注释,使样式字符串不同
140
+ mergedStyleString = "".concat(mergedStyleString, ";/* ").concat(Date.now(), " */");
141
+ }
142
+
143
+ // 一次性 setData,不嵌套
144
+ this.setData({
145
+ __style: mergedStyleString,
146
+ __animData: null // 总是清空动画数据
147
+ }, callback);
148
+ },
149
+ /**
150
+ * 设置文本内容(__mode='text' 时使用)
151
+ */
152
+ __applyText(text) {
153
+ if (typeof text === 'string') {
154
+ this.setData({
155
+ __text: text
156
+ });
157
+ }
158
+ },
159
+ __applyAnimData(animData) {
160
+ if (!animData) {
161
+ console.warn('[TyAnimatedComponent] __applyAnimData: animData is null or undefined');
162
+ return;
163
+ }
164
+ this.setData({
165
+ __animData: animData
166
+ });
167
+ },
168
+ /**
169
+ * 核心方法:直接应用 Animation 对象
170
+ * @param {Function} fn - 接收 Animation 实例的回调函数
171
+ * @param {Object} options - 动画选项,包括 transformOrigin
172
+ *
173
+ * 使用示例:
174
+ * comp.__apply((anim) => {
175
+ * anim.opacity(0.5).scale(0.8).step();
176
+ * return anim.export();
177
+ * }, { transformOrigin: 'top left' });
178
+ */
179
+ __apply(fn) {
180
+ let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
181
+ const createAnimation = this._getCreateAnimation();
182
+ if (!createAnimation) {
183
+ return;
184
+ }
185
+ const anim = createAnimation(options);
186
+
187
+ // 执行用户的动画配置
188
+ const exported = fn(anim);
189
+
190
+ // 应用动画数据
191
+ const animData = exported || anim.export();
192
+ this.setData({
193
+ __animData: animData
194
+ });
195
+ },
196
+ // 核心触摸事件处理(只保留最常用的)
197
+ __onClick(e) {
198
+ this.__handleTiggerEvent('click', e);
199
+ },
200
+ __onTouchStart(e) {
201
+ this.__handleTiggerEvent('touchstart', e);
202
+ },
203
+ __onTouchEnd(e) {
204
+ this.__handleTiggerEvent('touchend', e);
205
+ }
206
+ }
207
+ });
208
+ export default 'ty-animated-component';
@@ -0,0 +1,4 @@
1
+ {
2
+ "component": true,
3
+ "usingComponents": {}
4
+ }
@@ -0,0 +1,26 @@
1
+ <block>
2
+ <view
3
+ wx:if="{{__mode==='view'}}"
4
+ id="root"
5
+ class="{{__className}}"
6
+ style="{{__style}}"
7
+ animation="{{__animData}}"
8
+ bindtap="__onClick"
9
+ bindtouchstart="__onTouchStart"
10
+ bindtouchend="__onTouchEnd"
11
+ >
12
+ <slot></slot>
13
+ </view>
14
+ <text
15
+ wx:else
16
+ id="rootText"
17
+ class="container {{__className}}"
18
+ style="{{__style}}"
19
+ animation="{{__animData}}"
20
+ bindtap="__onClick"
21
+ bindtouchstart="__onTouchStart"
22
+ bindtouchend="__onTouchEnd"
23
+ >{{__text}}</text>
24
+ </block>
25
+
26
+
@@ -0,0 +1,3 @@
1
+ .container { display: block; }
2
+
3
+
@@ -0,0 +1,312 @@
1
+ import type React from 'react';
2
+ /**
3
+ * 触摸事件处理器(只保留核心事件)
4
+ *
5
+ * 注:只提供最常用的三个事件(onClick, onTouchStart, onTouchEnd)
6
+ * 如需其他事件(如 onLongPress, onTouchMove 等),请在 Animated 的子元素上直接绑定
7
+ */
8
+ export interface TouchEventHandler {
9
+ onClick?: (e: TouchEvent) => any;
10
+ onTouchStart?: (e: TouchEvent) => any;
11
+ onTouchEnd?: (e: TouchEvent) => any;
12
+ }
13
+ interface TargetType {
14
+ id: string;
15
+ offsetLeft: number;
16
+ offsetTop: number;
17
+ paths: any;
18
+ uid: any;
19
+ dataset: {
20
+ [key: string]: any;
21
+ };
22
+ }
23
+ export interface EventType {
24
+ type: string;
25
+ target: TargetType;
26
+ currentTarget: TargetType;
27
+ timestamp: number;
28
+ stopPropagation: () => void;
29
+ detail: any;
30
+ }
31
+ export type timing = 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'step-start' | 'step-end';
32
+ export type TOptions = {
33
+ duration?: number;
34
+ timingFunction?: timing;
35
+ delay?: number;
36
+ transformOrigin?: string;
37
+ };
38
+ /**
39
+ * 元素边界信息
40
+ */
41
+ export interface BoundingClientRect {
42
+ /** 元素的 ID */
43
+ id: string;
44
+ /** dataset 数据 */
45
+ dataset: Record<string, any>;
46
+ /** 左边界坐标 */
47
+ left: number;
48
+ /** 右边界坐标 */
49
+ right: number;
50
+ /** 上边界坐标 */
51
+ top: number;
52
+ /** 下边界坐标 */
53
+ bottom: number;
54
+ /** 元素宽度 */
55
+ width: number;
56
+ /** 元素高度 */
57
+ height: number;
58
+ }
59
+ /**
60
+ * 元素查询字段配置
61
+ */
62
+ export interface NodeFields {
63
+ /** 是否返回节点 id */
64
+ id?: boolean;
65
+ /** 是否返回节点 dataset */
66
+ dataset?: boolean;
67
+ /** 是否返回节点布局位置(left right top bottom) */
68
+ rect?: boolean;
69
+ /** 是否返回节点尺寸(width height) */
70
+ size?: boolean;
71
+ /** 是否返回节点的 scrollLeft scrollTop */
72
+ scrollOffset?: boolean;
73
+ /** 指定属性名列表,返回节点对应属性名的当前属性值 */
74
+ properties?: string[];
75
+ /** 指定样式名列表,返回节点对应样式名的当前值 */
76
+ computedStyle?: string[];
77
+ /** 是否返回节点对应的 Node 实例 */
78
+ node?: boolean;
79
+ }
80
+ /**
81
+ * Animated.View 组件的 Ref 类型(不包含 setText)
82
+ *
83
+ * @example
84
+ * ```tsx
85
+ * import { useRef } from 'react'
86
+ * import Animated, { type AnimatedViewRef } from '@/components/animated'
87
+ *
88
+ * const boxRef = useRef<AnimatedViewRef>(null)
89
+ * boxRef.current?.setStyle({ opacity: 0.5 })
90
+ * boxRef.current?.animate((anim) => {
91
+ * anim.translateX(100).step({ duration: 300 })
92
+ * })
93
+ * ```
94
+ */
95
+ export interface AnimatedViewRef {
96
+ /**
97
+ * 直接设置样式(无动画)
98
+ *
99
+ * 优势:不受 React 重渲染影响,可以在动画过程中随时调用 setState
100
+ * 而不用担心样式被覆盖或闪烁问题
101
+ *
102
+ * 注意:
103
+ * - 会清除动画数据并设置样式
104
+ * - 如果动画正在执行,会中断动画
105
+ * - 返回 Promise,可以等待样式应用完成
106
+ *
107
+ * @param style - 样式对象或 CSS 字符串
108
+ * @param callback - 可选的回调函数,样式应用完成后调用
109
+ * @returns Promise<void> - 样式应用完成后 resolve
110
+ *
111
+ * @example
112
+ * ```tsx
113
+ * // 基本使用
114
+ * ref.current?.setStyle({ opacity: 0.5, color: 'red' })
115
+ *
116
+ * // 等待样式应用完成
117
+ * await ref.current?.setStyle({ opacity: 0 })
118
+ *
119
+ * // 如果需要获取 rect,单独调用
120
+ * await ref.current?.setStyle({ opacity: 0 })
121
+ * const rect = await ref.current?.getBoundingClientRect()
122
+ *
123
+ * // 使用回调
124
+ * ref.current?.setStyle({ color: 'red' }, () => {
125
+ * console.log('样式已应用')
126
+ * })
127
+ * ```
128
+ */
129
+ setStyle: (style: React.CSSProperties | string, callback?: () => void) => Promise<void>;
130
+ /**
131
+ * 创建动画对象
132
+ * 使用小程序原生动画 API,这是性能最优的动画方式
133
+ *
134
+ * @param options - 动画配置(可选)
135
+ * @param options.duration - 动画持续时间(毫秒),默认 400
136
+ * @param options.timingFunction - 缓动函数,默认 'linear'
137
+ * @param options.delay - 动画延迟时间(毫秒),默认 0
138
+ * @param options.transformOrigin - 变换原点,默认 '50% 50% 0'
139
+ * @returns Animation 实例,包含所有动画方法和 play() 方法
140
+ *
141
+ * @example
142
+ * ```tsx
143
+ * // 基本使用
144
+ * const animation = ref.current.animate()
145
+ * animation.translateX(100).step({ duration: 300 })
146
+ * await animation.play()
147
+ * console.log('动画完成!')
148
+ *
149
+ * // 链式调用
150
+ * const animation = ref.current
151
+ * .animate({ transformOrigin: '50% 50%' })
152
+ * .translateX(100)
153
+ * .scale(1.2)
154
+ * .step({ duration: 300 })
155
+ * await animation.play()
156
+ *
157
+ * // 多段动画
158
+ * const animation = ref.current.animate()
159
+ * animation.translateX(100).step({ duration: 300 })
160
+ * animation.translateY(100).step({ duration: 300 })
161
+ * animation.scale(1.5).step({ duration: 300 })
162
+ * await animation.play()
163
+ *
164
+ * // 复用动画
165
+ * const slideIn = ref.current.animate().translateX(100).step({ duration: 300 })
166
+ * await slideIn.play() // 第一次
167
+ * await slideIn.play() // 第二次
168
+ * ```
169
+ */
170
+ animate: (options?: TOptions) => IAnimation & {
171
+ play(): Promise<void>;
172
+ };
173
+ /**
174
+ * 获取元素的布局位置和尺寸信息
175
+ * 基于小程序 SelectorQuery.boundingClientRect API
176
+ *
177
+ * @returns Promise<BoundingClientRect | null>
178
+ *
179
+ * @example
180
+ * ```tsx
181
+ * const rect = await boxRef.current?.getBoundingClientRect()
182
+ * console.log(rect?.left, rect?.top, rect?.width, rect?.height)
183
+ *
184
+ * // 使用位置信息实现动画
185
+ * if (rect) {
186
+ * const centerX = window.innerWidth / 2 - rect.left - rect.width / 2
187
+ * const centerY = window.innerHeight / 2 - rect.top - rect.height / 2
188
+ * boxRef.current?.animate((anim) => {
189
+ * anim.translateX(centerX).translateY(centerY).scale(2).step({ duration: 300 })
190
+ * })
191
+ * }
192
+ * ```
193
+ */
194
+ getBoundingClientRect: () => Promise<BoundingClientRect | null>;
195
+ /**
196
+ * 获取元素的详细信息(包括样式、属性等)
197
+ * 基于小程序 SelectorQuery.fields API
198
+ *
199
+ * @param fields - 查询字段配置
200
+ * @returns Promise<any>
201
+ *
202
+ * @example
203
+ * ```tsx
204
+ * // 获取元素的位置和计算后的样式
205
+ * const info = await boxRef.current?.getFields({
206
+ * rect: true,
207
+ * size: true,
208
+ * computedStyle: ['backgroundColor', 'transform']
209
+ * })
210
+ * console.log(info?.backgroundColor, info?.transform)
211
+ * ```
212
+ */
213
+ getFields: (fields: NodeFields) => Promise<any>;
214
+ /**
215
+ * 获取元素的计算后样式(computed style)
216
+ * 这是一个便捷方法,内部调用 getFields
217
+ *
218
+ * 使用注意事项:
219
+ * 1. width/height 限制:通过 CSS 自动布局的元素,width/height 通常返回 'auto'
220
+ * - 错误用法:用 getComputedStyle 获取实际像素尺寸
221
+ * - 正确用法:使用 getBoundingClientRect() 获取实际尺寸
222
+ *
223
+ * 2. 内联样式限制:通过 React style 属性设置的样式可能无法查询
224
+ * - 原因:小程序查询的是最终渲染的 CSS,不是 JS 设置的内联样式
225
+ *
226
+ * 3. 适用场景:
227
+ * - 查询 transform 动画状态(动画执行中)
228
+ * - 查询 opacity 等动画属性
229
+ * - 查询通过 CSS 类设置的样式
230
+ * - 查询元素实际尺寸(用 getBoundingClientRect)
231
+ * - 查询通过 style={{ }} 设置的背景色等
232
+ *
233
+ * @param styleNames - 样式名称数组
234
+ * @returns Promise<Record<string, any> | null> - 返回样式对象
235
+ *
236
+ * @example
237
+ * ```tsx
238
+ * // 正确示例:查询动画相关样式
239
+ * const styles = await boxRef.current?.getComputedStyle([
240
+ * 'transform',
241
+ * 'opacity'
242
+ * ])
243
+ *
244
+ * console.log(styles?.transform) // 'matrix(1.5, 0, 0, 1.5, 100, 50)'
245
+ * console.log(styles?.opacity) // '0.8'
246
+ *
247
+ * // 根据当前 transform 决定下一步动画
248
+ * if (styles?.transform !== 'none') {
249
+ * // 当前有 transform,恢复原位
250
+ * boxRef.current?.animate((anim) => {
251
+ * anim.translateX(0).translateY(0).scale(1).step({ duration: 300 })
252
+ * })
253
+ * }
254
+ *
255
+ * // 错误示例:查询尺寸
256
+ * const styles = await boxRef.current?.getComputedStyle(['width', 'height'])
257
+ * console.log(styles?.width) // 可能返回 'auto',不是实际像素值
258
+ *
259
+ * // 正确做法:使用 getBoundingClientRect
260
+ * const rect = await boxRef.current?.getBoundingClientRect()
261
+ * console.log(rect?.width) // 335 (实际像素值)
262
+ * ```
263
+ */
264
+ getComputedStyle: (styleNames: string[]) => Promise<Record<string, any> | null>;
265
+ }
266
+ /**
267
+ * Animated.Text 组件的 Ref 类型(包含 setText)
268
+ *
269
+ * @example
270
+ * ```tsx
271
+ * import { useRef } from 'react'
272
+ * import Animated, { type AnimatedTextRef } from '@/components/animated'
273
+ *
274
+ * const textRef = useRef<AnimatedTextRef>(null)
275
+ * textRef.current?.setText('新文本')
276
+ * textRef.current?.animate((anim) => {
277
+ * anim.opacity(0.5).step({ duration: 300 })
278
+ * })
279
+ * ```
280
+ */
281
+ export interface AnimatedTextRef extends AnimatedViewRef {
282
+ /**
283
+ * 直接设置文本内容(仅 Animated.Text 可用)
284
+ * 直接操作底层组件,不触发 React 重渲染
285
+ *
286
+ * @param text - 文本内容
287
+ *
288
+ * @example
289
+ * ```tsx
290
+ * <Animated.Text ref={textRef}>0</Animated.Text>
291
+ * // 更新文本
292
+ * textRef.current?.setText('100')
293
+ * ```
294
+ */
295
+ setText: (text: string) => void;
296
+ }
297
+ /**
298
+ * Animated 组件 Props
299
+ */
300
+ export interface AnimatedProps extends TouchEventHandler {
301
+ children?: React.ReactNode;
302
+ className?: string;
303
+ style?: React.CSSProperties;
304
+ id?: string;
305
+ /** 组件模式:'view' 为容器模式(默认),'text' 为文本模式 */
306
+ mode?: 'view' | 'text';
307
+ /** 动画开始回调 */
308
+ onAnimationStart?: () => void;
309
+ /** 动画结束回调 */
310
+ onAnimationEnd?: () => void;
311
+ }
312
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { ScrollViewProps } from '@ray-js/adapter';
3
- declare const ScrollView: React.ForwardRefExoticComponent<ScrollViewProps & React.RefAttributes<any>>;
3
+ declare const ScrollView: React.FC<ScrollViewProps>;
4
4
  export default ScrollView;
@@ -6,7 +6,7 @@ import React from 'react';
6
6
  import { useEventListener } from 'ahooks';
7
7
  import { ScrollView as ScrollViewDef } from '@ray-js/adapter';
8
8
  import handleProps from '../utils/handleProps';
9
- const ScrollView = /*#__PURE__*/React.forwardRef((props, ref) => {
9
+ const ScrollView = props => {
10
10
  const {
11
11
  onScroll,
12
12
  onScrollToUpper,
@@ -14,9 +14,6 @@ const ScrollView = /*#__PURE__*/React.forwardRef((props, ref) => {
14
14
  } = props,
15
15
  restProps = _objectWithoutProperties(props, _excluded);
16
16
  const currentNode = React.useRef(null);
17
-
18
- // 使用传入的 ref 或内部的 ref
19
- const scrollRef = ref || currentNode;
20
17
  useEventListener('scroll', e => {
21
18
  onScroll === null || onScroll === void 0 || onScroll(_objectSpread(_objectSpread(_objectSpread({}, e), {}, {
22
19
  type: 'scroll'
@@ -24,7 +21,7 @@ const ScrollView = /*#__PURE__*/React.forwardRef((props, ref) => {
24
21
  origin: e
25
22
  }));
26
23
  }, {
27
- target: scrollRef
24
+ target: currentNode
28
25
  });
29
26
  useEventListener('scrolltoupper', e => {
30
27
  onScrollToUpper === null || onScrollToUpper === void 0 || onScrollToUpper(_objectSpread(_objectSpread(_objectSpread({}, e), {}, {
@@ -33,7 +30,7 @@ const ScrollView = /*#__PURE__*/React.forwardRef((props, ref) => {
33
30
  origin: e
34
31
  }));
35
32
  }, {
36
- target: scrollRef
33
+ target: currentNode
37
34
  });
38
35
  useEventListener('scrolltolower', e => {
39
36
  onScrollToLower === null || onScrollToLower === void 0 || onScrollToLower(_objectSpread(_objectSpread(_objectSpread({}, e), {}, {
@@ -42,15 +39,15 @@ const ScrollView = /*#__PURE__*/React.forwardRef((props, ref) => {
42
39
  origin: e
43
40
  }));
44
41
  }, {
45
- target: scrollRef
42
+ target: currentNode
46
43
  });
47
44
  return (
48
45
  /*#__PURE__*/
49
46
  // @ts-ignore
50
47
  React.createElement("v-scroll-view", _extends({}, handleProps(restProps), {
51
- ref: scrollRef
48
+ ref: currentNode
52
49
  }), props.children)
53
50
  );
54
- });
51
+ };
55
52
  ScrollView.defaultProps = ScrollViewDef.defaultProps;
56
53
  export default ScrollView;
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import type { ScrollViewProps } from '@ray-js/adapter';
3
- declare const ScrollView: React.ForwardRefExoticComponent<ScrollViewProps & React.RefAttributes<any>>;
3
+ declare const ScrollView: React.FC<ScrollViewProps>;
4
4
  export default ScrollView;
@@ -4,16 +4,13 @@ const _excluded = ["style"];
4
4
  import * as React from 'react';
5
5
  import { inlineStyle } from '@ray-js/framework-shared';
6
6
  import { ScrollView as RemaxScrollView } from '@ray-js/adapter';
7
- const ScrollView = /*#__PURE__*/React.forwardRef((props, ref) => {
7
+ const ScrollView = props => {
8
8
  const {
9
9
  style
10
10
  } = props,
11
11
  restProps = _objectWithoutProperties(props, _excluded);
12
- // @ts-ignore - RemaxScrollView 支持 ref,但类型定义可能不完整
13
12
  return /*#__PURE__*/React.createElement(RemaxScrollView, _extends({
14
- ref: ref,
15
13
  style: inlineStyle(style)
16
14
  }, restProps));
17
- });
18
- ScrollView.displayName = 'ScrollView';
15
+ };
19
16
  export default ScrollView;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/components",
3
- "version": "1.7.56-beta.0",
3
+ "version": "1.7.56-beta.10",
4
4
  "description": "Ray basic components",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,8 +29,8 @@
29
29
  "dependencies": {
30
30
  "@ray-core/macro": "^0.4.9",
31
31
  "@ray-core/wechat": "^0.4.9",
32
- "@ray-js/adapter": "1.7.56-beta.0",
33
- "@ray-js/framework-shared": "1.7.56-beta.0",
32
+ "@ray-js/adapter": "1.7.56-beta.10",
33
+ "@ray-js/framework-shared": "1.7.56-beta.10",
34
34
  "ahooks": "^3.8.5",
35
35
  "clsx": "^1.2.1",
36
36
  "core-js": "^3.43.0",
@@ -40,11 +40,11 @@
40
40
  "style-to-object": "^0.3.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@ray-js/cli": "1.7.56-beta.0"
43
+ "@ray-js/cli": "1.7.56-beta.10"
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.org"
48
48
  },
49
- "gitHead": "0cbe1a77d0bad902ea033152aedbb2f490753088"
49
+ "gitHead": "1c03c24ac82eeee0ea0c69f463d174ab6a14a11d"
50
50
  }