Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 95a4a85c
authored
Sep 03, 2024
by
invalid w
Committed by
GitHub
Sep 03, 2024
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
chore(@vben-core/tabs-ui): cancel drag and drop function on mobile devices (#4303)
resolve #4301
1 parent
3f2dcb82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
packages/@core/ui-kit/tabs-ui/src/use-tabs-drag.ts
packages/@core/ui-kit/tabs-ui/src/use-tabs-drag.ts
View file @
95a4a85
...
@@ -4,7 +4,11 @@ import type { TabsProps } from './types';
...
@@ -4,7 +4,11 @@ import type { TabsProps } from './types';
import
{
nextTick
,
onMounted
,
onUnmounted
,
ref
,
watch
}
from
'vue'
;
import
{
nextTick
,
onMounted
,
onUnmounted
,
ref
,
watch
}
from
'vue'
;
import
{
type
Sortable
,
useSortable
}
from
'@vben-core/composables'
;
import
{
type
Sortable
,
useIsMobile
,
useSortable
,
}
from
'@vben-core/composables'
;
// 可能会找到拖拽的子元素,这里需要确保拖拽的dom时tab元素
// 可能会找到拖拽的子元素,这里需要确保拖拽的dom时tab元素
function
findParentElement
(
element
:
HTMLElement
)
{
function
findParentElement
(
element
:
HTMLElement
)
{
...
@@ -90,6 +94,12 @@ export function useTabsDrag(props: TabsProps, emit: EmitType) {
...
@@ -90,6 +94,12 @@ export function useTabsDrag(props: TabsProps, emit: EmitType) {
}
}
async
function
init
()
{
async
function
init
()
{
const
{
isMobile
}
=
useIsMobile
();
// 移动端下tab不需要拖拽
if
(
isMobile
.
value
)
{
return
;
}
await
nextTick
();
await
nextTick
();
initTabsSortable
();
initTabsSortable
();
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment