@ecoding/components.antd 0.3.48 → 0.3.49

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.
@@ -3,8 +3,11 @@ export interface IModalProps {
3
3
  key?: string;
4
4
  id?: string;
5
5
  className?: string;
6
+ wrapClassName?: string;
7
+ style?: React.CSSProperties;
6
8
  open?: boolean;
7
9
  width?: string | number;
10
+ height?: string | number;
8
11
  zIndex?: number;
9
12
  mask?: boolean;
10
13
  title?: React.ReactNode;
@@ -31,8 +34,9 @@ export interface IModalProps {
31
34
  export declare class Modals extends React.Component<IModalProps> {
32
35
  static defaultProps: {
33
36
  className: string;
37
+ wrapClassName: string;
34
38
  open: boolean;
35
- bodyStyle: {};
39
+ style: {};
36
40
  width: string;
37
41
  zIndex: number;
38
42
  mask: boolean;
@@ -58,8 +62,11 @@ export declare class Modals extends React.Component<IModalProps> {
58
62
  key?: string | undefined;
59
63
  id?: string | undefined;
60
64
  className?: string | undefined;
65
+ wrapClassName?: string | undefined;
66
+ style?: React.CSSProperties | undefined;
61
67
  open?: boolean | undefined;
62
68
  width?: string | number | undefined;
69
+ height?: string | number | undefined;
63
70
  zIndex?: number | undefined;
64
71
  mask?: boolean | undefined;
65
72
  title?: React.ReactNode;
@@ -46,7 +46,7 @@ export class Modals extends React.Component {
46
46
  }
47
47
  render() {
48
48
  // if (!this.props.visible) return null;
49
- return (React.createElement(Modal, { className: this.state.className, open: this.state.open, width: this.state.width, zIndex: this.state.zIndex, mask: this.state.mask, title: typeof this.state.title === "string" ? (React.createElement("div", { style: { boxShadow: "inset 0px -1px 0px #F0F0F0", marginBottom: "20px", paddingBottom: "12px" } }, this.state.title)) : (this.state.title), closable: this.state.closable, maskClosable: this.state.maskClosable, onCancel: this.cancel, destroyOnClose: true, keyboard: false, footer: this.state.footer === null ? null : this.state.footer ? (this.state.footer) : (React.createElement(React.Fragment, null,
49
+ return (React.createElement(Modal, { className: this.state.className, wrapClassName: this.state.wrapClassName, open: this.state.open, style: this.state.style, width: this.state.width, zIndex: this.state.zIndex, mask: this.state.mask, title: typeof this.state.title === "string" ? (React.createElement("div", { style: { boxShadow: "inset 0px -1px 0px #F0F0F0", marginBottom: "20px", paddingBottom: "12px" } }, this.state.title)) : (this.state.title), closable: this.state.closable, maskClosable: this.state.maskClosable, onCancel: this.cancel, destroyOnClose: true, keyboard: false, footer: this.state.footer === null ? null : this.state.footer ? (this.state.footer) : (React.createElement(React.Fragment, null,
50
50
  this.state.addonBefore ? this.state.addonBefore : null,
51
51
  React.createElement(Button, Object.assign({}, this.state.cancelButtonProps, { key: "back", onClick: this.cancel }), this.state.cancelText),
52
52
  React.createElement(Button, Object.assign({}, this.state.okButtonProps, { danger: this.state.okDanger, key: "submit", type: this.state.okType, loading: this.state.loading, onClick: this.ok }), this.state.okText),
@@ -54,9 +54,10 @@ export class Modals extends React.Component {
54
54
  }
55
55
  }
56
56
  Modals.defaultProps = {
57
- className: "g-modals",
57
+ className: "",
58
+ wrapClassName: "g-modals",
58
59
  open: false,
59
- bodyStyle: {},
60
+ style: {},
60
61
  width: "80vw",
61
62
  zIndex: 950,
62
63
  mask: true,
@@ -8,6 +8,7 @@ interface IProps {
8
8
  className?: string;
9
9
  header?: React.ReactNode;
10
10
  buttonArea?: React.ReactNode;
11
+ scrollY?: string | number;
11
12
  filters?: {
12
13
  overMax?: number;
13
14
  colOpts?: ColProps;
@@ -4,10 +4,10 @@ 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 }, 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%' }, ref) => {
8
8
  const tableRef = useRef(null);
9
9
  const disColumnRef = useRef([]);
10
- const [y, setY] = useState('100%');
10
+ const [y, setY] = useState(scrollY);
11
11
  const [innerColumns, setColumns] = useState(columns);
12
12
  const [selectedRowKeys, setSelectedRowKeys] = useState([]);
13
13
  const flexColumnStyle = {
@@ -86,7 +86,7 @@ const TablePro = ({ className, header, buttonArea, filterArea, filters, searchIn
86
86
  }
87
87
  }, [columns]);
88
88
  useEffect(() => {
89
- if (tableRef.current && innerColumns.length > 0) {
89
+ if (tableRef.current && innerColumns.length > 0 && scrollY == '100%') {
90
90
  const thead = tableRef.current.querySelector('thead');
91
91
  setTimeout(() => {
92
92
  if (offsetY && offsetY > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/components.antd",
3
- "version": "0.3.48",
3
+ "version": "0.3.49",
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": "8cba1e5d0bc72933d15c1f9b53343fbdbbb234b8"
46
+ "gitHead": "ee7e6f5968f64b867060e9e6c1b7ddbad3572d92"
47
47
  }