custom-vxe-table 3.2.25 → 3.2.26
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/lib/index.common.js +63 -59
- package/lib/index.umd.js +63 -59
- package/lib/index.umd.min.js +16 -16
- package/package.json +1 -1
package/lib/index.common.js
CHANGED
|
@@ -1130,6 +1130,17 @@ function helperCreateGetObjects (name, getIndex) {
|
|
|
1130
1130
|
module.exports = helperCreateGetObjects
|
|
1131
1131
|
|
|
1132
1132
|
|
|
1133
|
+
/***/ }),
|
|
1134
|
+
|
|
1135
|
+
/***/ "0876":
|
|
1136
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1137
|
+
|
|
1138
|
+
"use strict";
|
|
1139
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_CustomTable_vue_vue_type_style_index_0_id_734dab18_lang_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c438");
|
|
1140
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_CustomTable_vue_vue_type_style_index_0_id_734dab18_lang_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_CustomTable_vue_vue_type_style_index_0_id_734dab18_lang_less__WEBPACK_IMPORTED_MODULE_0__);
|
|
1141
|
+
/* unused harmony reexport * */
|
|
1142
|
+
|
|
1143
|
+
|
|
1133
1144
|
/***/ }),
|
|
1134
1145
|
|
|
1135
1146
|
/***/ "08a8":
|
|
@@ -35878,13 +35889,6 @@ var POLYFILL = isForced.POLYFILL = 'P';
|
|
|
35878
35889
|
module.exports = isForced;
|
|
35879
35890
|
|
|
35880
35891
|
|
|
35881
|
-
/***/ }),
|
|
35882
|
-
|
|
35883
|
-
/***/ "950b":
|
|
35884
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
35885
|
-
|
|
35886
|
-
// extracted by mini-css-extract-plugin
|
|
35887
|
-
|
|
35888
35892
|
/***/ }),
|
|
35889
35893
|
|
|
35890
35894
|
/***/ "955b":
|
|
@@ -46111,6 +46115,13 @@ module.exports = function transformData(data, headers, fns) {
|
|
|
46111
46115
|
module.exports = false;
|
|
46112
46116
|
|
|
46113
46117
|
|
|
46118
|
+
/***/ }),
|
|
46119
|
+
|
|
46120
|
+
/***/ "c438":
|
|
46121
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
46122
|
+
|
|
46123
|
+
// extracted by mini-css-extract-plugin
|
|
46124
|
+
|
|
46114
46125
|
/***/ }),
|
|
46115
46126
|
|
|
46116
46127
|
/***/ "c532":
|
|
@@ -48202,17 +48213,6 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
|
48202
48213
|
})));
|
|
48203
48214
|
|
|
48204
48215
|
|
|
48205
|
-
/***/ }),
|
|
48206
|
-
|
|
48207
|
-
/***/ "d3b1":
|
|
48208
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
48209
|
-
|
|
48210
|
-
"use strict";
|
|
48211
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_CustomTable_vue_vue_type_style_index_0_id_c37618a0_lang_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("950b");
|
|
48212
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_CustomTable_vue_vue_type_style_index_0_id_c37618a0_lang_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_CustomTable_vue_vue_type_style_index_0_id_c37618a0_lang_less__WEBPACK_IMPORTED_MODULE_0__);
|
|
48213
|
-
/* unused harmony reexport * */
|
|
48214
|
-
|
|
48215
|
-
|
|
48216
48216
|
/***/ }),
|
|
48217
48217
|
|
|
48218
48218
|
/***/ "d3f7":
|
|
@@ -53550,7 +53550,7 @@ if (typeof window !== 'undefined') {
|
|
|
53550
53550
|
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
53551
53551
|
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
|
|
53552
53552
|
|
|
53553
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./packages/CustomTable/src/CustomTable.vue?vue&type=template&id=
|
|
53553
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./packages/CustomTable/src/CustomTable.vue?vue&type=template&id=734dab18&ts=true
|
|
53554
53554
|
|
|
53555
53555
|
const _hoisted_1 = {
|
|
53556
53556
|
style: {
|
|
@@ -53579,7 +53579,7 @@ const _hoisted_9 = {
|
|
|
53579
53579
|
href: "#"
|
|
53580
53580
|
};
|
|
53581
53581
|
const _hoisted_10 = ["onClick"];
|
|
53582
|
-
function
|
|
53582
|
+
function CustomTablevue_type_template_id_734dab18_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
53583
53583
|
const _component_custom_buttons = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("custom-buttons");
|
|
53584
53584
|
const _component_a_input_search = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("a-input-search");
|
|
53585
53585
|
const _component_vxe_toolbar = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("vxe-toolbar");
|
|
@@ -53626,7 +53626,7 @@ function CustomTablevue_type_template_id_c37618a0_ts_true_render(_ctx, _cache, $
|
|
|
53626
53626
|
size: _ctx.size,
|
|
53627
53627
|
align: _ctx.align,
|
|
53628
53628
|
"max-height": _ctx.maxHeight,
|
|
53629
|
-
height:
|
|
53629
|
+
height: _ctx.height,
|
|
53630
53630
|
perfect: true,
|
|
53631
53631
|
"show-footer": _ctx.showFooter,
|
|
53632
53632
|
"footer-method": _ctx.footerMethod,
|
|
@@ -53924,7 +53924,7 @@ function CustomTablevue_type_template_id_c37618a0_ts_true_render(_ctx, _cache, $
|
|
|
53924
53924
|
"page-sizes": [10, 20, 100, 200, 500, 1000]
|
|
53925
53925
|
}, null, 8, ["layouts", "current-page", "page-size", "total", "onPageChange"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]);
|
|
53926
53926
|
}
|
|
53927
|
-
// CONCATENATED MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=template&id=
|
|
53927
|
+
// CONCATENATED MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=template&id=734dab18&ts=true
|
|
53928
53928
|
|
|
53929
53929
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
53930
53930
|
function _extends() {
|
|
@@ -90195,68 +90195,72 @@ Sortable.mount(Remove, Revert);
|
|
|
90195
90195
|
const resizableChangeEvent = type => {
|
|
90196
90196
|
syncRemoteColumnSetting();
|
|
90197
90197
|
};
|
|
90198
|
+
const replaceEmptyObjects = (arr1, arr2) => {
|
|
90199
|
+
const pool = [...arr2]; // 防止污染原数组
|
|
90200
|
+
return arr1.map((item, index) => {
|
|
90201
|
+
// 判断是否是空对象 {}
|
|
90202
|
+
if (item && typeof item === "object" && !Array.isArray(item) && Object.keys(item).length === 0) {
|
|
90203
|
+
const t = pool.shift();
|
|
90204
|
+
// console.log("##########item####", index, t.title);
|
|
90205
|
+
return t; // 从 arr2 取一个
|
|
90206
|
+
} else {
|
|
90207
|
+
// console.log("##########item##fffff##", index, item.title);
|
|
90208
|
+
}
|
|
90209
|
+
return item;
|
|
90210
|
+
});
|
|
90211
|
+
};
|
|
90198
90212
|
// 结合缓存处理columns配置
|
|
90199
90213
|
const handleColumns = columns => {
|
|
90200
|
-
// console.log("#########columns####", columns);
|
|
90201
90214
|
const id = props.id;
|
|
90202
90215
|
if (id && props.showToolbarCustomPanel) {
|
|
90203
90216
|
const sortConfig = JSON.parse(localStorage.getItem("VXE_TABLE_CUSTOM_COLUMN_SORT"));
|
|
90204
90217
|
if (sortConfig && sortConfig[id]) {
|
|
90205
90218
|
const arr = [];
|
|
90206
90219
|
for (const fKey in sortConfig[id]) {
|
|
90207
|
-
|
|
90208
|
-
|
|
90209
|
-
|
|
90210
|
-
|
|
90220
|
+
if (columns.some(item => item.key == fKey)) {
|
|
90221
|
+
arr.push({
|
|
90222
|
+
key: fKey,
|
|
90223
|
+
index: sortConfig[id][fKey]
|
|
90224
|
+
});
|
|
90225
|
+
}
|
|
90211
90226
|
}
|
|
90227
|
+
// 获取已有的排序配置
|
|
90212
90228
|
arr.sort(function (a, b) {
|
|
90213
90229
|
return a.index - b.index;
|
|
90214
90230
|
});
|
|
90231
|
+
const result1 = [];
|
|
90215
90232
|
const result = [];
|
|
90216
|
-
|
|
90233
|
+
const tmpArr = [];
|
|
90234
|
+
let gIndex = 0;
|
|
90235
|
+
if (props.showCheckBox || props.showRadio) {
|
|
90236
|
+
gIndex++;
|
|
90237
|
+
}
|
|
90238
|
+
if (props.showSeq) {
|
|
90239
|
+
gIndex++;
|
|
90240
|
+
}
|
|
90217
90241
|
columns.forEach((column, idx) => {
|
|
90218
|
-
|
|
90219
|
-
|
|
90220
|
-
gIndex++;
|
|
90221
|
-
}
|
|
90222
|
-
if (props.showSeq) {
|
|
90223
|
-
gIndex++;
|
|
90242
|
+
if (!arr.some(item => item.key == column.key)) {
|
|
90243
|
+
tmpArr.push(column);
|
|
90224
90244
|
}
|
|
90225
90245
|
const index = arr.findIndex(item => item.index == gIndex);
|
|
90226
90246
|
if (index >= 0) {
|
|
90227
90247
|
const tmp = columns.find(item => item.key == arr[index].key);
|
|
90228
90248
|
if (tmp) {
|
|
90249
|
+
result1.push(tmp);
|
|
90229
90250
|
result.push(tmp);
|
|
90251
|
+
// tmpArr.push({});
|
|
90230
90252
|
} else {
|
|
90253
|
+
result1.push({});
|
|
90231
90254
|
result.push({});
|
|
90232
90255
|
}
|
|
90233
90256
|
} else {
|
|
90257
|
+
result1.push({});
|
|
90234
90258
|
result.push({});
|
|
90235
90259
|
}
|
|
90236
90260
|
gIndex++;
|
|
90237
90261
|
});
|
|
90238
|
-
|
|
90239
|
-
|
|
90240
|
-
// JSON.parse(JSON.stringify(result))
|
|
90241
|
-
// );
|
|
90242
|
-
let n = 0;
|
|
90243
|
-
columns.forEach((column, idx) => {
|
|
90244
|
-
const isExist = result.findIndex(item => item && item.key == column.key) >= 0; // result是否存在
|
|
90245
|
-
if (isExist) {
|
|
90246
|
-
// 不操作
|
|
90247
|
-
} else {
|
|
90248
|
-
if (JSON.stringify(result[n]) == "{}") {
|
|
90249
|
-
result[n] = column;
|
|
90250
|
-
n++;
|
|
90251
|
-
} else {
|
|
90252
|
-
n = result.findIndex(r => JSON.stringify(r) == "{}");
|
|
90253
|
-
result[n] = column;
|
|
90254
|
-
n++;
|
|
90255
|
-
}
|
|
90256
|
-
}
|
|
90257
|
-
});
|
|
90258
|
-
// console.log("##########result####22", result);
|
|
90259
|
-
return result;
|
|
90262
|
+
const d = replaceEmptyObjects(result, tmpArr);
|
|
90263
|
+
return d;
|
|
90260
90264
|
}
|
|
90261
90265
|
}
|
|
90262
90266
|
return columns;
|
|
@@ -91258,8 +91262,8 @@ Sortable.mount(Remove, Revert);
|
|
|
91258
91262
|
}));
|
|
91259
91263
|
// CONCATENATED MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=script&lang=ts
|
|
91260
91264
|
|
|
91261
|
-
// EXTERNAL MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=style&index=0&id=
|
|
91262
|
-
var
|
|
91265
|
+
// EXTERNAL MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=style&index=0&id=734dab18&lang=less
|
|
91266
|
+
var CustomTablevue_type_style_index_0_id_734dab18_lang_less = __webpack_require__("0876");
|
|
91263
91267
|
|
|
91264
91268
|
// CONCATENATED MODULE: ./packages/CustomTable/src/CustomTable.vue
|
|
91265
91269
|
|
|
@@ -91269,7 +91273,7 @@ var CustomTablevue_type_style_index_0_id_c37618a0_lang_less = __webpack_require_
|
|
|
91269
91273
|
|
|
91270
91274
|
|
|
91271
91275
|
|
|
91272
|
-
const CustomTable_exports_ = /*#__PURE__*/exportHelper_default()(CustomTablevue_type_script_lang_ts, [['render',
|
|
91276
|
+
const CustomTable_exports_ = /*#__PURE__*/exportHelper_default()(CustomTablevue_type_script_lang_ts, [['render',CustomTablevue_type_template_id_734dab18_ts_true_render]])
|
|
91273
91277
|
|
|
91274
91278
|
/* harmony default export */ var CustomTable = (CustomTable_exports_);
|
|
91275
91279
|
// CONCATENATED MODULE: ./packages/CustomTable/index.ts
|
package/lib/index.umd.js
CHANGED
|
@@ -1139,6 +1139,17 @@ function helperCreateGetObjects (name, getIndex) {
|
|
|
1139
1139
|
module.exports = helperCreateGetObjects
|
|
1140
1140
|
|
|
1141
1141
|
|
|
1142
|
+
/***/ }),
|
|
1143
|
+
|
|
1144
|
+
/***/ "0876":
|
|
1145
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1146
|
+
|
|
1147
|
+
"use strict";
|
|
1148
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_CustomTable_vue_vue_type_style_index_0_id_734dab18_lang_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c438");
|
|
1149
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_CustomTable_vue_vue_type_style_index_0_id_734dab18_lang_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_CustomTable_vue_vue_type_style_index_0_id_734dab18_lang_less__WEBPACK_IMPORTED_MODULE_0__);
|
|
1150
|
+
/* unused harmony reexport * */
|
|
1151
|
+
|
|
1152
|
+
|
|
1142
1153
|
/***/ }),
|
|
1143
1154
|
|
|
1144
1155
|
/***/ "08a8":
|
|
@@ -35887,13 +35898,6 @@ var POLYFILL = isForced.POLYFILL = 'P';
|
|
|
35887
35898
|
module.exports = isForced;
|
|
35888
35899
|
|
|
35889
35900
|
|
|
35890
|
-
/***/ }),
|
|
35891
|
-
|
|
35892
|
-
/***/ "950b":
|
|
35893
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
35894
|
-
|
|
35895
|
-
// extracted by mini-css-extract-plugin
|
|
35896
|
-
|
|
35897
35901
|
/***/ }),
|
|
35898
35902
|
|
|
35899
35903
|
/***/ "955b":
|
|
@@ -46120,6 +46124,13 @@ module.exports = function transformData(data, headers, fns) {
|
|
|
46120
46124
|
module.exports = false;
|
|
46121
46125
|
|
|
46122
46126
|
|
|
46127
|
+
/***/ }),
|
|
46128
|
+
|
|
46129
|
+
/***/ "c438":
|
|
46130
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
46131
|
+
|
|
46132
|
+
// extracted by mini-css-extract-plugin
|
|
46133
|
+
|
|
46123
46134
|
/***/ }),
|
|
46124
46135
|
|
|
46125
46136
|
/***/ "c532":
|
|
@@ -48211,17 +48222,6 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
|
48211
48222
|
})));
|
|
48212
48223
|
|
|
48213
48224
|
|
|
48214
|
-
/***/ }),
|
|
48215
|
-
|
|
48216
|
-
/***/ "d3b1":
|
|
48217
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
48218
|
-
|
|
48219
|
-
"use strict";
|
|
48220
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_CustomTable_vue_vue_type_style_index_0_id_c37618a0_lang_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("950b");
|
|
48221
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_CustomTable_vue_vue_type_style_index_0_id_c37618a0_lang_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_CustomTable_vue_vue_type_style_index_0_id_c37618a0_lang_less__WEBPACK_IMPORTED_MODULE_0__);
|
|
48222
|
-
/* unused harmony reexport * */
|
|
48223
|
-
|
|
48224
|
-
|
|
48225
48225
|
/***/ }),
|
|
48226
48226
|
|
|
48227
48227
|
/***/ "d3f7":
|
|
@@ -53559,7 +53559,7 @@ if (typeof window !== 'undefined') {
|
|
|
53559
53559
|
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
53560
53560
|
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
|
|
53561
53561
|
|
|
53562
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./packages/CustomTable/src/CustomTable.vue?vue&type=template&id=
|
|
53562
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./packages/CustomTable/src/CustomTable.vue?vue&type=template&id=734dab18&ts=true
|
|
53563
53563
|
|
|
53564
53564
|
const _hoisted_1 = {
|
|
53565
53565
|
style: {
|
|
@@ -53588,7 +53588,7 @@ const _hoisted_9 = {
|
|
|
53588
53588
|
href: "#"
|
|
53589
53589
|
};
|
|
53590
53590
|
const _hoisted_10 = ["onClick"];
|
|
53591
|
-
function
|
|
53591
|
+
function CustomTablevue_type_template_id_734dab18_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
53592
53592
|
const _component_custom_buttons = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("custom-buttons");
|
|
53593
53593
|
const _component_a_input_search = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("a-input-search");
|
|
53594
53594
|
const _component_vxe_toolbar = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("vxe-toolbar");
|
|
@@ -53635,7 +53635,7 @@ function CustomTablevue_type_template_id_c37618a0_ts_true_render(_ctx, _cache, $
|
|
|
53635
53635
|
size: _ctx.size,
|
|
53636
53636
|
align: _ctx.align,
|
|
53637
53637
|
"max-height": _ctx.maxHeight,
|
|
53638
|
-
height:
|
|
53638
|
+
height: _ctx.height,
|
|
53639
53639
|
perfect: true,
|
|
53640
53640
|
"show-footer": _ctx.showFooter,
|
|
53641
53641
|
"footer-method": _ctx.footerMethod,
|
|
@@ -53933,7 +53933,7 @@ function CustomTablevue_type_template_id_c37618a0_ts_true_render(_ctx, _cache, $
|
|
|
53933
53933
|
"page-sizes": [10, 20, 100, 200, 500, 1000]
|
|
53934
53934
|
}, null, 8, ["layouts", "current-page", "page-size", "total", "onPageChange"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]);
|
|
53935
53935
|
}
|
|
53936
|
-
// CONCATENATED MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=template&id=
|
|
53936
|
+
// CONCATENATED MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=template&id=734dab18&ts=true
|
|
53937
53937
|
|
|
53938
53938
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
53939
53939
|
function _extends() {
|
|
@@ -90204,68 +90204,72 @@ Sortable.mount(Remove, Revert);
|
|
|
90204
90204
|
const resizableChangeEvent = type => {
|
|
90205
90205
|
syncRemoteColumnSetting();
|
|
90206
90206
|
};
|
|
90207
|
+
const replaceEmptyObjects = (arr1, arr2) => {
|
|
90208
|
+
const pool = [...arr2]; // 防止污染原数组
|
|
90209
|
+
return arr1.map((item, index) => {
|
|
90210
|
+
// 判断是否是空对象 {}
|
|
90211
|
+
if (item && typeof item === "object" && !Array.isArray(item) && Object.keys(item).length === 0) {
|
|
90212
|
+
const t = pool.shift();
|
|
90213
|
+
// console.log("##########item####", index, t.title);
|
|
90214
|
+
return t; // 从 arr2 取一个
|
|
90215
|
+
} else {
|
|
90216
|
+
// console.log("##########item##fffff##", index, item.title);
|
|
90217
|
+
}
|
|
90218
|
+
return item;
|
|
90219
|
+
});
|
|
90220
|
+
};
|
|
90207
90221
|
// 结合缓存处理columns配置
|
|
90208
90222
|
const handleColumns = columns => {
|
|
90209
|
-
// console.log("#########columns####", columns);
|
|
90210
90223
|
const id = props.id;
|
|
90211
90224
|
if (id && props.showToolbarCustomPanel) {
|
|
90212
90225
|
const sortConfig = JSON.parse(localStorage.getItem("VXE_TABLE_CUSTOM_COLUMN_SORT"));
|
|
90213
90226
|
if (sortConfig && sortConfig[id]) {
|
|
90214
90227
|
const arr = [];
|
|
90215
90228
|
for (const fKey in sortConfig[id]) {
|
|
90216
|
-
|
|
90217
|
-
|
|
90218
|
-
|
|
90219
|
-
|
|
90229
|
+
if (columns.some(item => item.key == fKey)) {
|
|
90230
|
+
arr.push({
|
|
90231
|
+
key: fKey,
|
|
90232
|
+
index: sortConfig[id][fKey]
|
|
90233
|
+
});
|
|
90234
|
+
}
|
|
90220
90235
|
}
|
|
90236
|
+
// 获取已有的排序配置
|
|
90221
90237
|
arr.sort(function (a, b) {
|
|
90222
90238
|
return a.index - b.index;
|
|
90223
90239
|
});
|
|
90240
|
+
const result1 = [];
|
|
90224
90241
|
const result = [];
|
|
90225
|
-
|
|
90242
|
+
const tmpArr = [];
|
|
90243
|
+
let gIndex = 0;
|
|
90244
|
+
if (props.showCheckBox || props.showRadio) {
|
|
90245
|
+
gIndex++;
|
|
90246
|
+
}
|
|
90247
|
+
if (props.showSeq) {
|
|
90248
|
+
gIndex++;
|
|
90249
|
+
}
|
|
90226
90250
|
columns.forEach((column, idx) => {
|
|
90227
|
-
|
|
90228
|
-
|
|
90229
|
-
gIndex++;
|
|
90230
|
-
}
|
|
90231
|
-
if (props.showSeq) {
|
|
90232
|
-
gIndex++;
|
|
90251
|
+
if (!arr.some(item => item.key == column.key)) {
|
|
90252
|
+
tmpArr.push(column);
|
|
90233
90253
|
}
|
|
90234
90254
|
const index = arr.findIndex(item => item.index == gIndex);
|
|
90235
90255
|
if (index >= 0) {
|
|
90236
90256
|
const tmp = columns.find(item => item.key == arr[index].key);
|
|
90237
90257
|
if (tmp) {
|
|
90258
|
+
result1.push(tmp);
|
|
90238
90259
|
result.push(tmp);
|
|
90260
|
+
// tmpArr.push({});
|
|
90239
90261
|
} else {
|
|
90262
|
+
result1.push({});
|
|
90240
90263
|
result.push({});
|
|
90241
90264
|
}
|
|
90242
90265
|
} else {
|
|
90266
|
+
result1.push({});
|
|
90243
90267
|
result.push({});
|
|
90244
90268
|
}
|
|
90245
90269
|
gIndex++;
|
|
90246
90270
|
});
|
|
90247
|
-
|
|
90248
|
-
|
|
90249
|
-
// JSON.parse(JSON.stringify(result))
|
|
90250
|
-
// );
|
|
90251
|
-
let n = 0;
|
|
90252
|
-
columns.forEach((column, idx) => {
|
|
90253
|
-
const isExist = result.findIndex(item => item && item.key == column.key) >= 0; // result是否存在
|
|
90254
|
-
if (isExist) {
|
|
90255
|
-
// 不操作
|
|
90256
|
-
} else {
|
|
90257
|
-
if (JSON.stringify(result[n]) == "{}") {
|
|
90258
|
-
result[n] = column;
|
|
90259
|
-
n++;
|
|
90260
|
-
} else {
|
|
90261
|
-
n = result.findIndex(r => JSON.stringify(r) == "{}");
|
|
90262
|
-
result[n] = column;
|
|
90263
|
-
n++;
|
|
90264
|
-
}
|
|
90265
|
-
}
|
|
90266
|
-
});
|
|
90267
|
-
// console.log("##########result####22", result);
|
|
90268
|
-
return result;
|
|
90271
|
+
const d = replaceEmptyObjects(result, tmpArr);
|
|
90272
|
+
return d;
|
|
90269
90273
|
}
|
|
90270
90274
|
}
|
|
90271
90275
|
return columns;
|
|
@@ -91267,8 +91271,8 @@ Sortable.mount(Remove, Revert);
|
|
|
91267
91271
|
}));
|
|
91268
91272
|
// CONCATENATED MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=script&lang=ts
|
|
91269
91273
|
|
|
91270
|
-
// EXTERNAL MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=style&index=0&id=
|
|
91271
|
-
var
|
|
91274
|
+
// EXTERNAL MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=style&index=0&id=734dab18&lang=less
|
|
91275
|
+
var CustomTablevue_type_style_index_0_id_734dab18_lang_less = __webpack_require__("0876");
|
|
91272
91276
|
|
|
91273
91277
|
// CONCATENATED MODULE: ./packages/CustomTable/src/CustomTable.vue
|
|
91274
91278
|
|
|
@@ -91278,7 +91282,7 @@ var CustomTablevue_type_style_index_0_id_c37618a0_lang_less = __webpack_require_
|
|
|
91278
91282
|
|
|
91279
91283
|
|
|
91280
91284
|
|
|
91281
|
-
const CustomTable_exports_ = /*#__PURE__*/exportHelper_default()(CustomTablevue_type_script_lang_ts, [['render',
|
|
91285
|
+
const CustomTable_exports_ = /*#__PURE__*/exportHelper_default()(CustomTablevue_type_script_lang_ts, [['render',CustomTablevue_type_template_id_734dab18_ts_true_render]])
|
|
91282
91286
|
|
|
91283
91287
|
/* harmony default export */ var CustomTable = (CustomTable_exports_);
|
|
91284
91288
|
// CONCATENATED MODULE: ./packages/CustomTable/index.ts
|