@ecoding/components.antd 0.3.54 → 0.3.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,7 @@ interface IProps {
9
9
  i18n?: any;
10
10
  headers?: any;
11
11
  value?: any;
12
+ valueKey?: string;
12
13
  data?: any;
13
14
  uploadRef?: any;
14
15
  onChange?: (url: string) => void;
@@ -35,7 +35,7 @@ const SingleFileUpload = (props) => {
35
35
  response.success ||
36
36
  response.successed) {
37
37
  setLoading(false);
38
- const url = data && data.url;
38
+ const url = data && data[props.valueKey || "url"];
39
39
  setFileUrl(url);
40
40
  props.onChange && props.onChange(url);
41
41
  props.onDone && props.onDone(info.file, data);
@@ -10,6 +10,7 @@ interface IProps {
10
10
  header?: React.ReactNode;
11
11
  buttonArea?: React.ReactNode;
12
12
  scrollY?: string | number;
13
+ scrollX?: string | number;
13
14
  filters?: {
14
15
  overMax?: number;
15
16
  colOpts?: ColProps;
@@ -4,7 +4,7 @@ import { FilterOutlined, MenuOutlined } from '@ant-design/icons';
4
4
  import TableProColumns from "./columns";
5
5
  import { getDelateTargetByClassName } from "../../helpers/dom";
6
6
  import FilterHorizontal from "./filters.horizontal";
7
- const TablePro = ({ className, header, buttonArea, filterArea, filters, searchInputArea, loading, rowKey, dataSource, pagination, offsetY, columns, operationColumn, bordered = false, selectChangeHandler, selectType, onChange, expandable, columnsTitle = "显示列", filterTitle = "筛选", locale, scrollY = '100%' }, ref) => {
7
+ const TablePro = ({ className, header, buttonArea, filterArea, filters, searchInputArea, loading, rowKey, dataSource, pagination, offsetY, columns, operationColumn, bordered = false, selectChangeHandler, selectType, onChange, expandable, columnsTitle = "显示列", filterTitle = "筛选", locale, scrollY = '100%', scrollX }, ref) => {
8
8
  const tableRef = useRef(null);
9
9
  const disColumnRef = useRef([]);
10
10
  const [y, setY] = useState(scrollY);
@@ -139,6 +139,6 @@ const TablePro = ({ className, header, buttonArea, filterArea, filters, searchIn
139
139
  }
140
140
  }, // 点击行
141
141
  };
142
- }, expandable: expandable || undefined, bordered: bordered, rowKey: rowKey, columns: showColumns, dataSource: dataSource, scroll: { y }, loading: loading, pagination: pagination || false, onChange: onChange || undefined }))) : null));
142
+ }, expandable: expandable || undefined, bordered: bordered, rowKey: rowKey, columns: showColumns, dataSource: dataSource, scroll: Object.assign({ y }, scrollX ? { x: scrollX } : {}), loading: loading, pagination: pagination || false, onChange: onChange || undefined }))) : null));
143
143
  };
144
144
  export default memo(forwardRef(TablePro));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/components.antd",
3
- "version": "0.3.54",
3
+ "version": "0.3.56",
4
4
  "author": "cxc",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -43,5 +43,5 @@
43
43
  "antd": "^5.8.4",
44
44
  "axios": "^1.1.2"
45
45
  },
46
- "gitHead": "688722d27871b2505ee4e8980a97a2bb5344eeb4"
46
+ "gitHead": "748f27b64bf7cc282367b4167f9439d92e97fb94"
47
47
  }