@ecoding/components.antd 0.4.18 → 0.4.19

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.
@@ -30,7 +30,7 @@ interface IProps extends SelectProps<any> {
30
30
  searchIface?: IFace;
31
31
  emptyType?: 'null' | 'undefined' | '';
32
32
  onChange?: any;
33
- onChangeOpts?: any;
33
+ labelInValue?: boolean;
34
34
  }
35
35
  declare const AsyncSelect: React.FC<IProps>;
36
36
  export default AsyncSelect;
@@ -165,7 +165,6 @@ const AsyncSelect = memo((props) => {
165
165
  }
166
166
  }
167
167
  props.onChange && props.onChange(v);
168
- props.onChangeOpts && props.onChangeOpts(opts);
169
168
  };
170
169
  const children = useMemo(() => {
171
170
  return (options &&
@@ -49,7 +49,7 @@ export class Drawers extends React.Component {
49
49
  }
50
50
  render() {
51
51
  // if (!this.props.visible) return null;
52
- return (React.createElement(Drawer, { className: this.state.className, placement: this.state.placement, height: this.state.height, open: this.state.open, destroyOnClose: true, maskClosable: this.state.maskClosable, keyboard: false, title: this.state.title, extra: this.state.extra === null ? null : this.state.extra ? (this.state.extra) : (React.createElement("div", { className: "tac" },
52
+ return (React.createElement(Drawer, { className: this.state.className, placement: this.state.placement, height: this.state.height, open: this.state.open, destroyOnHidden: true, maskClosable: this.state.maskClosable, keyboard: false, title: this.state.title, extra: this.state.extra === null ? null : this.state.extra ? (this.state.extra) : (React.createElement("div", { className: "tac" },
53
53
  this.state.addonBefore ? this.state.addonBefore : null,
54
54
  React.createElement(Button, Object.assign({}, this.state.cancelButtonProps, { className: "mr10", key: "back", onClick: this.cancel }), this.state.cancelText),
55
55
  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),
@@ -8,6 +8,7 @@ interface IC {
8
8
  name?: string;
9
9
  rules?: any;
10
10
  width?: number;
11
+ noStyleHidden?: boolean;
11
12
  hideRemove?: boolean | ((field: FormListFieldData, index: number) => boolean);
12
13
  render?: (field: FormListFieldData, index: number, { add, remove }: {
13
14
  add: any;
@@ -58,6 +58,10 @@ const SortableItem = (props) => {
58
58
  } }, i18n ? i18n.$t("global.del", '删除') : '删除')))));
59
59
  }
60
60
  else {
61
+ if (column.noStyleHidden) {
62
+ return (React.createElement("td", { style: { display: "none" } },
63
+ React.createElement(Form.Item, { noStyle: true, hidden: true, name: [field.name, column.name] }, column.render(field, index, { add, remove }))));
64
+ }
61
65
  return (React.createElement("td", { style: tdStyle },
62
66
  React.createElement(Form.Item, { style: { marginBottom: 0 }, name: [field.name, column.name], rules: column.rules || [] }, column.render(field, index, { add, remove }))));
63
67
  }
@@ -85,6 +89,9 @@ const C = ({ columns, rules, tStyle, name, hideHeader, hideBottom, operation, i1
85
89
  const widths = useMemo(() => {
86
90
  let w = 60;
87
91
  columns.forEach((column) => {
92
+ if (column.noStyleHidden) {
93
+ return;
94
+ }
88
95
  w += column.width || 200;
89
96
  });
90
97
  if (operation) {
@@ -105,7 +112,7 @@ const C = ({ columns, rules, tStyle, name, hideHeader, hideBottom, operation, i1
105
112
  if (column.type == "operation") {
106
113
  return null;
107
114
  }
108
- return (React.createElement("col", { style: Object.assign({}, { width: column.width || 200 }) }));
115
+ return (React.createElement("col", { style: Object.assign({}, { width: column.width || 200 }, column.noStyleHidden ? { display: "none" } : {}) }));
109
116
  }),
110
117
  (operation === null || operation === void 0 ? void 0 : operation.hide) ? null : (React.createElement("col", { style: Object.assign({}, { width: (operation === null || operation === void 0 ? void 0 : operation.width) || 150 }) }))),
111
118
  React.createElement("thead", null, hideHeader ? null : (React.createElement("tr", null,
@@ -115,13 +122,13 @@ const C = ({ columns, rules, tStyle, name, hideHeader, hideBottom, operation, i1
115
122
  return null;
116
123
  }
117
124
  if (column.require) {
118
- return (React.createElement("th", { style: thStyle },
125
+ return (React.createElement("th", { style: Object.assign({}, thStyle, column.noStyleHidden ? { display: "none" } : {}) },
119
126
  React.createElement("span", { style: { color: '#ff4d4f' } }, "*"),
120
127
  column.title,
121
128
  column.tooltip ? (React.createElement(Tooltip, { placement: "top", title: column.tooltip || undefined },
122
129
  React.createElement(QuestionCircleOutlined, { style: { paddingLeft: 4, color: "rgba(0, 0, 0, 0.45)" } }))) : null));
123
130
  }
124
- return (React.createElement("th", { style: thStyle },
131
+ return (React.createElement("th", { style: Object.assign({}, thStyle, column.noStyleHidden ? { display: "none" } : {}) },
125
132
  column.title,
126
133
  column.tooltip ? (React.createElement(Tooltip, { placement: "top", title: column.tooltip || undefined },
127
134
  React.createElement(QuestionCircleOutlined, { style: { paddingLeft: 4, color: "rgba(0, 0, 0, 0.45)" } }))) : null));
@@ -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, 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,
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, destroyOnHidden: 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),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/components.antd",
3
- "version": "0.4.18",
3
+ "version": "0.4.19",
4
4
  "author": "cxc",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -47,5 +47,5 @@
47
47
  "antd": "5.27.0",
48
48
  "axios": "^1.1.2"
49
49
  },
50
- "gitHead": "0b06f78f06fce0cee8c4e16b59560eaa1f3ff288"
50
+ "gitHead": "bef6ad3a5e418056475ddc6441da1071d38a1516"
51
51
  }