circle-progress 物料异常

小程序开发相关产品技术讨论,包括面板、智能小程序、React Native、Ray跨端框架、Panel SDK、微信小程序、小程序开发工具(IDE)及其他开发技术相关等话题


Post Reply
幽冥墨
Posts: 49

IDE环境配置

e48196f5-f270-4de9-8878-56dfa15c9848.png

Code: Select all


<RayCircleProgress
          value={value}
          // 当这个打开时且startDegree !== 90,就会出现以下报错
          // trackColor="#00a7cc"
          colorList={[
            { offset: 0, color: '#ccc' },
            { offset: 1, color: '#ccc' },
          ]}
          thumbRadius={24}
          thumbOffset={16}
          thumbBorderWidth={0}
          thumbColor='#00a7cc'
          ringRadius={120}
          innerRingRadius={116}
          // 将这个数字换成 90, trackColor 打开不会产生报错
          startDegree={135}
          offsetDegree={270}
          touchCircleStrokeStyle="rgba(0, 0, 0, 0.4)"
          onTouchStart={handleTouchStart}
          onTouchMove={handleMove}
          onTouchEnd={handleEnd}
        />

这个是报错信息

440a8254-cd70-4f7c-a67c-3dfef6f0e4b5.png

Tags:
crisiron
Posts: 223

Re: circle-progress 物料异常

yarn add --registry=https://registry.npmjs.org/ @ray-js/circle-progress@0.1.3-beta-2 使用这个版本

幽冥墨
Posts: 49

Re: circle-progress 物料异常

crisiron 2025年 Sep 18日 16:47

yarn add --registry=https://registry.npmjs.org/ @ray-js/circle-progress@0.1.3-beta-2 使用这个版本

这个异常是解决了,在操作流畅度上存在问题。

onTouchMove、onTouchEnd 在滑动时 onTouchMove 完全触发后才会执行 onTouchEnd,并且 onTouchMove 执行明显滞后

这个问题在IDE 上不会出现,在Android 会存在,iOS 中不会

Last edited by 幽冥墨 on 2025年 Sep 18日 17:28, edited 1 time in total.
crisiron
Posts: 223

Re: circle-progress 物料异常

end 在move 后执行正常; 不要在 onTouchMove 进行 setState 操作,一般情况下不建议使用move

Post Reply