@hw-component/form 1.10.95 → 1.10.97

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.
@@ -61,11 +61,11 @@ var Index = function Index(_ref) {
61
61
  modalTitle = _useModifyProps.title,
62
62
  saveOldParams = _useModifyProps.saveOldParams;
63
63
  var cancel = function cancel() {
64
+ saveOldParams();
64
65
  if (dialogForm) {
65
66
  dialogForm.hide();
66
67
  return;
67
68
  }
68
- saveOldParams();
69
69
  if (onCancel) {
70
70
  return onCancel === null || onCancel === void 0 ? void 0 : onCancel();
71
71
  }
@@ -55,11 +55,11 @@ var Index = function Index(_ref) {
55
55
  modalTitle = _useModifyProps.title,
56
56
  saveOldParams = _useModifyProps.saveOldParams;
57
57
  var cancel = function cancel() {
58
+ saveOldParams();
58
59
  if (dialogForm) {
59
60
  dialogForm.hide();
60
61
  return;
61
62
  }
62
- saveOldParams();
63
63
  if (onCancel) {
64
64
  return onCancel === null || onCancel === void 0 ? void 0 : onCancel();
65
65
  }
@@ -27,6 +27,7 @@ var Index = function Index(_ref) {
27
27
  addFormat = _ref.addFormat;
28
28
  _ref.addDispatchListener;
29
29
  var props = _objectWithoutProperties(_ref, _excluded);
30
+ console.log(props, "ppppppp");
30
31
  var _valueName$input = valueName.input,
31
32
  input = _valueName$input === void 0 ? "" : _valueName$input,
32
33
  _valueName$select = valueName.select,
@@ -145,6 +145,11 @@ var Index = function Index(_ref) {
145
145
  optionFilterProp: optionFilterProp,
146
146
  filterOption: selfFilterOption,
147
147
  showSearch: mathShowSearch,
148
+ onBlur: function onBlur() {
149
+ if (serviceSearch && onSearch) {
150
+ onSearch("");
151
+ }
152
+ },
148
153
  labelInValue: true,
149
154
  onPopupScroll: propsOnPopupScroll || onPopupScroll,
150
155
  getPopupContainer: selfPopupContainer ? function () {
@@ -64,11 +64,11 @@ var Index = function Index(_ref) {
64
64
  modalTitle = _useModifyProps.title,
65
65
  saveOldParams = _useModifyProps.saveOldParams;
66
66
  var cancel = function cancel() {
67
+ saveOldParams();
67
68
  if (dialogForm) {
68
69
  dialogForm.hide();
69
70
  return;
70
71
  }
71
- saveOldParams();
72
72
  if (onCancel) {
73
73
  return onCancel === null || onCancel === void 0 ? void 0 : onCancel();
74
74
  }
@@ -58,11 +58,11 @@ var Index = function Index(_ref) {
58
58
  modalTitle = _useModifyProps.title,
59
59
  saveOldParams = _useModifyProps.saveOldParams;
60
60
  var cancel = function cancel() {
61
+ saveOldParams();
61
62
  if (dialogForm) {
62
63
  dialogForm.hide();
63
64
  return;
64
65
  }
65
- saveOldParams();
66
66
  if (onCancel) {
67
67
  return onCancel === null || onCancel === void 0 ? void 0 : onCancel();
68
68
  }
@@ -30,6 +30,7 @@ var Index = function Index(_ref) {
30
30
  addFormat = _ref.addFormat;
31
31
  _ref.addDispatchListener;
32
32
  var props = _objectWithoutProperties(_ref, _excluded);
33
+ console.log(props, "ppppppp");
33
34
  var _valueName$input = valueName.input,
34
35
  input = _valueName$input === void 0 ? "" : _valueName$input,
35
36
  _valueName$select = valueName.select,
@@ -148,6 +148,11 @@ var Index = function Index(_ref) {
148
148
  optionFilterProp: optionFilterProp,
149
149
  filterOption: selfFilterOption,
150
150
  showSearch: mathShowSearch,
151
+ onBlur: function onBlur() {
152
+ if (serviceSearch && onSearch) {
153
+ onSearch("");
154
+ }
155
+ },
151
156
  labelInValue: true,
152
157
  onPopupScroll: propsOnPopupScroll || onPopupScroll,
153
158
  getPopupContainer: selfPopupContainer ? function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.10.95",
3
+ "version": "1.10.97",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -59,11 +59,11 @@ const Index: React.FC<DialogFormProps> = ({
59
59
  afterClose,
60
60
  });
61
61
  const cancel = () => {
62
+ saveOldParams();
62
63
  if (dialogForm) {
63
64
  dialogForm.hide();
64
65
  return;
65
66
  }
66
- saveOldParams();
67
67
  if (onCancel) {
68
68
  return onCancel?.();
69
69
  }
@@ -55,11 +55,11 @@ const Index: React.FC<DialogFormProps> = ({
55
55
  autoClear,
56
56
  });
57
57
  const cancel = () => {
58
+ saveOldParams();
58
59
  if (dialogForm) {
59
60
  dialogForm.hide();
60
61
  return;
61
62
  }
62
- saveOldParams();
63
63
  if (onCancel) {
64
64
  return onCancel?.();
65
65
  }
@@ -16,6 +16,7 @@ export const Index = ({
16
16
  addDispatchListener,
17
17
  ...props
18
18
  }: HSelectInputProps) => {
19
+ console.log(props,"ppppppp");
19
20
  const { input = "", select = "" } = valueName;
20
21
  const { [input]: inputVal, [select]: selectVal } = value;
21
22
  const {
@@ -130,6 +130,11 @@ const Index: React.FC<HSelectProps> = ({
130
130
  optionFilterProp={optionFilterProp}
131
131
  filterOption={selfFilterOption}
132
132
  showSearch={mathShowSearch}
133
+ onBlur={()=>{
134
+ if (serviceSearch&&onSearch){
135
+ onSearch("");
136
+ }
137
+ }}
133
138
  labelInValue={true}
134
139
  onPopupScroll={propsOnPopupScroll || onPopupScroll}
135
140
  getPopupContainer={
@@ -69,10 +69,6 @@ export default () => {
69
69
  afterClose={() => {
70
70
  console.log("afterClose");
71
71
  }}
72
- contentRender={(node) => {
73
- console.log("contentRender");
74
- return <div>{node}</div>;
75
- }}
76
72
  title={
77
73
  <div
78
74
  onClick={() => {
@@ -236,26 +236,8 @@ export default () => {
236
236
  {
237
237
  name: "num1",
238
238
  label: "必填",
239
+ type:"selectInput",
239
240
  dependencies: ["num"],
240
- // hidden: () => {
241
- // return !form.getFieldValue("num");
242
- // },
243
- rules: [
244
- {
245
- required: true,
246
- message: "Please confirm your password!",
247
- },
248
- {
249
- validator(_, value) {
250
- console.log("ffff");
251
- return Promise.reject(
252
- new Error(
253
- "The two passwords that you entered do not match!"
254
- )
255
- );
256
- },
257
- },
258
- ],
259
241
  },
260
242
  ]}
261
243
  dismissOnPressEnter={false}
@@ -69,6 +69,7 @@ export default () => {
69
69
  <HModalForm
70
70
  configData={data}
71
71
  visible={visible}
72
+ autoClear={false}
72
73
  onCancel={() => {
73
74
  console.log("fffff");
74
75
  setVisible(false);
@@ -18,7 +18,7 @@ export default () => {
18
18
  <HSelect
19
19
  placeholder="分页"
20
20
  serviceSearch
21
- addonBefore="你好"
21
+ addonBefore="你好111"
22
22
  allowClear={true}
23
23
  labelInValue
24
24
  fieldNames={{