wargerm 0.2.12 → 0.2.13
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.
- package/dist/index.esm.js +41 -5
- package/dist/index.js +40 -4
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -4,7 +4,7 @@ import 'antd/es/dropdown/style';
|
|
4
4
|
import _Dropdown from 'antd/es/dropdown';
|
5
5
|
import 'antd/es/menu/style';
|
6
6
|
import _Menu from 'antd/es/menu';
|
7
|
-
import React, { useState, useEffect, useMemo,
|
7
|
+
import React, { useState, useEffect, useMemo, useRef, useImperativeHandle } from 'react';
|
8
8
|
import { createFromIconfontCN, SearchOutlined, ReloadOutlined, CloseCircleOutlined, PlusOutlined, EditOutlined, EyeOutlined, ExclamationCircleOutlined, DeleteOutlined } from '@ant-design/icons';
|
9
9
|
import 'antd/es/input/style';
|
10
10
|
import _Input from 'antd/es/input';
|
@@ -7552,6 +7552,8 @@ var WForm = function WForm(props, ref) {
|
|
7552
7552
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
7553
7553
|
form = _Form$useForm2[0];
|
7554
7554
|
|
7555
|
+
var columnsFieldsRef = useRef({});
|
7556
|
+
|
7555
7557
|
var _useState = useState({}),
|
7556
7558
|
_useState2 = _slicedToArray(_useState, 2),
|
7557
7559
|
changedValues = _useState2[0],
|
@@ -7623,6 +7625,10 @@ var WForm = function WForm(props, ref) {
|
|
7623
7625
|
placeholder: "\u8BF7\u9009\u62E9",
|
7624
7626
|
disabled: disabled,
|
7625
7627
|
onLoad: function onLoad(opt) {
|
7628
|
+
if (columnsFieldsRef.current) {
|
7629
|
+
columnsFieldsRef.current[c.dataIndex] = opt;
|
7630
|
+
}
|
7631
|
+
|
7626
7632
|
setColumnsFields(function (preColumnsFields) {
|
7627
7633
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, opt));
|
7628
7634
|
});
|
@@ -7762,6 +7768,10 @@ var WForm = function WForm(props, ref) {
|
|
7762
7768
|
options = c.options;
|
7763
7769
|
}
|
7764
7770
|
|
7771
|
+
if (columnsFieldsRef.current) {
|
7772
|
+
columnsFieldsRef.current[c.dataIndex] = options;
|
7773
|
+
}
|
7774
|
+
|
7765
7775
|
setColumnsFields(function (preColumnsFields) {
|
7766
7776
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, options));
|
7767
7777
|
});
|
@@ -7808,6 +7818,10 @@ var WForm = function WForm(props, ref) {
|
|
7808
7818
|
}
|
7809
7819
|
}
|
7810
7820
|
|
7821
|
+
if (columnsFieldsRef.current) {
|
7822
|
+
columnsFieldsRef.current[c.dataIndex] = _options;
|
7823
|
+
}
|
7824
|
+
|
7811
7825
|
setColumnsFields(function (preColumnsFields) {
|
7812
7826
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, _options));
|
7813
7827
|
});
|
@@ -7868,6 +7882,10 @@ var WForm = function WForm(props, ref) {
|
|
7868
7882
|
};
|
7869
7883
|
}
|
7870
7884
|
|
7885
|
+
if (columnsFieldsRef.current) {
|
7886
|
+
columnsFieldsRef.current[c.dataIndex] = _options2;
|
7887
|
+
}
|
7888
|
+
|
7871
7889
|
setColumnsFields(function (preColumnsFields) {
|
7872
7890
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, _options2));
|
7873
7891
|
});
|
@@ -7926,7 +7944,8 @@ var WForm = function WForm(props, ref) {
|
|
7926
7944
|
var baseitem = c.renderFormItem(c, _objectSpread2(_objectSpread2({}, c), {}, {
|
7927
7945
|
formItemProps: c.formItemProps,
|
7928
7946
|
fieldProps: c.fieldProps,
|
7929
|
-
columnsFields: columnsFields
|
7947
|
+
columnsFields: columnsFields,
|
7948
|
+
columnsFieldsRef: columnsFieldsRef
|
7930
7949
|
}), form);
|
7931
7950
|
return baseitem ? /*#__PURE__*/React.createElement(_Col, _objectSpread2(_objectSpread2({
|
7932
7951
|
style: {
|
@@ -8023,7 +8042,7 @@ var WForm = function WForm(props, ref) {
|
|
8023
8042
|
}, c.fieldProps))));
|
8024
8043
|
}
|
8025
8044
|
});
|
8026
|
-
}, [changedValues, columns, disabled, JSON.stringify(form.getFieldsValue())]);
|
8045
|
+
}, [changedValues, columns, disabled, columnsFieldsRef, JSON.stringify(form.getFieldsValue())]);
|
8027
8046
|
var filterExtraColumnsForm = useMemo(function () {
|
8028
8047
|
return filterExtraFormColumns.map(function (c) {
|
8029
8048
|
var colProps = {};
|
@@ -8073,6 +8092,10 @@ var WForm = function WForm(props, ref) {
|
|
8073
8092
|
placeholder: "\u8BF7\u9009\u62E9",
|
8074
8093
|
disabled: disabled,
|
8075
8094
|
onLoad: function onLoad(opt) {
|
8095
|
+
if (columnsFieldsRef.current) {
|
8096
|
+
columnsFieldsRef.current[c.dataIndex] = opt;
|
8097
|
+
}
|
8098
|
+
|
8076
8099
|
setColumnsFields(function (preColumnsFields) {
|
8077
8100
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, opt));
|
8078
8101
|
});
|
@@ -8212,6 +8235,10 @@ var WForm = function WForm(props, ref) {
|
|
8212
8235
|
options = c.options;
|
8213
8236
|
}
|
8214
8237
|
|
8238
|
+
if (columnsFieldsRef.current) {
|
8239
|
+
columnsFieldsRef.current[c.dataIndex] = options;
|
8240
|
+
}
|
8241
|
+
|
8215
8242
|
setColumnsFields(function (preColumnsFields) {
|
8216
8243
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, options));
|
8217
8244
|
});
|
@@ -8258,6 +8285,10 @@ var WForm = function WForm(props, ref) {
|
|
8258
8285
|
}
|
8259
8286
|
}
|
8260
8287
|
|
8288
|
+
if (columnsFieldsRef.current) {
|
8289
|
+
columnsFieldsRef.current[c.dataIndex] = _options3;
|
8290
|
+
}
|
8291
|
+
|
8261
8292
|
setColumnsFields(function (preColumnsFields) {
|
8262
8293
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, _options3));
|
8263
8294
|
});
|
@@ -8318,6 +8349,10 @@ var WForm = function WForm(props, ref) {
|
|
8318
8349
|
};
|
8319
8350
|
}
|
8320
8351
|
|
8352
|
+
if (columnsFieldsRef.current) {
|
8353
|
+
columnsFieldsRef.current[c.dataIndex] = _options4;
|
8354
|
+
}
|
8355
|
+
|
8321
8356
|
setColumnsFields(function (preColumnsFields) {
|
8322
8357
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, _options4));
|
8323
8358
|
});
|
@@ -8376,7 +8411,8 @@ var WForm = function WForm(props, ref) {
|
|
8376
8411
|
var baseitem = c.renderFormItem(c, _objectSpread2(_objectSpread2({}, c), {}, {
|
8377
8412
|
formItemProps: c.formItemProps,
|
8378
8413
|
fieldProps: c.fieldProps,
|
8379
|
-
columnsFields: columnsFields
|
8414
|
+
columnsFields: columnsFields,
|
8415
|
+
columnsFieldsRef: columnsFieldsRef
|
8380
8416
|
}), form);
|
8381
8417
|
return baseitem ? /*#__PURE__*/React.createElement(_Col, _objectSpread2(_objectSpread2({
|
8382
8418
|
style: {
|
@@ -8473,7 +8509,7 @@ var WForm = function WForm(props, ref) {
|
|
8473
8509
|
}, c.fieldProps))));
|
8474
8510
|
}
|
8475
8511
|
});
|
8476
|
-
}, [changedValues, extraColumns, disabled, JSON.stringify(form.getFieldsValue())]);
|
8512
|
+
}, [changedValues, extraColumns, disabled, columnsFieldsRef, JSON.stringify(form.getFieldsValue())]);
|
8477
8513
|
|
8478
8514
|
var handleSearch = function handleSearch(v) {
|
8479
8515
|
var searchForm = form.getFieldsValue();
|
package/dist/index.js
CHANGED
@@ -7585,6 +7585,8 @@ var WForm = function WForm(props, ref) {
|
|
7585
7585
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
7586
7586
|
form = _Form$useForm2[0];
|
7587
7587
|
|
7588
|
+
var columnsFieldsRef = React.useRef({});
|
7589
|
+
|
7588
7590
|
var _useState = React.useState({}),
|
7589
7591
|
_useState2 = _slicedToArray(_useState, 2),
|
7590
7592
|
changedValues = _useState2[0],
|
@@ -7656,6 +7658,10 @@ var WForm = function WForm(props, ref) {
|
|
7656
7658
|
placeholder: "\u8BF7\u9009\u62E9",
|
7657
7659
|
disabled: disabled,
|
7658
7660
|
onLoad: function onLoad(opt) {
|
7661
|
+
if (columnsFieldsRef.current) {
|
7662
|
+
columnsFieldsRef.current[c.dataIndex] = opt;
|
7663
|
+
}
|
7664
|
+
|
7659
7665
|
setColumnsFields(function (preColumnsFields) {
|
7660
7666
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, opt));
|
7661
7667
|
});
|
@@ -7795,6 +7801,10 @@ var WForm = function WForm(props, ref) {
|
|
7795
7801
|
options = c.options;
|
7796
7802
|
}
|
7797
7803
|
|
7804
|
+
if (columnsFieldsRef.current) {
|
7805
|
+
columnsFieldsRef.current[c.dataIndex] = options;
|
7806
|
+
}
|
7807
|
+
|
7798
7808
|
setColumnsFields(function (preColumnsFields) {
|
7799
7809
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, options));
|
7800
7810
|
});
|
@@ -7841,6 +7851,10 @@ var WForm = function WForm(props, ref) {
|
|
7841
7851
|
}
|
7842
7852
|
}
|
7843
7853
|
|
7854
|
+
if (columnsFieldsRef.current) {
|
7855
|
+
columnsFieldsRef.current[c.dataIndex] = _options;
|
7856
|
+
}
|
7857
|
+
|
7844
7858
|
setColumnsFields(function (preColumnsFields) {
|
7845
7859
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, _options));
|
7846
7860
|
});
|
@@ -7901,6 +7915,10 @@ var WForm = function WForm(props, ref) {
|
|
7901
7915
|
};
|
7902
7916
|
}
|
7903
7917
|
|
7918
|
+
if (columnsFieldsRef.current) {
|
7919
|
+
columnsFieldsRef.current[c.dataIndex] = _options2;
|
7920
|
+
}
|
7921
|
+
|
7904
7922
|
setColumnsFields(function (preColumnsFields) {
|
7905
7923
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, _options2));
|
7906
7924
|
});
|
@@ -7959,7 +7977,8 @@ var WForm = function WForm(props, ref) {
|
|
7959
7977
|
var baseitem = c.renderFormItem(c, _objectSpread2(_objectSpread2({}, c), {}, {
|
7960
7978
|
formItemProps: c.formItemProps,
|
7961
7979
|
fieldProps: c.fieldProps,
|
7962
|
-
columnsFields: columnsFields
|
7980
|
+
columnsFields: columnsFields,
|
7981
|
+
columnsFieldsRef: columnsFieldsRef
|
7963
7982
|
}), form);
|
7964
7983
|
return baseitem ? /*#__PURE__*/React__default['default'].createElement(_Col__default['default'], _objectSpread2(_objectSpread2({
|
7965
7984
|
style: {
|
@@ -8056,7 +8075,7 @@ var WForm = function WForm(props, ref) {
|
|
8056
8075
|
}, c.fieldProps))));
|
8057
8076
|
}
|
8058
8077
|
});
|
8059
|
-
}, [changedValues, columns, disabled, JSON.stringify(form.getFieldsValue())]);
|
8078
|
+
}, [changedValues, columns, disabled, columnsFieldsRef, JSON.stringify(form.getFieldsValue())]);
|
8060
8079
|
var filterExtraColumnsForm = React.useMemo(function () {
|
8061
8080
|
return filterExtraFormColumns.map(function (c) {
|
8062
8081
|
var colProps = {};
|
@@ -8106,6 +8125,10 @@ var WForm = function WForm(props, ref) {
|
|
8106
8125
|
placeholder: "\u8BF7\u9009\u62E9",
|
8107
8126
|
disabled: disabled,
|
8108
8127
|
onLoad: function onLoad(opt) {
|
8128
|
+
if (columnsFieldsRef.current) {
|
8129
|
+
columnsFieldsRef.current[c.dataIndex] = opt;
|
8130
|
+
}
|
8131
|
+
|
8109
8132
|
setColumnsFields(function (preColumnsFields) {
|
8110
8133
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, opt));
|
8111
8134
|
});
|
@@ -8245,6 +8268,10 @@ var WForm = function WForm(props, ref) {
|
|
8245
8268
|
options = c.options;
|
8246
8269
|
}
|
8247
8270
|
|
8271
|
+
if (columnsFieldsRef.current) {
|
8272
|
+
columnsFieldsRef.current[c.dataIndex] = options;
|
8273
|
+
}
|
8274
|
+
|
8248
8275
|
setColumnsFields(function (preColumnsFields) {
|
8249
8276
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, options));
|
8250
8277
|
});
|
@@ -8291,6 +8318,10 @@ var WForm = function WForm(props, ref) {
|
|
8291
8318
|
}
|
8292
8319
|
}
|
8293
8320
|
|
8321
|
+
if (columnsFieldsRef.current) {
|
8322
|
+
columnsFieldsRef.current[c.dataIndex] = _options3;
|
8323
|
+
}
|
8324
|
+
|
8294
8325
|
setColumnsFields(function (preColumnsFields) {
|
8295
8326
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, _options3));
|
8296
8327
|
});
|
@@ -8351,6 +8382,10 @@ var WForm = function WForm(props, ref) {
|
|
8351
8382
|
};
|
8352
8383
|
}
|
8353
8384
|
|
8385
|
+
if (columnsFieldsRef.current) {
|
8386
|
+
columnsFieldsRef.current[c.dataIndex] = _options4;
|
8387
|
+
}
|
8388
|
+
|
8354
8389
|
setColumnsFields(function (preColumnsFields) {
|
8355
8390
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, _options4));
|
8356
8391
|
});
|
@@ -8409,7 +8444,8 @@ var WForm = function WForm(props, ref) {
|
|
8409
8444
|
var baseitem = c.renderFormItem(c, _objectSpread2(_objectSpread2({}, c), {}, {
|
8410
8445
|
formItemProps: c.formItemProps,
|
8411
8446
|
fieldProps: c.fieldProps,
|
8412
|
-
columnsFields: columnsFields
|
8447
|
+
columnsFields: columnsFields,
|
8448
|
+
columnsFieldsRef: columnsFieldsRef
|
8413
8449
|
}), form);
|
8414
8450
|
return baseitem ? /*#__PURE__*/React__default['default'].createElement(_Col__default['default'], _objectSpread2(_objectSpread2({
|
8415
8451
|
style: {
|
@@ -8506,7 +8542,7 @@ var WForm = function WForm(props, ref) {
|
|
8506
8542
|
}, c.fieldProps))));
|
8507
8543
|
}
|
8508
8544
|
});
|
8509
|
-
}, [changedValues, extraColumns, disabled, JSON.stringify(form.getFieldsValue())]);
|
8545
|
+
}, [changedValues, extraColumns, disabled, columnsFieldsRef, JSON.stringify(form.getFieldsValue())]);
|
8510
8546
|
|
8511
8547
|
var handleSearch = function handleSearch(v) {
|
8512
8548
|
var searchForm = form.getFieldsValue();
|