ns-base-module 1.0.42 → 1.0.43

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.
@@ -124,7 +124,7 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
124
124
  useEffect(function () {
125
125
  if (!columns) return;
126
126
  // setCheckAll(true);
127
- console.log("组件内部:", columns);
127
+ // console.log("组件内部:", columns);
128
128
  var _columns = columns.filter(function (item) {
129
129
  return item.visitable !== false;
130
130
  });
@@ -414,7 +414,8 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
414
414
  loopClearChild(fixed[0]);
415
415
  loopClearChild(fixed[1]);
416
416
  loopClearChild(fixed[2]);
417
- console.log("fixed", fixed);
417
+
418
+ // console.log("fixed", fixed);
418
419
  // debugger;
419
420
 
420
421
  return fixed;
@@ -831,13 +832,19 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
831
832
  for (var j = 0, k = JsonPares.length; j < k; j++) {
832
833
  _loop2(k, j);
833
834
  }
834
- // 新增新数组字段
835
+ // 新增新数组字段 || 更新名称
835
836
  var _loop3 = function _loop3(_j) {
836
837
  var _code = props.columns[_j].code ? "code" : "dataIndex";
837
- if (!find(JsonPares, function (o) {
838
+ var _findItem = find(JsonPares, function (o) {
838
839
  return o[_code] === props.columns[_j][_code];
839
- })) {
840
+ });
841
+ if (!_findItem) {
840
842
  JsonPares.push(initColumns([props.columns[_j]], null)[0]);
843
+ } else {
844
+ // 更新名称
845
+ if (_findItem.title !== props.columns[_j].title) {
846
+ _findItem.title = props.columns[_j].title;
847
+ }
841
848
  }
842
849
  };
843
850
  for (var _j = 0, _k2 = props.columns.length; _j < _k2; _j++) {
@@ -78,12 +78,12 @@ var updateTemplateFilds = function updateTemplateFilds(JsonPares, _columns) {
78
78
  });
79
79
  if (_findItem) {
80
80
  JsonPares[r] = _objectSpread(_objectSpread({}, _findItem), {}, {
81
+ title: _findItem.title || JsonPares[r].title,
81
82
  fixed: JsonPares[r].fixed,
82
83
  width: JsonPares[r].width,
83
84
  checked: JsonPares[r].checked,
84
85
  children: JsonPares[r].children,
85
86
  isAllChildrenFixed: JsonPares[r].isAllChildrenFixed,
86
- title: JsonPares[r].title,
87
87
  _index: JsonPares[r]._index,
88
88
  key: JsonPares[r].key,
89
89
  return: JsonPares[r].return,