tweak client
This commit is contained in:
		
							parent
							
								
									be383aa5b2
								
							
						
					
					
						commit
						d3f25fa290
					
				
					 3 changed files with 17 additions and 4 deletions
				
			
		|  | @ -114,7 +114,11 @@ function onTabMousedown(tab: Tab, ev: MouseEvent): void { | |||
| } | ||||
| 
 | ||||
| function onTabClick(tab: Tab, ev: MouseEvent): void { | ||||
| 	if (tab.onClick) tab.onClick(ev); | ||||
| 	if (tab.onClick) { | ||||
| 		ev.preventDefault(); | ||||
| 		ev.stopPropagation(); | ||||
| 		tab.onClick(ev); | ||||
| 	} | ||||
| 	if (tab.key) { | ||||
| 		emit('update:tab', tab.key); | ||||
| 	} | ||||
|  | @ -150,7 +154,7 @@ onMounted(() => { | |||
| 	if (el && el.parentElement) { | ||||
| 		narrow = el.parentElement.offsetWidth < 500; | ||||
| 		ro = new ResizeObserver((entries, observer) => { | ||||
| 			if (el.parentElement) { | ||||
| 			if (el.parentElement && document.body.contains(el)) { | ||||
| 				narrow = el.parentElement.offsetWidth < 500; | ||||
| 			} | ||||
| 		}); | ||||
|  | @ -268,6 +272,8 @@ onUnmounted(() => { | |||
| 
 | ||||
| 		> .icon { | ||||
| 			margin-right: 8px; | ||||
| 			width: 16px; | ||||
| 			text-align: center; | ||||
| 		} | ||||
| 
 | ||||
| 		> .title { | ||||
|  |  | |||
|  | @ -402,7 +402,7 @@ export default defineComponent({ | |||
|     height: 100%; | ||||
| 
 | ||||
| 		> .header { | ||||
| 			--height: 50px; | ||||
| 			--height: 45px; | ||||
| 
 | ||||
| 			&.mini { | ||||
| 				--height: 38px; | ||||
|  | @ -415,6 +415,7 @@ export default defineComponent({ | |||
| 			user-select: none; | ||||
| 			height: var(--height); | ||||
| 			border-bottom: solid 1px var(--divider); | ||||
| 			font-size: 95%; | ||||
| 
 | ||||
| 			> .left, > .right { | ||||
| 				> .button { | ||||
|  |  | |||
|  | @ -105,7 +105,11 @@ function onTabMousedown(tab: Tab, ev: MouseEvent): void { | |||
| } | ||||
| 
 | ||||
| function onTabClick(tab: Tab, ev: MouseEvent): void { | ||||
| 	if (tab.onClick) tab.onClick(ev); | ||||
| 	if (tab.onClick) { | ||||
| 		ev.preventDefault(); | ||||
| 		ev.stopPropagation(); | ||||
| 		tab.onClick(ev); | ||||
| 	} | ||||
| 	if (tab.key) { | ||||
| 		emit('update:tab', tab.key); | ||||
| 	} | ||||
|  | @ -217,6 +221,8 @@ onUnmounted(() => { | |||
| 
 | ||||
| 		> .icon { | ||||
| 			margin-right: 8px; | ||||
| 			width: 16px; | ||||
| 			text-align: center; | ||||
| 		} | ||||
| 
 | ||||
| 		> .title { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue