custom-vxe-table 3.2.25 → 3.2.27
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 +78 -61
- package/lib/index.umd.js +78 -61
- package/lib/index.umd.min.js +16 -16
- package/package.json +1 -1
package/lib/index.common.js
CHANGED
|
@@ -33148,6 +33148,17 @@ function multiply (num1, num2) {
|
|
|
33148
33148
|
module.exports = multiply
|
|
33149
33149
|
|
|
33150
33150
|
|
|
33151
|
+
/***/ }),
|
|
33152
|
+
|
|
33153
|
+
/***/ "795b":
|
|
33154
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
33155
|
+
|
|
33156
|
+
"use strict";
|
|
33157
|
+
/* 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_7afea46a_lang_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f87d");
|
|
33158
|
+
/* 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_7afea46a_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_7afea46a_lang_less__WEBPACK_IMPORTED_MODULE_0__);
|
|
33159
|
+
/* unused harmony reexport * */
|
|
33160
|
+
|
|
33161
|
+
|
|
33151
33162
|
/***/ }),
|
|
33152
33163
|
|
|
33153
33164
|
/***/ "7a77":
|
|
@@ -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":
|
|
@@ -48202,17 +48206,6 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
|
48202
48206
|
})));
|
|
48203
48207
|
|
|
48204
48208
|
|
|
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
48209
|
/***/ }),
|
|
48217
48210
|
|
|
48218
48211
|
/***/ "d3f7":
|
|
@@ -51897,6 +51890,13 @@ function createEmitter() {
|
|
|
51897
51890
|
|
|
51898
51891
|
/***/ }),
|
|
51899
51892
|
|
|
51893
|
+
/***/ "f87d":
|
|
51894
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
51895
|
+
|
|
51896
|
+
// extracted by mini-css-extract-plugin
|
|
51897
|
+
|
|
51898
|
+
/***/ }),
|
|
51899
|
+
|
|
51900
51900
|
/***/ "f8cd":
|
|
51901
51901
|
/***/ (function(module, exports) {
|
|
51902
51902
|
|
|
@@ -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=7afea46a&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_7afea46a_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=7afea46a&ts=true
|
|
53928
53928
|
|
|
53929
53929
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
53930
53930
|
function _extends() {
|
|
@@ -90195,68 +90195,85 @@ 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("
|
|
90214
|
+
// console.log("##########columns####", columns);
|
|
90201
90215
|
const id = props.id;
|
|
90202
90216
|
if (id && props.showToolbarCustomPanel) {
|
|
90203
90217
|
const sortConfig = JSON.parse(localStorage.getItem("VXE_TABLE_CUSTOM_COLUMN_SORT"));
|
|
90204
90218
|
if (sortConfig && sortConfig[id]) {
|
|
90205
|
-
|
|
90219
|
+
let arr = [];
|
|
90206
90220
|
for (const fKey in sortConfig[id]) {
|
|
90207
|
-
|
|
90208
|
-
|
|
90209
|
-
|
|
90210
|
-
|
|
90221
|
+
if (columns.some(item => item.key == fKey)) {
|
|
90222
|
+
arr.push({
|
|
90223
|
+
key: fKey,
|
|
90224
|
+
index: sortConfig[id][fKey]
|
|
90225
|
+
});
|
|
90226
|
+
}
|
|
90211
90227
|
}
|
|
90212
|
-
|
|
90228
|
+
// 获取已有的排序配置
|
|
90229
|
+
arr = arr.sort(function (a, b) {
|
|
90213
90230
|
return a.index - b.index;
|
|
90214
90231
|
});
|
|
90232
|
+
if (arr.length) {
|
|
90233
|
+
arr = arr.map((item, index) => {
|
|
90234
|
+
const overnum = arr[arr.length - 1].index - columns.length + 1;
|
|
90235
|
+
if (overnum > 0) {
|
|
90236
|
+
item.index = item.index - overnum >= 0 ? item.index - overnum : 0;
|
|
90237
|
+
}
|
|
90238
|
+
return item;
|
|
90239
|
+
});
|
|
90240
|
+
}
|
|
90241
|
+
// console.log("##########arr####", arr);
|
|
90242
|
+
const result1 = [];
|
|
90215
90243
|
const result = [];
|
|
90216
|
-
|
|
90244
|
+
const tmpArr = [];
|
|
90245
|
+
let gIndex = 0;
|
|
90246
|
+
if (props.showCheckBox || props.showRadio) {
|
|
90247
|
+
gIndex++;
|
|
90248
|
+
}
|
|
90249
|
+
if (props.showSeq) {
|
|
90250
|
+
gIndex++;
|
|
90251
|
+
}
|
|
90217
90252
|
columns.forEach((column, idx) => {
|
|
90218
|
-
|
|
90219
|
-
|
|
90220
|
-
gIndex++;
|
|
90221
|
-
}
|
|
90222
|
-
if (props.showSeq) {
|
|
90223
|
-
gIndex++;
|
|
90253
|
+
if (!arr.some(item => item.key == column.key)) {
|
|
90254
|
+
tmpArr.push(column);
|
|
90224
90255
|
}
|
|
90225
90256
|
const index = arr.findIndex(item => item.index == gIndex);
|
|
90226
90257
|
if (index >= 0) {
|
|
90227
90258
|
const tmp = columns.find(item => item.key == arr[index].key);
|
|
90228
90259
|
if (tmp) {
|
|
90260
|
+
result1.push(tmp);
|
|
90229
90261
|
result.push(tmp);
|
|
90262
|
+
// tmpArr.push({});
|
|
90230
90263
|
} else {
|
|
90264
|
+
result1.push({});
|
|
90231
90265
|
result.push({});
|
|
90232
90266
|
}
|
|
90233
90267
|
} else {
|
|
90268
|
+
result1.push({});
|
|
90234
90269
|
result.push({});
|
|
90235
90270
|
}
|
|
90236
90271
|
gIndex++;
|
|
90237
90272
|
});
|
|
90238
|
-
// console.log(
|
|
90239
|
-
//
|
|
90240
|
-
|
|
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;
|
|
90273
|
+
// console.log("##########result####", result);
|
|
90274
|
+
// console.log("##########tmpArr####", tmpArr);
|
|
90275
|
+
const d = replaceEmptyObjects(result, tmpArr);
|
|
90276
|
+
return d;
|
|
90260
90277
|
}
|
|
90261
90278
|
}
|
|
90262
90279
|
return columns;
|
|
@@ -91258,8 +91275,8 @@ Sortable.mount(Remove, Revert);
|
|
|
91258
91275
|
}));
|
|
91259
91276
|
// CONCATENATED MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=script&lang=ts
|
|
91260
91277
|
|
|
91261
|
-
// EXTERNAL MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=style&index=0&id=
|
|
91262
|
-
var
|
|
91278
|
+
// EXTERNAL MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=style&index=0&id=7afea46a&lang=less
|
|
91279
|
+
var CustomTablevue_type_style_index_0_id_7afea46a_lang_less = __webpack_require__("795b");
|
|
91263
91280
|
|
|
91264
91281
|
// CONCATENATED MODULE: ./packages/CustomTable/src/CustomTable.vue
|
|
91265
91282
|
|
|
@@ -91269,7 +91286,7 @@ var CustomTablevue_type_style_index_0_id_c37618a0_lang_less = __webpack_require_
|
|
|
91269
91286
|
|
|
91270
91287
|
|
|
91271
91288
|
|
|
91272
|
-
const CustomTable_exports_ = /*#__PURE__*/exportHelper_default()(CustomTablevue_type_script_lang_ts, [['render',
|
|
91289
|
+
const CustomTable_exports_ = /*#__PURE__*/exportHelper_default()(CustomTablevue_type_script_lang_ts, [['render',CustomTablevue_type_template_id_7afea46a_ts_true_render]])
|
|
91273
91290
|
|
|
91274
91291
|
/* harmony default export */ var CustomTable = (CustomTable_exports_);
|
|
91275
91292
|
// CONCATENATED MODULE: ./packages/CustomTable/index.ts
|
package/lib/index.umd.js
CHANGED
|
@@ -33157,6 +33157,17 @@ function multiply (num1, num2) {
|
|
|
33157
33157
|
module.exports = multiply
|
|
33158
33158
|
|
|
33159
33159
|
|
|
33160
|
+
/***/ }),
|
|
33161
|
+
|
|
33162
|
+
/***/ "795b":
|
|
33163
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
33164
|
+
|
|
33165
|
+
"use strict";
|
|
33166
|
+
/* 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_7afea46a_lang_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f87d");
|
|
33167
|
+
/* 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_7afea46a_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_7afea46a_lang_less__WEBPACK_IMPORTED_MODULE_0__);
|
|
33168
|
+
/* unused harmony reexport * */
|
|
33169
|
+
|
|
33170
|
+
|
|
33160
33171
|
/***/ }),
|
|
33161
33172
|
|
|
33162
33173
|
/***/ "7a77":
|
|
@@ -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":
|
|
@@ -48211,17 +48215,6 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
|
48211
48215
|
})));
|
|
48212
48216
|
|
|
48213
48217
|
|
|
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
48218
|
/***/ }),
|
|
48226
48219
|
|
|
48227
48220
|
/***/ "d3f7":
|
|
@@ -51906,6 +51899,13 @@ function createEmitter() {
|
|
|
51906
51899
|
|
|
51907
51900
|
/***/ }),
|
|
51908
51901
|
|
|
51902
|
+
/***/ "f87d":
|
|
51903
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
51904
|
+
|
|
51905
|
+
// extracted by mini-css-extract-plugin
|
|
51906
|
+
|
|
51907
|
+
/***/ }),
|
|
51908
|
+
|
|
51909
51909
|
/***/ "f8cd":
|
|
51910
51910
|
/***/ (function(module, exports) {
|
|
51911
51911
|
|
|
@@ -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=7afea46a&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_7afea46a_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=7afea46a&ts=true
|
|
53937
53937
|
|
|
53938
53938
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
53939
53939
|
function _extends() {
|
|
@@ -90204,68 +90204,85 @@ 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("
|
|
90223
|
+
// console.log("##########columns####", columns);
|
|
90210
90224
|
const id = props.id;
|
|
90211
90225
|
if (id && props.showToolbarCustomPanel) {
|
|
90212
90226
|
const sortConfig = JSON.parse(localStorage.getItem("VXE_TABLE_CUSTOM_COLUMN_SORT"));
|
|
90213
90227
|
if (sortConfig && sortConfig[id]) {
|
|
90214
|
-
|
|
90228
|
+
let arr = [];
|
|
90215
90229
|
for (const fKey in sortConfig[id]) {
|
|
90216
|
-
|
|
90217
|
-
|
|
90218
|
-
|
|
90219
|
-
|
|
90230
|
+
if (columns.some(item => item.key == fKey)) {
|
|
90231
|
+
arr.push({
|
|
90232
|
+
key: fKey,
|
|
90233
|
+
index: sortConfig[id][fKey]
|
|
90234
|
+
});
|
|
90235
|
+
}
|
|
90220
90236
|
}
|
|
90221
|
-
|
|
90237
|
+
// 获取已有的排序配置
|
|
90238
|
+
arr = arr.sort(function (a, b) {
|
|
90222
90239
|
return a.index - b.index;
|
|
90223
90240
|
});
|
|
90241
|
+
if (arr.length) {
|
|
90242
|
+
arr = arr.map((item, index) => {
|
|
90243
|
+
const overnum = arr[arr.length - 1].index - columns.length + 1;
|
|
90244
|
+
if (overnum > 0) {
|
|
90245
|
+
item.index = item.index - overnum >= 0 ? item.index - overnum : 0;
|
|
90246
|
+
}
|
|
90247
|
+
return item;
|
|
90248
|
+
});
|
|
90249
|
+
}
|
|
90250
|
+
// console.log("##########arr####", arr);
|
|
90251
|
+
const result1 = [];
|
|
90224
90252
|
const result = [];
|
|
90225
|
-
|
|
90253
|
+
const tmpArr = [];
|
|
90254
|
+
let gIndex = 0;
|
|
90255
|
+
if (props.showCheckBox || props.showRadio) {
|
|
90256
|
+
gIndex++;
|
|
90257
|
+
}
|
|
90258
|
+
if (props.showSeq) {
|
|
90259
|
+
gIndex++;
|
|
90260
|
+
}
|
|
90226
90261
|
columns.forEach((column, idx) => {
|
|
90227
|
-
|
|
90228
|
-
|
|
90229
|
-
gIndex++;
|
|
90230
|
-
}
|
|
90231
|
-
if (props.showSeq) {
|
|
90232
|
-
gIndex++;
|
|
90262
|
+
if (!arr.some(item => item.key == column.key)) {
|
|
90263
|
+
tmpArr.push(column);
|
|
90233
90264
|
}
|
|
90234
90265
|
const index = arr.findIndex(item => item.index == gIndex);
|
|
90235
90266
|
if (index >= 0) {
|
|
90236
90267
|
const tmp = columns.find(item => item.key == arr[index].key);
|
|
90237
90268
|
if (tmp) {
|
|
90269
|
+
result1.push(tmp);
|
|
90238
90270
|
result.push(tmp);
|
|
90271
|
+
// tmpArr.push({});
|
|
90239
90272
|
} else {
|
|
90273
|
+
result1.push({});
|
|
90240
90274
|
result.push({});
|
|
90241
90275
|
}
|
|
90242
90276
|
} else {
|
|
90277
|
+
result1.push({});
|
|
90243
90278
|
result.push({});
|
|
90244
90279
|
}
|
|
90245
90280
|
gIndex++;
|
|
90246
90281
|
});
|
|
90247
|
-
// console.log(
|
|
90248
|
-
//
|
|
90249
|
-
|
|
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;
|
|
90282
|
+
// console.log("##########result####", result);
|
|
90283
|
+
// console.log("##########tmpArr####", tmpArr);
|
|
90284
|
+
const d = replaceEmptyObjects(result, tmpArr);
|
|
90285
|
+
return d;
|
|
90269
90286
|
}
|
|
90270
90287
|
}
|
|
90271
90288
|
return columns;
|
|
@@ -91267,8 +91284,8 @@ Sortable.mount(Remove, Revert);
|
|
|
91267
91284
|
}));
|
|
91268
91285
|
// CONCATENATED MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=script&lang=ts
|
|
91269
91286
|
|
|
91270
|
-
// EXTERNAL MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=style&index=0&id=
|
|
91271
|
-
var
|
|
91287
|
+
// EXTERNAL MODULE: ./packages/CustomTable/src/CustomTable.vue?vue&type=style&index=0&id=7afea46a&lang=less
|
|
91288
|
+
var CustomTablevue_type_style_index_0_id_7afea46a_lang_less = __webpack_require__("795b");
|
|
91272
91289
|
|
|
91273
91290
|
// CONCATENATED MODULE: ./packages/CustomTable/src/CustomTable.vue
|
|
91274
91291
|
|
|
@@ -91278,7 +91295,7 @@ var CustomTablevue_type_style_index_0_id_c37618a0_lang_less = __webpack_require_
|
|
|
91278
91295
|
|
|
91279
91296
|
|
|
91280
91297
|
|
|
91281
|
-
const CustomTable_exports_ = /*#__PURE__*/exportHelper_default()(CustomTablevue_type_script_lang_ts, [['render',
|
|
91298
|
+
const CustomTable_exports_ = /*#__PURE__*/exportHelper_default()(CustomTablevue_type_script_lang_ts, [['render',CustomTablevue_type_template_id_7afea46a_ts_true_render]])
|
|
91282
91299
|
|
|
91283
91300
|
/* harmony default export */ var CustomTable = (CustomTable_exports_);
|
|
91284
91301
|
// CONCATENATED MODULE: ./packages/CustomTable/index.ts
|