{
'splitter__gutter--vertical': direction === 'vertical',
}"
:style="{
+ /* 根据方向设置分隔条的宽度或高度 */
[direction === 'horizontal' ? 'width' : 'height']: `${gutterSize}px`,
+ /* 计算分隔条的位置:根据前面所有面板的尺寸百分比总和确定位置 */
[direction === 'horizontal' ? 'left' : 'top']:
`calc(${panes.slice(0, index + 1).reduce((sum, pane) => sum + pane.size, 0)}% - ${gutterSize / 2}px)`,
}"
@mousedown="handleDragStart(index, $event)"
>
+