Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

[BUG]在钉钉小程序运行mini-antui组件,会导致页面组件无限重复渲染 #316

Closed
h1bomb opened this issue Nov 5, 2019 · 2 comments · Fixed by #337
Closed
Labels
bug Something isn't working

Comments

@h1bomb
Copy link
Contributor

h1bomb commented Nov 5, 2019

bug 描述
在钉钉小程序运行mini-antui组件,会导致页面组件无限重复渲染

复现步骤

import * as React from 'react';
import List from 'mini-antui/es/list';

export default () => {
  return <List>dasdasd</List>;
};

使用以上代码编写一个页面
导致页面重复渲染

期望结果
正常加载

版本信息:

  • remax 版本: 1.2.2
  • 手机型号: iPhone X
  • 小程序端: 钉钉小程序
  • 钉钉SDK: dd/SDKVersion: 1.7.86
  • 开发环境: mac OS

其他信息
关于mini-antui的组件在钉钉上重复渲染的问题,我简单跟了下,如:mini-antui/es/list
在 组件里didMount方法,如果有 setData的调用就会导致这个问题

image

@h1bomb h1bomb added the bug Something isn't working label Nov 5, 2019
@Pochodaydayup
Copy link
Contributor

有点奇怪,我试了其他支付宝小程序不会出现问题,就钉钉会出现问题,@yesmeck 你知道为啥么

@Darmody
Copy link
Contributor

Darmody commented Nov 12, 2019

从调试的结果来看,钉钉 component 内的 setData 行为会导致 page 内的上一次 setData 重复执行一次。所以第一次页面 splice 行为被重复执行,每执行一次页面插入,就会有一个新的 component 被渲染出来,紧接着 component 内的 setData 就又被触发,如此往复。。。

Darmody added a commit that referenced this issue Nov 12, 2019
实际上是钉钉小程序本身的bug,我们通过废弃已处理过的action来避免这个问题

fix #316
Darmody added a commit that referenced this issue Nov 12, 2019
实际上是钉钉小程序本身的bug,我们通过废弃已处理过的action来避免这个问题

fix #316
Darmody added a commit that referenced this issue Nov 12, 2019
实际上是钉钉小程序本身的bug,我们通过废弃已处理过的action来避免这个问题

fix #316
Darmody added a commit that referenced this issue Nov 12, 2019
实际上是钉钉小程序本身的bug,我们通过废弃已处理过的action来避免这个问题

fix #316
yesmeck pushed a commit that referenced this issue Nov 12, 2019
实际上是钉钉小程序本身的bug,我们通过废弃已处理过的action来避免这个问题

fix #316
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants