ns-base-module 2.0.11 → 2.0.12
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.
|
@@ -158,6 +158,13 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
158
158
|
dragNode = _ref2.dragNode;
|
|
159
159
|
var nextColumns = cloneDeep(columnsTree);
|
|
160
160
|
|
|
161
|
+
// 禁止跨层级拖拽 模板 和更新的数据匹配渲染问题, 渲染时也只匹配同级增删改
|
|
162
|
+
// 修复 模板存储 a下的b, 新表头b在c下面 并改名d
|
|
163
|
+
if (node.parentCode !== dragNode.parentCode) {
|
|
164
|
+
message.warning("不允许改变层级");
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
|
|
161
168
|
// 找到 旧位置 删除自己
|
|
162
169
|
var delDom = null;
|
|
163
170
|
function _loopFind(tree, dom, command) {
|
|
@@ -80,6 +80,7 @@ var updateTemplateFilds = function updateTemplateFilds(JsonPares, _columns) {
|
|
|
80
80
|
if (_findItem) {
|
|
81
81
|
JsonPares[r] = _objectSpread(_objectSpread({}, _findItem), {}, {
|
|
82
82
|
title: _findItem.title || JsonPares[r].title,
|
|
83
|
+
label: _findItem.label || JsonPares[r].label,
|
|
83
84
|
fixed: JsonPares[r].fixed,
|
|
84
85
|
width: JsonPares[r].width,
|
|
85
86
|
checked: JsonPares[r].checked,
|
|
@@ -113,7 +114,7 @@ export function adapterColumns(customColumns, columns) {
|
|
|
113
114
|
var _code = arr[j].code ? "code" : "dataIndex";
|
|
114
115
|
if (commad === "del") {
|
|
115
116
|
if (!find(_columns, function (o) {
|
|
116
|
-
return o[_code] === arr[j][_code];
|
|
117
|
+
return o[_code] === arr[j][_code] && o.parentCode === arr[j].parentCode;
|
|
117
118
|
})) {
|
|
118
119
|
arr.splice(j, 1);
|
|
119
120
|
_k -= 1;
|
|
@@ -151,7 +152,7 @@ export function adapterColumns(customColumns, columns) {
|
|
|
151
152
|
var _loop3 = function _loop3(j) {
|
|
152
153
|
var _code = _columns[j].code ? "code" : "dataIndex";
|
|
153
154
|
if (!find(flaJsonPares, function (o) {
|
|
154
|
-
return o[_code] === _columns[j][_code];
|
|
155
|
+
return o[_code] === _columns[j][_code] && o.parentCode === _columns[j].parentCode;
|
|
155
156
|
})) {
|
|
156
157
|
var _item = initColumns([_columns[j]], null)[0];
|
|
157
158
|
if (_item.customizable !== false) {
|