diff --git a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap index 2491e6a522..15e28e5f15 100644 --- a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -7591,9 +7591,9 @@ exports[`renders components/form/demo/layout-can-wrap.tsx extend context correct
- 超长标签文案超长标签文案 + A super long label text
- 正常标签文案 + Normal label
- 超长标签文案超长标签文案 + A super long label text
( colon={false} style={{ maxWidth: 600 }} > - + - + diff --git a/components/tag/demo/draggable.tsx b/components/tag/demo/draggable.tsx index 9e8820b96c..559cb14842 100644 --- a/components/tag/demo/draggable.tsx +++ b/components/tag/demo/draggable.tsx @@ -25,14 +25,14 @@ const DraggableTag: FC = (props) => { const commonStyle = { cursor: 'move', - transition: 'unset', // 防止拖拽完毕之后元素抖动 + transition: 'unset', // Prevent element from shaking after drag }; const style = transform ? { ...commonStyle, transform: `translate3d(${transform.x}px, ${transform.y}px, 0)`, - transition: isDragging ? 'unset' : transition, // 处理拖拽中的元素不跟手的问题 + transition: isDragging ? 'unset' : transition, // Improve performance/visual effect when dragging } : commonStyle; diff --git a/components/tree/demo/drag-debug.tsx b/components/tree/demo/drag-debug.tsx index 3442009846..581b42928b 100644 --- a/components/tree/demo/drag-debug.tsx +++ b/components/tree/demo/drag-debug.tsx @@ -40,7 +40,7 @@ const App: React.FC = () => { const onDragEnter: TreeProps['onDragEnter'] = (info) => { console.log(info); - // expandedKeys 需要受控时设置 + // expandedKeys, set it when controlled is needed setExpandedKeys(info.expandedKeys); }; @@ -79,7 +79,7 @@ const App: React.FC = () => { // Drop on the content loop(data, dropKey, (item) => { item.children = item.children || []; - // where to insert 示例添加到尾部,可以是随意位置 + // where to insert. New item was inserted to the end of the array in this example, but can be anywhere item.children.push(dragObj); }); } else if ( @@ -89,7 +89,7 @@ const App: React.FC = () => { ) { loop(data, dropKey, (item) => { item.children = item.children || []; - // where to insert 示例添加到头部,可以是随意位置 + // where to insert. New item was inserted to the start of the array in this example, but can be anywhere item.children.unshift(dragObj); }); } else { diff --git a/components/tree/demo/draggable.tsx b/components/tree/demo/draggable.tsx index 6c4bb62049..0f8b8d8249 100644 --- a/components/tree/demo/draggable.tsx +++ b/components/tree/demo/draggable.tsx @@ -36,7 +36,7 @@ const App: React.FC = () => { const onDragEnter: TreeProps['onDragEnter'] = (info) => { console.log(info); - // expandedKeys 需要受控时设置 + // expandedKeys, set it when controlled is needed // setExpandedKeys(info.expandedKeys) }; @@ -74,7 +74,7 @@ const App: React.FC = () => { // Drop on the content loop(data, dropKey, (item) => { item.children = item.children || []; - // where to insert 示例添加到头部,可以是随意位置 + // where to insert. New item was inserted to the start of the array in this example, but can be anywhere item.children.unshift(dragObj); }); } else if ( @@ -84,7 +84,7 @@ const App: React.FC = () => { ) { loop(data, dropKey, (item) => { item.children = item.children || []; - // where to insert 示例添加到头部,可以是随意位置 + // where to insert. New item was inserted to the start of the array in this example, but can be anywhere item.children.unshift(dragObj); // in previous version, we use item.children.push(dragObj) to insert the // item to the tail of the children