1.0.0.0723

1.新增大数据量渲染测试
2.调整关闭下拉框时 滚动条返回顶部
This commit is contained in:
maplemei
2019-07-23 20:39:27 +08:00
parent daca16b503
commit 33df4d95d8
6 changed files with 44 additions and 10 deletions

View File

@@ -30,13 +30,13 @@ class xmOptions {
//定义默认值
this.options = defaultOptions(options.language);
//开始渲染数据
this.update(options);
this.update(options, true);
}
/**
* 更新数据 + 重新渲染
*/
update(options = {}){
update(options = {}, isNew){
//记录最新的配置项
this.options = {...this.options, ...options};
@@ -46,6 +46,9 @@ class xmOptions {
warn(`没有找到渲染对象: ${options.el}, 请检查`)
return ;
}
//如果是历史渲染过的数据, 重置一下数据
isNew && childs[this.options.el] && childs[this.options.el].reset();
const onRef = (ref) => childs[this.options.el] = ref;
render(<Framework { ...this.options } onClose={ onClose } onRef={ onRef } />, dom);