ElDynamicSizeList: fix horizontal scrollbar bug (#2494)

* ElDynamicSizeList: fix horizontal scrollbar bug

* Scrollbar: delete never used var
This commit is contained in:
Summer
2021-07-12 09:19:17 +08:00
committed by GitHub
parent d334142d0d
commit d49a0e13df

View File

@@ -4,7 +4,7 @@ import { rAF, cAF } from '@element-plus/utils/raf'
import isServer from '@element-plus/utils/isServer'
import { NOOP } from '@vue/shared'
import { DefaultScrollBarProps, ScrollbarSizeKey, ScrollbarDirKey, SCROLLBAR_MIN_SIZE } from '../defaults'
import { DefaultScrollBarProps, SCROLLBAR_MIN_SIZE, HORIZONTAL } from '../defaults'
import { renderThumbStyle } from '../utils'
import { BAR_MAP } from '../../../scrollbar/src/util'
@@ -36,11 +36,10 @@ const ScrollBar = defineComponent({
const trackStyle = computed<CSSProperties>(() => ({
display: props.visible ? null : 'none',
position: 'absolute',
[ScrollbarSizeKey[props.layout]]: '6px',
[ScrollbarDirKey[props.layout]]: '2px',
width: HORIZONTAL === props.layout ? '100%' : '6px',
height: HORIZONTAL === props.layout ? '6px' : '100%',
right: '2px',
bottom: '2px',
height: '100%',
borderRadius: '4px',
}))