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 ba539f67
authored
Oct 10, 2024
by
Netfan
Committed by
GitHub
Oct 10, 2024
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
chore: correct spelling for 'dragable' (#4600)
1 parent
078f255e
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
23 additions
and
23 deletions
docs/src/en/guide/essentials/settings.md
docs/src/guide/essentials/settings.md
packages/@core/preferences/__tests__/__snapshots__/config.test.ts.snap
packages/@core/preferences/src/config.ts
packages/@core/preferences/src/types.ts
packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue
packages/@core/ui-kit/tabs-ui/src/components/tabs/tabs.vue
packages/@core/ui-kit/tabs-ui/src/tabs-view.vue
packages/@core/ui-kit/tabs-ui/src/types.ts
packages/@core/ui-kit/tabs-ui/src/use-tabs-drag.ts
packages/effects/layouts/src/basic/tabbar/tabbar.vue
packages/effects/layouts/src/widgets/preferences/blocks/layout/tabbar.vue
packages/effects/layouts/src/widgets/preferences/preferences-drawer.vue
packages/locales/src/langs/en-US.json
packages/locales/src/langs/zh-CN.json
docs/src/en/guide/essentials/settings.md
View file @
ba539f6
...
@@ -226,7 +226,7 @@ const defaultPreferences: Preferences = {
...
@@ -226,7 +226,7 @@ const defaultPreferences: Preferences = {
width: 230,
width: 230,
},
},
tabbar: {
tabbar: {
dragable: true,
drag
g
able: true,
enable: true,
enable: true,
height: 36,
height: 36,
keepAlive: true,
keepAlive: true,
...
@@ -406,7 +406,7 @@ interface ShortcutKeyPreferences {
...
@@ -406,7 +406,7 @@ interface ShortcutKeyPreferences {
interface TabbarPreferences {
interface TabbarPreferences {
/
**
Whether dragging of multiple tabs is enabled
*
/
/
**
Whether dragging of multiple tabs is enabled
*
/
dragable: boolean;
drag
g
able: boolean;
/
**
Whether multiple tabs are enabled
*
/
/
**
Whether multiple tabs are enabled
*
/
enable: boolean;
enable: boolean;
/
**
Tab height
*
/
/
**
Tab height
*
/
...
...
docs/src/guide/essentials/settings.md
View file @
ba539f6
...
@@ -248,7 +248,7 @@ const defaultPreferences: Preferences = {
...
@@ -248,7 +248,7 @@ const defaultPreferences: Preferences = {
width: 230,
width: 230,
},
},
tabbar: {
tabbar: {
dragable: true,
drag
g
able: true,
enable: true,
enable: true,
height: 36,
height: 36,
keepAlive: true,
keepAlive: true,
...
@@ -430,7 +430,7 @@ interface ShortcutKeyPreferences {
...
@@ -430,7 +430,7 @@ interface ShortcutKeyPreferences {
interface TabbarPreferences {
interface TabbarPreferences {
/
**
是否开启多标签页拖拽
*
/
/
**
是否开启多标签页拖拽
*
/
dragable: boolean;
drag
g
able: boolean;
/
**
是否开启多标签页
*
/
/
**
是否开启多标签页
*
/
enable: boolean;
enable: boolean;
/
**
标签页高度
*
/
/
**
标签页高度
*
/
...
...
packages/@core/preferences/__tests__/__snapshots__/config.test.ts.snap
View file @
ba539f6
...
@@ -73,7 +73,7 @@ exports[`defaultPreferences immutability test > should not modify the config obj
...
@@ -73,7 +73,7 @@ exports[`defaultPreferences immutability test > should not modify the config obj
"width": 224,
"width": 224,
},
},
"tabbar": {
"tabbar": {
"dragable": true,
"drag
g
able": true,
"enable": true,
"enable": true,
"height": 38,
"height": 38,
"keepAlive": true,
"keepAlive": true,
...
...
packages/@core/preferences/src/config.ts
View file @
ba539f6
...
@@ -73,7 +73,7 @@ const defaultPreferences: Preferences = {
...
@@ -73,7 +73,7 @@ const defaultPreferences: Preferences = {
width
:
224
,
width
:
224
,
},
},
tabbar
:
{
tabbar
:
{
dragable
:
true
,
drag
g
able
:
true
,
enable
:
true
,
enable
:
true
,
height
:
38
,
height
:
38
,
keepAlive
:
true
,
keepAlive
:
true
,
...
...
packages/@core/preferences/src/types.ts
View file @
ba539f6
...
@@ -154,7 +154,7 @@ interface ShortcutKeyPreferences {
...
@@ -154,7 +154,7 @@ interface ShortcutKeyPreferences {
interface
TabbarPreferences
{
interface
TabbarPreferences
{
/** 是否开启多标签页拖拽 */
/** 是否开启多标签页拖拽 */
dragable
:
boolean
;
drag
g
able
:
boolean
;
/** 是否开启多标签页 */
/** 是否开启多标签页 */
enable
:
boolean
;
enable
:
boolean
;
/** 标签页高度 */
/** 标签页高度 */
...
...
packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue
View file @
ba539f6
...
@@ -69,7 +69,7 @@ const tabsView = computed((): TabConfig[] => {
...
@@ -69,7 +69,7 @@ const tabsView = computed((): TabConfig[] => {
v-for=
"(tab, i) in tabsView"
v-for=
"(tab, i) in tabsView"
:key=
"tab.key"
:key=
"tab.key"
ref=
"tabRef"
ref=
"tabRef"
:class=
"[
{ 'is-active': tab.key === active, dragable: !tab.affixTab }]"
:class=
"[
{ 'is-active': tab.key === active, drag
g
able: !tab.affixTab }]"
:data-active-tab="active"
:data-active-tab="active"
:data-index="i"
:data-index="i"
class="tabs-chrome__item draggable translate-all group relative -mr-3 flex h-full select-none items-center"
class="tabs-chrome__item draggable translate-all group relative -mr-3 flex h-full select-none items-center"
...
...
packages/@core/ui-kit/tabs-ui/src/components/tabs/tabs.vue
View file @
ba539f6
...
@@ -75,7 +75,7 @@ const tabsView = computed((): TabConfig[] => {
...
@@ -75,7 +75,7 @@ const tabsView = computed((): TabConfig[] => {
:class=
"[
:class=
"[
{
{
'is-active dark:bg-accent bg-primary/15': tab.key === active,
'is-active dark:bg-accent bg-primary/15': tab.key === active,
dragable: !tab.affixTab,
drag
g
able: !tab.affixTab,
},
},
typeWithClass.content,
typeWithClass.content,
]"
]"
...
...
packages/@core/ui-kit/tabs-ui/src/tabs-view.vue
View file @
ba539f6
...
@@ -17,7 +17,7 @@ defineOptions({
...
@@ -17,7 +17,7 @@ defineOptions({
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
contentClass
:
'vben-tabs-content'
,
contentClass
:
'vben-tabs-content'
,
dragable
:
true
,
drag
g
able
:
true
,
styleType
:
'chrome'
,
styleType
:
'chrome'
,
});
});
...
...
packages/@core/ui-kit/tabs-ui/src/types.ts
View file @
ba539f6
...
@@ -21,7 +21,7 @@ export interface TabsProps {
...
@@ -21,7 +21,7 @@ export interface TabsProps {
/**
/**
* @zh_CN 是否可以拖拽
* @zh_CN 是否可以拖拽
*/
*/
dragable
?:
boolean
;
drag
g
able
?:
boolean
;
/**
/**
* @zh_CN 间隙
* @zh_CN 间隙
* @default 7
* @default 7
...
...
packages/@core/ui-kit/tabs-ui/src/use-tabs-drag.ts
View file @
ba539f6
...
@@ -42,8 +42,8 @@ export function useTabsDrag(props: TabsProps, emit: EmitType) {
...
@@ -42,8 +42,8 @@ export function useTabsDrag(props: TabsProps, emit: EmitType) {
const
{
initializeSortable
}
=
useSortable
(
el
,
{
const
{
initializeSortable
}
=
useSortable
(
el
,
{
filter
:
(
_evt
,
target
:
HTMLElement
)
=>
{
filter
:
(
_evt
,
target
:
HTMLElement
)
=>
{
const
parent
=
findParentElement
(
target
);
const
parent
=
findParentElement
(
target
);
const
drag
able
=
parent
?.
classList
.
contains
(
'dra
gable'
);
const
drag
gable
=
parent
?.
classList
.
contains
(
'drag
gable'
);
return
!
drag
able
||
!
props
.
dra
gable
;
return
!
drag
gable
||
!
props
.
drag
gable
;
},
},
onEnd
(
evt
)
{
onEnd
(
evt
)
{
const
{
newIndex
,
oldIndex
}
=
evt
;
const
{
newIndex
,
oldIndex
}
=
evt
;
...
@@ -62,7 +62,7 @@ export function useTabsDrag(props: TabsProps, emit: EmitType) {
...
@@ -62,7 +62,7 @@ export function useTabsDrag(props: TabsProps, emit: EmitType) {
return
;
return
;
}
}
if
(
!
srcParent
.
classList
.
contains
(
'dragable'
))
{
if
(
!
srcParent
.
classList
.
contains
(
'drag
g
able'
))
{
resetElState
();
resetElState
();
return
;
return
;
...
@@ -81,7 +81,7 @@ export function useTabsDrag(props: TabsProps, emit: EmitType) {
...
@@ -81,7 +81,7 @@ export function useTabsDrag(props: TabsProps, emit: EmitType) {
},
},
onMove
(
evt
)
{
onMove
(
evt
)
{
const
parent
=
findParentElement
(
evt
.
related
);
const
parent
=
findParentElement
(
evt
.
related
);
return
parent
?.
classList
.
contains
(
'drag
able'
)
&&
props
.
dra
gable
;
return
parent
?.
classList
.
contains
(
'drag
gable'
)
&&
props
.
drag
gable
;
},
},
onStart
:
()
=>
{
onStart
:
()
=>
{
el
.
style
.
cursor
=
'grabbing'
;
el
.
style
.
cursor
=
'grabbing'
;
...
...
packages/effects/layouts/src/basic/tabbar/tabbar.vue
View file @
ba539f6
...
@@ -51,7 +51,7 @@ if (!preferences.tabbar.persist) {
...
@@ -51,7 +51,7 @@ if (!preferences.tabbar.persist) {
:active=
"currentActive"
:active=
"currentActive"
:class=
"theme"
:class=
"theme"
:context-menus=
"createContextMenus"
:context-menus=
"createContextMenus"
:drag
able=
"preferences.tabbar.dra
gable"
:drag
gable=
"preferences.tabbar.drag
gable"
:show-icon=
"showIcon"
:show-icon=
"showIcon"
:style-type=
"preferences.tabbar.styleType"
:style-type=
"preferences.tabbar.styleType"
:tabs=
"currentTabs"
:tabs=
"currentTabs"
...
...
packages/effects/layouts/src/widgets/preferences/blocks/layout/tabbar.vue
View file @
ba539f6
...
@@ -17,7 +17,7 @@ defineProps<{ disabled?: boolean }>();
...
@@ -17,7 +17,7 @@ defineProps<{ disabled?: boolean }>();
const
tabbarEnable
=
defineModel
<
boolean
>
(
'tabbarEnable'
);
const
tabbarEnable
=
defineModel
<
boolean
>
(
'tabbarEnable'
);
const
tabbarShowIcon
=
defineModel
<
boolean
>
(
'tabbarShowIcon'
);
const
tabbarShowIcon
=
defineModel
<
boolean
>
(
'tabbarShowIcon'
);
const
tabbarPersist
=
defineModel
<
boolean
>
(
'tabbarPersist'
);
const
tabbarPersist
=
defineModel
<
boolean
>
(
'tabbarPersist'
);
const
tabbarDrag
able
=
defineModel
<
boolean
>
(
'tabbarDra
gable'
);
const
tabbarDrag
gable
=
defineModel
<
boolean
>
(
'tabbarDrag
gable'
);
const
tabbarStyleType
=
defineModel
<
string
>
(
'tabbarStyleType'
);
const
tabbarStyleType
=
defineModel
<
string
>
(
'tabbarStyleType'
);
const
tabbarShowMore
=
defineModel
<
boolean
>
(
'tabbarShowMore'
);
const
tabbarShowMore
=
defineModel
<
boolean
>
(
'tabbarShowMore'
);
const
tabbarShowMaximize
=
defineModel
<
boolean
>
(
'tabbarShowMaximize'
);
const
tabbarShowMaximize
=
defineModel
<
boolean
>
(
'tabbarShowMaximize'
);
...
@@ -50,8 +50,8 @@ const styleItems = computed((): SelectOption[] => [
...
@@ -50,8 +50,8 @@ const styleItems = computed((): SelectOption[] => [
<SwitchItem
v-model=
"tabbarPersist"
:disabled=
"!tabbarEnable"
>
<SwitchItem
v-model=
"tabbarPersist"
:disabled=
"!tabbarEnable"
>
{{
$t
(
'preferences.tabbar.persist'
)
}}
{{
$t
(
'preferences.tabbar.persist'
)
}}
</SwitchItem>
</SwitchItem>
<SwitchItem
v-model=
"tabbarDragable"
:disabled=
"!tabbarEnable"
>
<SwitchItem
v-model=
"tabbarDrag
g
able"
:disabled=
"!tabbarEnable"
>
{{
$t
(
'preferences.tabbar.dragable'
)
}}
{{
$t
(
'preferences.tabbar.drag
g
able'
)
}}
</SwitchItem>
</SwitchItem>
<SwitchItem
v-model=
"tabbarShowIcon"
:disabled=
"!tabbarEnable"
>
<SwitchItem
v-model=
"tabbarShowIcon"
:disabled=
"!tabbarEnable"
>
{{
$t
(
'preferences.tabbar.icon'
)
}}
{{
$t
(
'preferences.tabbar.icon'
)
}}
...
...
packages/effects/layouts/src/widgets/preferences/preferences-drawer.vue
View file @
ba539f6
...
@@ -102,7 +102,7 @@ const tabbarShowIcon = defineModel<boolean>('tabbarShowIcon');
...
@@ -102,7 +102,7 @@ const tabbarShowIcon = defineModel<boolean>('tabbarShowIcon');
const
tabbarShowMore
=
defineModel
<
boolean
>
(
'tabbarShowMore'
);
const
tabbarShowMore
=
defineModel
<
boolean
>
(
'tabbarShowMore'
);
const
tabbarShowMaximize
=
defineModel
<
boolean
>
(
'tabbarShowMaximize'
);
const
tabbarShowMaximize
=
defineModel
<
boolean
>
(
'tabbarShowMaximize'
);
const
tabbarPersist
=
defineModel
<
boolean
>
(
'tabbarPersist'
);
const
tabbarPersist
=
defineModel
<
boolean
>
(
'tabbarPersist'
);
const
tabbarDrag
able
=
defineModel
<
boolean
>
(
'tabbarDra
gable'
);
const
tabbarDrag
gable
=
defineModel
<
boolean
>
(
'tabbarDrag
gable'
);
const
tabbarStyleType
=
defineModel
<
string
>
(
'tabbarStyleType'
);
const
tabbarStyleType
=
defineModel
<
string
>
(
'tabbarStyleType'
);
const
navigationStyleType
=
defineModel
<
NavigationStyleType
>
(
const
navigationStyleType
=
defineModel
<
NavigationStyleType
>
(
...
@@ -339,7 +339,7 @@ async function handleReset() {
...
@@ -339,7 +339,7 @@ async function handleReset() {
</Block>
</Block>
<Block
:title=
"$t('preferences.tabbar.title')"
>
<Block
:title=
"$t('preferences.tabbar.title')"
>
<Tabbar
<Tabbar
v-model:tabbar-drag
able=
"tabbarDra
gable"
v-model:tabbar-drag
gable=
"tabbarDrag
gable"
v-model:tabbar-enable=
"tabbarEnable"
v-model:tabbar-enable=
"tabbarEnable"
v-model:tabbar-persist=
"tabbarPersist"
v-model:tabbar-persist=
"tabbarPersist"
v-model:tabbar-show-icon=
"tabbarShowIcon"
v-model:tabbar-show-icon=
"tabbarShowIcon"
...
...
packages/locales/src/langs/en-US.json
View file @
ba539f6
...
@@ -206,7 +206,7 @@
...
@@ -206,7 +206,7 @@
"showMore"
:
"Show More Button"
,
"showMore"
:
"Show More Button"
,
"showMaximize"
:
"Show Maximize Button"
,
"showMaximize"
:
"Show Maximize Button"
,
"persist"
:
"Persist Tabs"
,
"persist"
:
"Persist Tabs"
,
"drag
able"
:
"Enable Dra
gable Sort"
,
"drag
gable"
:
"Enable Drag
gable Sort"
,
"styleType"
:
{
"styleType"
:
{
"title"
:
"Tabs Style"
,
"title"
:
"Tabs Style"
,
"chrome"
:
"Chrome"
,
"chrome"
:
"Chrome"
,
...
...
packages/locales/src/langs/zh-CN.json
View file @
ba539f6
...
@@ -206,7 +206,7 @@
...
@@ -206,7 +206,7 @@
"showMore"
:
"显示更多按钮"
,
"showMore"
:
"显示更多按钮"
,
"showMaximize"
:
"显示最大化按钮"
,
"showMaximize"
:
"显示最大化按钮"
,
"persist"
:
"持久化标签页"
,
"persist"
:
"持久化标签页"
,
"dragable"
:
"启动拖拽排序"
,
"drag
g
able"
:
"启动拖拽排序"
,
"styleType"
:
{
"styleType"
:
{
"title"
:
"标签页风格"
,
"title"
:
"标签页风格"
,
"chrome"
:
"谷歌"
,
"chrome"
:
"谷歌"
,
...
...
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