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(Carousel): simple code and fix the bug #3235

Merged
merged 9 commits into from
Jul 10, 2022

Conversation

nooooooom
Copy link
Contributor

closes #3227, #3106, #3078.

@vercel
Copy link

vercel bot commented Jul 5, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
naive-ui ✅ Ready (Inspect) Visit Preview Jul 8, 2022 at 10:14AM (UTC)

duplicatedable?: boolean
): number {
return duplicatedable && total > 3 ? total - 2 : total
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文件名改一下,叫 shared

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

它里面只有 duplicated 的逻辑,要改为 shared 吗

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我以为这个是重复逻辑放在这,如果就是普通的工具函数不如放到 utils 里面

import { useConfig } from '../../_mixins'
import { throwError } from '../../_utils'
import { carouselMethodsInjectionKey } from './interface'
import type { VNode } from 'vue'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

往上提

@@ -0,0 +1,12 @@
let supportsPassive = false
Copy link
Collaborator

@07akioni 07akioni Jul 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

别检查了,直接用,这也不是个兼容性卡点

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😏

@codecov
Copy link

codecov bot commented Jul 6, 2022

Codecov Report

Merging #3235 (1bd620d) into main (ffe8af9) will increase coverage by 0.04%.
The diff coverage is 70.00%.

@@            Coverage Diff             @@
##             main    #3235      +/-   ##
==========================================
+ Coverage   63.14%   63.19%   +0.04%     
==========================================
  Files        1020     1022       +2     
  Lines       21367    21360       -7     
  Branches     5575     5569       -6     
==========================================
+ Hits        13493    13498       +5     
+ Misses       6427     6413      -14     
- Partials     1447     1449       +2     
Impacted Files Coverage Δ
src/carousel/src/styles/index.cssr.ts 100.00% <ø> (ø)
src/carousel/utils/event.ts 50.00% <50.00%> (ø)
src/carousel/utils/index.ts 50.00% <50.00%> (ø)
src/carousel/src/CarouselDots.tsx 67.92% <66.66%> (+0.68%) ⬆️
src/carousel/src/Carousel.tsx 63.26% <67.96%> (+1.23%) ⬆️
src/carousel/utils/duplicatedLogic.ts 78.26% <78.26%> (ø)
src/carousel/src/CarouselContext.ts 83.33% <83.33%> (ø)
src/carousel/src/CarouselItem.tsx 86.20% <92.85%> (-0.64%) ⬇️
src/carousel/src/CarouselArrow.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ffe8af9...1bd620d. Read the comment docs.

@nooooooom nooooooom changed the title Simple code and fix the bug fix(Carousel): simple code and fix the bug Jul 8, 2022
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.

轮播图内交互区域覆盖导致触发错误的可点击元素(仅fade渐变过渡)
2 participants