Browse Source

chore: auto merge branches (#40583)

chore: master merge feature again
pull/40591/head
github-actions[bot] 2 years ago
committed by GitHub
parent
commit
4ee51e2c2b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      components/slider/index.en-US.md
  2. 2
      components/slider/index.tsx
  3. 17
      components/upload/demo/drag-sorting.tsx
  4. 1
      package.json

3
components/slider/index.en-US.md

@ -48,7 +48,8 @@ To input a value in a range.
| vertical | If true, the slider will be vertical | boolean | false | |
| onAfterChange | Fire when onmouseup is fired | (value) => void | - | |
| onChange | Callback function that is fired when the user changes the slider's value | (value) => void | - | |
| trackStyle | The style of slider track | CSSProperties | - | |
| trackStyle | The style of slider track (the active range) | CSSProperties | - | |
| railStyle | The style of slider rail (the background) | CSSProperties | - | |
| handleStyle | The style of slider handle | CSSProperties | - | |
### range

2
components/slider/index.tsx

@ -77,6 +77,7 @@ export interface SliderSingleProps extends SliderBaseProps {
onAfterChange?: (value: number) => void;
handleStyle?: React.CSSProperties;
trackStyle?: React.CSSProperties;
railStyle?: React.CSSProperties;
}
export interface SliderRangeProps extends SliderBaseProps {
@ -87,6 +88,7 @@ export interface SliderRangeProps extends SliderBaseProps {
onAfterChange?: (value: [number, number]) => void;
handleStyle?: React.CSSProperties[];
trackStyle?: React.CSSProperties[];
railStyle?: React.CSSProperties;
}
interface SliderRange {

17
components/upload/demo/drag-sorting.tsx

@ -1,8 +1,7 @@
import React, { useCallback, useRef, useState } from 'react';
import { UploadOutlined } from '@ant-design/icons';
import { Button, Tooltip, Upload } from 'antd';
import type { UploadFile, UploadProps } from 'antd/es/upload/interface';
import update from 'immutability-helper';
import React, { useCallback, useRef, useState } from 'react';
import { DndProvider, useDrag, useDrop } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
@ -95,14 +94,12 @@ const App: React.FC = () => {
const moveRow = useCallback(
(dragIndex: number, hoverIndex: number) => {
const dragRow = fileList[dragIndex];
setFileList(
update(fileList, {
$splice: [
[dragIndex, 1],
[hoverIndex, 0, dragRow],
],
}),
);
setFileList((currentFileList) => {
const newFileList = [...currentFileList];
newFileList.splice(dragIndex, 1);
newFileList.splice(hoverIndex, 0, dragRow);
return newFileList;
});
},
[fileList],
);

1
package.json

@ -225,7 +225,6 @@
"husky": "^8.0.1",
"identity-obj-proxy": "^3.0.0",
"immer": "^9.0.1",
"immutability-helper": "^3.0.0",
"inquirer": "^9.1.2",
"isomorphic-fetch": "^3.0.0",
"jest": "^29.4.1",

Loading…
Cancel
Save