chore: correct spelling for 'dragable' (#4600)
							parent
							
								
									078f255e1a
								
							
						
					
					
						commit
						ba539f6793
					
				|  | @ -226,7 +226,7 @@ const defaultPreferences: Preferences = { | ||||||
|     width: 230, |     width: 230, | ||||||
|   }, |   }, | ||||||
|   tabbar: { |   tabbar: { | ||||||
|     dragable: true, |     draggable: true, | ||||||
|     enable: true, |     enable: true, | ||||||
|     height: 36, |     height: 36, | ||||||
|     keepAlive: true, |     keepAlive: true, | ||||||
|  | @ -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; |   draggable: boolean; | ||||||
|   /** Whether multiple tabs are enabled */ |   /** Whether multiple tabs are enabled */ | ||||||
|   enable: boolean; |   enable: boolean; | ||||||
|   /** Tab height */ |   /** Tab height */ | ||||||
|  |  | ||||||
|  | @ -248,7 +248,7 @@ const defaultPreferences: Preferences = { | ||||||
|     width: 230, |     width: 230, | ||||||
|   }, |   }, | ||||||
|   tabbar: { |   tabbar: { | ||||||
|     dragable: true, |     draggable: true, | ||||||
|     enable: true, |     enable: true, | ||||||
|     height: 36, |     height: 36, | ||||||
|     keepAlive: true, |     keepAlive: true, | ||||||
|  | @ -430,7 +430,7 @@ interface ShortcutKeyPreferences { | ||||||
| 
 | 
 | ||||||
| interface TabbarPreferences { | interface TabbarPreferences { | ||||||
|   /** 是否开启多标签页拖拽 */ |   /** 是否开启多标签页拖拽 */ | ||||||
|   dragable: boolean; |   draggable: boolean; | ||||||
|   /** 是否开启多标签页 */ |   /** 是否开启多标签页 */ | ||||||
|   enable: boolean; |   enable: boolean; | ||||||
|   /** 标签页高度 */ |   /** 标签页高度 */ | ||||||
|  |  | ||||||
|  | @ -73,7 +73,7 @@ exports[`defaultPreferences immutability test > should not modify the config obj | ||||||
|     "width": 224, |     "width": 224, | ||||||
|   }, |   }, | ||||||
|   "tabbar": { |   "tabbar": { | ||||||
|     "dragable": true, |     "draggable": true, | ||||||
|     "enable": true, |     "enable": true, | ||||||
|     "height": 38, |     "height": 38, | ||||||
|     "keepAlive": true, |     "keepAlive": true, | ||||||
|  |  | ||||||
|  | @ -73,7 +73,7 @@ const defaultPreferences: Preferences = { | ||||||
|     width: 224, |     width: 224, | ||||||
|   }, |   }, | ||||||
|   tabbar: { |   tabbar: { | ||||||
|     dragable: true, |     draggable: true, | ||||||
|     enable: true, |     enable: true, | ||||||
|     height: 38, |     height: 38, | ||||||
|     keepAlive: true, |     keepAlive: true, | ||||||
|  |  | ||||||
|  | @ -154,7 +154,7 @@ interface ShortcutKeyPreferences { | ||||||
| 
 | 
 | ||||||
| interface TabbarPreferences { | interface TabbarPreferences { | ||||||
|   /** 是否开启多标签页拖拽 */ |   /** 是否开启多标签页拖拽 */ | ||||||
|   dragable: boolean; |   draggable: boolean; | ||||||
|   /** 是否开启多标签页 */ |   /** 是否开启多标签页 */ | ||||||
|   enable: boolean; |   enable: boolean; | ||||||
|   /** 标签页高度 */ |   /** 标签页高度 */ | ||||||
|  |  | ||||||
|  | @ -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, draggable: !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" | ||||||
|  |  | ||||||
|  | @ -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, |             draggable: !tab.affixTab, | ||||||
|           }, |           }, | ||||||
|           typeWithClass.content, |           typeWithClass.content, | ||||||
|         ]" |         ]" | ||||||
|  |  | ||||||
|  | @ -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, |   draggable: true, | ||||||
|   styleType: 'chrome', |   styleType: 'chrome', | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -21,7 +21,7 @@ export interface TabsProps { | ||||||
|   /** |   /** | ||||||
|    * @zh_CN 是否可以拖拽 |    * @zh_CN 是否可以拖拽 | ||||||
|    */ |    */ | ||||||
|   dragable?: boolean; |   draggable?: boolean; | ||||||
|   /** |   /** | ||||||
|    * @zh_CN 间隙 |    * @zh_CN 间隙 | ||||||
|    * @default 7 |    * @default 7 | ||||||
|  |  | ||||||
|  | @ -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 dragable = parent?.classList.contains('dragable'); |         const draggable = parent?.classList.contains('draggable'); | ||||||
|         return !dragable || !props.dragable; |         return !draggable || !props.draggable; | ||||||
|       }, |       }, | ||||||
|       onEnd(evt) { |       onEnd(evt) { | ||||||
|         const { newIndex, oldIndex } = evt; |         const { newIndex, oldIndex } = evt; | ||||||
|  | @ -62,7 +62,7 @@ export function useTabsDrag(props: TabsProps, emit: EmitType) { | ||||||
|           return; |           return; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         if (!srcParent.classList.contains('dragable')) { |         if (!srcParent.classList.contains('draggable')) { | ||||||
|           resetElState(); |           resetElState(); | ||||||
| 
 | 
 | ||||||
|           return; |           return; | ||||||
|  | @ -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('dragable') && props.dragable; |         return parent?.classList.contains('draggable') && props.draggable; | ||||||
|       }, |       }, | ||||||
|       onStart: () => { |       onStart: () => { | ||||||
|         el.style.cursor = 'grabbing'; |         el.style.cursor = 'grabbing'; | ||||||
|  |  | ||||||
|  | @ -51,7 +51,7 @@ if (!preferences.tabbar.persist) { | ||||||
|     :active="currentActive" |     :active="currentActive" | ||||||
|     :class="theme" |     :class="theme" | ||||||
|     :context-menus="createContextMenus" |     :context-menus="createContextMenus" | ||||||
|     :dragable="preferences.tabbar.dragable" |     :draggable="preferences.tabbar.draggable" | ||||||
|     :show-icon="showIcon" |     :show-icon="showIcon" | ||||||
|     :style-type="preferences.tabbar.styleType" |     :style-type="preferences.tabbar.styleType" | ||||||
|     :tabs="currentTabs" |     :tabs="currentTabs" | ||||||
|  |  | ||||||
|  | @ -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 tabbarDragable = defineModel<boolean>('tabbarDragable'); | const tabbarDraggable = defineModel<boolean>('tabbarDraggable'); | ||||||
| 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[] => [ | ||||||
|   <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="tabbarDraggable" :disabled="!tabbarEnable"> | ||||||
|     {{ $t('preferences.tabbar.dragable') }} |     {{ $t('preferences.tabbar.draggable') }} | ||||||
|   </SwitchItem> |   </SwitchItem> | ||||||
|   <SwitchItem v-model="tabbarShowIcon" :disabled="!tabbarEnable"> |   <SwitchItem v-model="tabbarShowIcon" :disabled="!tabbarEnable"> | ||||||
|     {{ $t('preferences.tabbar.icon') }} |     {{ $t('preferences.tabbar.icon') }} | ||||||
|  |  | ||||||
|  | @ -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 tabbarDragable = defineModel<boolean>('tabbarDragable'); | const tabbarDraggable = defineModel<boolean>('tabbarDraggable'); | ||||||
| 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() { | ||||||
|             </Block> |             </Block> | ||||||
|             <Block :title="$t('preferences.tabbar.title')"> |             <Block :title="$t('preferences.tabbar.title')"> | ||||||
|               <Tabbar |               <Tabbar | ||||||
|                 v-model:tabbar-dragable="tabbarDragable" |                 v-model:tabbar-draggable="tabbarDraggable" | ||||||
|                 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" | ||||||
|  |  | ||||||
|  | @ -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", | ||||||
|       "dragable": "Enable Dragable Sort", |       "draggable": "Enable Draggable Sort", | ||||||
|       "styleType": { |       "styleType": { | ||||||
|         "title": "Tabs Style", |         "title": "Tabs Style", | ||||||
|         "chrome": "Chrome", |         "chrome": "Chrome", | ||||||
|  |  | ||||||
|  | @ -206,7 +206,7 @@ | ||||||
|       "showMore": "显示更多按钮", |       "showMore": "显示更多按钮", | ||||||
|       "showMaximize": "显示最大化按钮", |       "showMaximize": "显示最大化按钮", | ||||||
|       "persist": "持久化标签页", |       "persist": "持久化标签页", | ||||||
|       "dragable": "启动拖拽排序", |       "draggable": "启动拖拽排序", | ||||||
|       "styleType": { |       "styleType": { | ||||||
|         "title": "标签页风格", |         "title": "标签页风格", | ||||||
|         "chrome": "谷歌", |         "chrome": "谷歌", | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Netfan
						Netfan