@@ -106,7 +106,7 @@ export default defineComponent({
106
106
if ( props . watchProps ?. includes ( 'defaultSize' ) ) {
107
107
watchEffect ( ( ) => ( uncontrolledSizeRef . value = props . defaultSize ) )
108
108
}
109
- // 更新受控或非受控的大小值
109
+ // Update controlled or uncontrolled size values
110
110
const doUpdateSize = ( size : number | string ) : void => {
111
111
const _onUpdateSize = props [ 'onUpdate:size' ]
112
112
if ( props . onUpdateSize )
@@ -116,9 +116,9 @@ export default defineComponent({
116
116
uncontrolledSizeRef . value = size
117
117
}
118
118
const mergedSizeRef = useMergedState ( controlledSizeRef , uncontrolledSizeRef )
119
- // 当 lazy 为 true 时,拖拽过程中先将新的大小保存到 pendingSizeRef
119
+ // When lazy is true, save the new size to pendingSizeRef during dragging
120
120
const pendingSizeRef = ref ( mergedSizeRef . value )
121
- // 用于实时显示拖拽指示线的样式
121
+ // Styles for real-time display of drag and drop indicator lines
122
122
const indicatorStyle = ref < CSSProperties > ( { } )
123
123
124
124
const firstPaneStyle = computed ( ( ) => {
@@ -173,7 +173,7 @@ export default defineComponent({
173
173
props . onDragMove ( e )
174
174
}
175
175
const onMouseUp = ( e : MouseEvent ) : void => {
176
- // lazy 模式下拖拽结束时更新大小,并清空指示线
176
+ // Update the size at the end of dragging in lazy mode and clear the indicator line
177
177
if ( props . lazy ) {
178
178
doUpdateSize ( pendingSizeRef . value )
179
179
indicatorStyle . value = { }
@@ -240,10 +240,10 @@ export default defineComponent({
240
240
else {
241
241
newSize = nextPxSize / containerUsableSize
242
242
}
243
- // 根据 lazy 判断是否立即更新
243
+ // Judging from lazy whether to update immediately
244
244
if ( props . lazy ) {
245
245
pendingSizeRef . value = newSize
246
- // 更新指示线样式,指示线跟随鼠标移动
246
+ // Update the indicator line style, the indicator line follows the mouse
247
247
if ( direction === 'horizontal' ) {
248
248
indicatorStyle . value = {
249
249
position : 'absolute' ,
0 commit comments