Skip to content

Commit 897be52

Browse files
authored
fix: change Code Comments language from Chinese into English
1 parent caf4a60 commit 897be52

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/split/src/Split.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default defineComponent({
106106
if (props.watchProps?.includes('defaultSize')) {
107107
watchEffect(() => (uncontrolledSizeRef.value = props.defaultSize))
108108
}
109-
// 更新受控或非受控的大小值
109+
// Update controlled or uncontrolled size values
110110
const doUpdateSize = (size: number | string): void => {
111111
const _onUpdateSize = props['onUpdate:size']
112112
if (props.onUpdateSize)
@@ -116,9 +116,9 @@ export default defineComponent({
116116
uncontrolledSizeRef.value = size
117117
}
118118
const mergedSizeRef = useMergedState(controlledSizeRef, uncontrolledSizeRef)
119-
// lazy true 时,拖拽过程中先将新的大小保存到 pendingSizeRef
119+
// When lazy is true, save the new size to pendingSizeRef during dragging
120120
const pendingSizeRef = ref(mergedSizeRef.value)
121-
// 用于实时显示拖拽指示线的样式
121+
// Styles for real-time display of drag and drop indicator lines
122122
const indicatorStyle = ref<CSSProperties>({})
123123

124124
const firstPaneStyle = computed(() => {
@@ -173,7 +173,7 @@ export default defineComponent({
173173
props.onDragMove(e)
174174
}
175175
const onMouseUp = (e: MouseEvent): void => {
176-
// lazy 模式下拖拽结束时更新大小,并清空指示线
176+
// Update the size at the end of dragging in lazy mode and clear the indicator line
177177
if (props.lazy) {
178178
doUpdateSize(pendingSizeRef.value)
179179
indicatorStyle.value = {}
@@ -240,10 +240,10 @@ export default defineComponent({
240240
else {
241241
newSize = nextPxSize / containerUsableSize
242242
}
243-
// 根据 lazy 判断是否立即更新
243+
// Judging from lazy whether to update immediately
244244
if (props.lazy) {
245245
pendingSizeRef.value = newSize
246-
// 更新指示线样式,指示线跟随鼠标移动
246+
// Update the indicator line style, the indicator line follows the mouse
247247
if (direction === 'horizontal') {
248248
indicatorStyle.value = {
249249
position: 'absolute',

0 commit comments

Comments
 (0)