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: 日历设置为选择周时,报错:weekDate对象不可迭代 #2538

Merged
merged 2 commits into from
Sep 2, 2023
Merged

fix: 日历设置为选择周时,报错:weekDate对象不可迭代 #2538

merged 2 commits into from
Sep 2, 2023

Conversation

iCheng
Copy link
Contributor

@iCheng iCheng commented Sep 2, 2023

这个 PR 做了什么? (简要描述所做更改)
存在的问题:
1 日历组件 - 选择周。当未勾选时间并点击'确认'时,报错:Uncaught TypeError: weekDate is not iterable。因为会给handleWeekDate函数传入undefined参数,没有Iterable接口导致无法解构赋值而报错.
2 日历组件中 - nut-cell上展示的文案,使用 date9? 进行三元表达式判断,界面可能会出现 undefined .
调整:
1 type==week时,还需判断chooseData的长度.
2 使用 date9.length? 进行三元表达式判断,未勾选数据时,会展示提示语:'请选择',而不是 undefined.

这个 PR 是什么类型? (至少选择一个)

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 代码重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

这个 PR 涉及以下平台:

  • NutUI 4.0 H5
  • NutUI 4.0 小程序
  • NutUI 3.0 H5
  • NutUI 3.0 小程序

这个 PR 是否已自测:

@codecov
Copy link

codecov bot commented Sep 2, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.02% ⚠️

Comparison is base (fd89379) 84.79% compared to head (d3e8699) 84.78%.

Additional details and impacted files
@@            Coverage Diff             @@
##               v4    #2538      +/-   ##
==========================================
- Coverage   84.79%   84.78%   -0.02%     
==========================================
  Files         149      149              
  Lines       20443    20446       +3     
  Branches     2281     2281              
==========================================
  Hits        17335    17335              
- Misses       3103     3106       +3     
  Partials        5        5              
Files Changed Coverage Δ
src/packages/__VUE/calendaritem/index.vue 67.06% <0.00%> (-0.24%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iCheng
Copy link
Contributor Author

iCheng commented Sep 2, 2023

@eiinu 大佬 是因为提交前的测试步骤问题,导致 Some checks were not successful 吗

@iCheng iCheng closed this Sep 2, 2023
@iCheng iCheng reopened this Sep 2, 2023
@iCheng iCheng closed this Sep 2, 2023
@eiinu
Copy link
Member

eiinu commented Sep 2, 2023

@eiinu 大佬 是因为提交前的测试步骤问题,导致 Some checks were not successful 吗

这个不用管,覆盖率有略微下降是很常见的。可以把这个PR打开

@iCheng iCheng reopened this Sep 2, 2023
@iCheng
Copy link
Contributor Author

iCheng commented Sep 2, 2023

@eiinu 大佬 是因为提交前的测试步骤问题,导致 Some checks were not successful 吗

这个不用管,覆盖率有略微下降是很常见的。可以把这个PR打开

好嘞

@eiinu eiinu merged commit 491c77d into jdf2e:v4 Sep 2, 2023
6 of 10 checks passed
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 participants