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

chore: correct spelling for 'dragable' #4598

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/en/guide/essentials/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ const defaultPreferences: Preferences = {
width: 230,
},
tabbar: {
dragable: true,
draggable: true,
enable: true,
height: 36,
keepAlive: true,
Expand Down Expand Up @@ -406,7 +406,7 @@ interface ShortcutKeyPreferences {

interface TabbarPreferences {
/** Whether dragging of multiple tabs is enabled */
dragable: boolean;
draggable: boolean;
/** Whether multiple tabs are enabled */
enable: boolean;
/** Tab height */
Expand Down
4 changes: 2 additions & 2 deletions docs/src/guide/essentials/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ const defaultPreferences: Preferences = {
width: 230,
},
tabbar: {
dragable: true,
draggable: true,
enable: true,
height: 36,
keepAlive: true,
Expand Down Expand Up @@ -430,7 +430,7 @@ interface ShortcutKeyPreferences {

interface TabbarPreferences {
/** 是否开启多标签页拖拽 */
dragable: boolean;
draggable: boolean;
/** 是否开启多标签页 */
enable: boolean;
/** 标签页高度 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ exports[`defaultPreferences immutability test > should not modify the config obj
"width": 224,
},
"tabbar": {
"dragable": true,
"draggable": true,
"enable": true,
"height": 38,
"keepAlive": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/@core/preferences/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const defaultPreferences: Preferences = {
width: 224,
},
tabbar: {
dragable: true,
draggable: true,
enable: true,
height: 38,
keepAlive: true,
Expand All @@ -90,7 +90,7 @@ const defaultPreferences: Preferences = {
colorPrimary: 'hsl(212 100% 45%)',
colorSuccess: 'hsl(144 57% 58%)',
colorWarning: 'hsl(42 84% 61%)',
mode: 'dark',
mode: 'auto',
radius: '0.5',
semiDarkHeader: false,
semiDarkSidebar: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/@core/preferences/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ interface ShortcutKeyPreferences {

interface TabbarPreferences {
/** 是否开启多标签页拖拽 */
dragable: boolean;
draggable: boolean;
/** 是否开启多标签页 */
enable: boolean;
/** 标签页高度 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const tabsView = computed((): TabConfig[] => {
v-for="(tab, i) in tabsView"
:key="tab.key"
ref="tabRef"
:class="[{ 'is-active': tab.key === active, dragable: !tab.affixTab }]"
:class="[{ 'is-active': tab.key === active, draggable: !tab.affixTab }]"
:data-active-tab="active"
:data-index="i"
class="tabs-chrome__item draggable translate-all group relative -mr-3 flex h-full select-none items-center"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const tabsView = computed((): TabConfig[] => {
:class="[
{
'is-active dark:bg-accent bg-primary/15': tab.key === active,
dragable: !tab.affixTab,
draggable: !tab.affixTab,
},
typeWithClass.content,
]"
Expand Down
2 changes: 1 addition & 1 deletion packages/@core/ui-kit/tabs-ui/src/tabs-view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defineOptions({

const props = withDefaults(defineProps<Props>(), {
contentClass: 'vben-tabs-content',
dragable: true,
draggable: true,
styleType: 'chrome',
});

Expand Down
2 changes: 1 addition & 1 deletion packages/@core/ui-kit/tabs-ui/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface TabsProps {
/**
* @zh_CN 是否可以拖拽
*/
dragable?: boolean;
draggable?: boolean;
/**
* @zh_CN 间隙
* @default 7
Expand Down
8 changes: 4 additions & 4 deletions packages/@core/ui-kit/tabs-ui/src/use-tabs-drag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export function useTabsDrag(props: TabsProps, emit: EmitType) {
const { initializeSortable } = useSortable(el, {
filter: (_evt, target: HTMLElement) => {
const parent = findParentElement(target);
const dragable = parent?.classList.contains('dragable');
return !dragable || !props.dragable;
const draggable = parent?.classList.contains('draggable');
return !draggable || !props.draggable;
},
onEnd(evt) {
const { newIndex, oldIndex } = evt;
Expand All @@ -62,7 +62,7 @@ export function useTabsDrag(props: TabsProps, emit: EmitType) {
return;
}

if (!srcParent.classList.contains('dragable')) {
if (!srcParent.classList.contains('draggable')) {
resetElState();

return;
Expand All @@ -81,7 +81,7 @@ export function useTabsDrag(props: TabsProps, emit: EmitType) {
},
onMove(evt) {
const parent = findParentElement(evt.related);
return parent?.classList.contains('dragable') && props.dragable;
return parent?.classList.contains('draggable') && props.draggable;
},
onStart: () => {
el.style.cursor = 'grabbing';
Expand Down
2 changes: 1 addition & 1 deletion packages/effects/layouts/src/basic/tabbar/tabbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if (!preferences.tabbar.persist) {
:active="currentActive"
:class="theme"
:context-menus="createContextMenus"
:dragable="preferences.tabbar.dragable"
:draggable="preferences.tabbar.draggable"
:show-icon="showIcon"
:style-type="preferences.tabbar.styleType"
:tabs="currentTabs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defineProps<{ disabled?: boolean }>();
const tabbarEnable = defineModel<boolean>('tabbarEnable');
const tabbarShowIcon = defineModel<boolean>('tabbarShowIcon');
const tabbarPersist = defineModel<boolean>('tabbarPersist');
const tabbarDragable = defineModel<boolean>('tabbarDragable');
const tabbarDraggable = defineModel<boolean>('tabbarDraggable');
const tabbarStyleType = defineModel<string>('tabbarStyleType');
const tabbarShowMore = defineModel<boolean>('tabbarShowMore');
const tabbarShowMaximize = defineModel<boolean>('tabbarShowMaximize');
Expand Down Expand Up @@ -50,8 +50,8 @@ const styleItems = computed((): SelectOption[] => [
<SwitchItem v-model="tabbarPersist" :disabled="!tabbarEnable">
{{ $t('preferences.tabbar.persist') }}
</SwitchItem>
<SwitchItem v-model="tabbarDragable" :disabled="!tabbarEnable">
{{ $t('preferences.tabbar.dragable') }}
<SwitchItem v-model="tabbarDraggable" :disabled="!tabbarEnable">
{{ $t('preferences.tabbar.draggable') }}
</SwitchItem>
<SwitchItem v-model="tabbarShowIcon" :disabled="!tabbarEnable">
{{ $t('preferences.tabbar.icon') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const tabbarShowIcon = defineModel<boolean>('tabbarShowIcon');
const tabbarShowMore = defineModel<boolean>('tabbarShowMore');
const tabbarShowMaximize = defineModel<boolean>('tabbarShowMaximize');
const tabbarPersist = defineModel<boolean>('tabbarPersist');
const tabbarDragable = defineModel<boolean>('tabbarDragable');
const tabbarDraggable = defineModel<boolean>('tabbarDraggable');
const tabbarStyleType = defineModel<string>('tabbarStyleType');

const navigationStyleType = defineModel<NavigationStyleType>(
Expand Down Expand Up @@ -339,7 +339,7 @@ async function handleReset() {
</Block>
<Block :title="$t('preferences.tabbar.title')">
<Tabbar
v-model:tabbar-dragable="tabbarDragable"
v-model:tabbar-draggable="tabbarDraggable"
v-model:tabbar-enable="tabbarEnable"
v-model:tabbar-persist="tabbarPersist"
v-model:tabbar-show-icon="tabbarShowIcon"
Expand Down
2 changes: 1 addition & 1 deletion packages/locales/src/langs/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
"showMore": "Show More Button",
"showMaximize": "Show Maximize Button",
"persist": "Persist Tabs",
"dragable": "Enable Dragable Sort",
"draggable": "Enable Draggable Sort",
"styleType": {
"title": "Tabs Style",
"chrome": "Chrome",
Expand Down
2 changes: 1 addition & 1 deletion packages/locales/src/langs/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
"showMore": "显示更多按钮",
"showMaximize": "显示最大化按钮",
"persist": "持久化标签页",
"dragable": "启动拖拽排序",
"draggable": "启动拖拽排序",
"styleType": {
"title": "标签页风格",
"chrome": "谷歌",
Expand Down
Loading