-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
duplicatedable?: boolean | ||
): number { | ||
return duplicatedable && total > 3 ? total - 2 : total | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文件名改一下,叫 shared
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
它里面只有 duplicated 的逻辑,要改为 shared 吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我以为这个是重复逻辑放在这,如果就是普通的工具函数不如放到 utils 里面
src/carousel/src/CarouselItem.tsx
Outdated
import { useConfig } from '../../_mixins' | ||
import { throwError } from '../../_utils' | ||
import { carouselMethodsInjectionKey } from './interface' | ||
import type { VNode } from 'vue' |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
别检查了,直接用,这也不是个兼容性卡点
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😏
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
closes #3227, #3106, #3078.