-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
chore(@vben-core/tabs-ui): cancel drag and drop function on mobile de… #4303
Conversation
|
WalkthroughThe changes made to the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/@core/ui-kit/tabs-ui/src/use-tabs-drag.ts (2 hunks)
Additional comments not posted (2)
packages/@core/ui-kit/tabs-ui/src/use-tabs-drag.ts (2)
7-11
: LGTM!The import statement changes are approved. The addition of
useIsMobile
from the@vben-core/composables
package is a good indication that the code is introducing a mobile device check.
97-102
: Excellent update to disable drag-and-drop on mobile devices!The changes in the
init
function introduce a mobile device check usinguseIsMobile()
. If the current device is mobile, the function exits early, bypassing the initialization of the drag-and-drop functionality for tabs.This is a great enhancement that improves the user experience on mobile devices by disabling the unnecessary drag-and-drop feature, which may not be suitable for touch interfaces.
resolve #4301
Description
在移动端下,标签无法切换到已固定标签页,问题是出在
sortablejs
上,考虑到移动端下的标签不需要拖拽,索性移动端直接禁用拖拽的功能vue-vben-admin/packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue
Line 70 in 3f2dcb8
Type of change
Please delete options that are not relevant.
pnpm-lock.yaml
unless you introduce a new test example.Checklist
pnpm run docs:dev
command.pnpm test
.feat:
,fix:
,perf:
,docs:
, orchore:
.Summary by CodeRabbit
New Features
Bug Fixes