Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(table): 修复加载数据时 loading 动画丢失的问题 #1869

Closed
wants to merge 1 commit into from

Conversation

Sight-wcg
Copy link
Collaborator

@Sight-wcg Sight-wcg commented May 7, 2024

😃 本次 PR 的变化性质

请至少勾选一项

  • 功能新增
  • 问题修复
  • 功能优化
  • 分支合并
  • 其他改动:请在此处填写

🌱 本次 PR 的变化内容

✅ 本次 PR 的满足条件

请在申请合并之前,将符合条件的每一项进行勾选

  • 已提供在线演示地址(如:codepen, stackblitz)或无需演示
  • 已对每一项的改动均测试通过
  • 已提供具体的变化内容说明

Copy link

stackblitz bot commented May 7, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sentsim
Copy link
Member

sentsim commented May 9, 2024

是 setColsWidth 方法中移除了加载条,我都忘记了当初加这句的用意

that.loading(!0);

@Sight-wcg Sight-wcg marked this pull request as draft May 9, 2024 15:45
@Sight-wcg
Copy link
Collaborator Author

Sight-wcg commented May 9, 2024

是 setColsWidth 方法中移除了加载条,我都忘记了当初加这句的用意

that.loading(!0);

我也没仔细看,刚才重新看了下,应该和数据加载完成后的视图变化(失败/成功)有关,可以改进一下 ,让 setColWidth 职责更分明

Class.prototype.errorView = function(html){

layui/src/modules/table.js

Lines 998 to 1003 in 7f610ba

var done = function(res, origin){
that.setColsWidth();
typeof options.done === 'function' && options.done(
res, curr, res[response.countName], origin
);
};

@sentsim
Copy link
Member

sentsim commented May 10, 2024

是的,数据渲染成功或失败后都要移除加载条。但我没太明白我当初怎么会将这句放在 setColWidth 方法中 😅

@Sight-wcg Sight-wcg marked this pull request as ready for review May 10, 2024 09:54
@Sight-wcg Sight-wcg changed the title fix(table): 修复加载数据时 loading 动画丢失的问题,revert #1773 fix(table): 修复加载数据时 loading 动画丢失的问题 May 10, 2024
@Sight-wcg
Copy link
Collaborator Author

#1893 解决

@Sight-wcg Sight-wcg closed this May 12, 2024
@Sight-wcg Sight-wcg deleted the fix/table-loading branch June 7, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

更新2.9.9后,数据表格加载及重载时不显示加载条
2 participants