@weitutech/by-components 1.1.16 → 1.1.18
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/README.md +1 -1
- package/lib/by-components.common.js +67 -42
- package/lib/by-components.css +1 -0
- package/lib/by-components.umd.js +67 -42
- package/lib/by-components.umd.min.js +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60373,6 +60373,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
60373
60373
|
|
|
60374
60374
|
// EXPORTS
|
|
60375
60375
|
__webpack_require__.d(__webpack_exports__, {
|
|
60376
|
+
ByDatePickerRange: function() { return /* reexport */ date_picker_range; },
|
|
60377
|
+
ByFoldSearch: function() { return /* reexport */ fold_search; },
|
|
60378
|
+
ByForm: function() { return /* reexport */ form_form; },
|
|
60379
|
+
ByPageSearch: function() { return /* reexport */ page_search; },
|
|
60380
|
+
ByPager: function() { return /* reexport */ pager; },
|
|
60381
|
+
BySelect: function() { return /* reexport */ comps_select; },
|
|
60382
|
+
ByTable: function() { return /* reexport */ table; },
|
|
60376
60383
|
"default": function() { return /* binding */ entry_lib; }
|
|
60377
60384
|
});
|
|
60378
60385
|
|
|
@@ -60604,8 +60611,8 @@ var component = normalizeComponent(
|
|
|
60604
60611
|
)
|
|
60605
60612
|
|
|
60606
60613
|
/* harmony default export */ var pager = (component.exports);
|
|
60607
|
-
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=
|
|
60608
|
-
var
|
|
60614
|
+
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=5e713c15
|
|
60615
|
+
var tablevue_type_template_id_5e713c15_render = function render() {
|
|
60609
60616
|
var _vm = this,
|
|
60610
60617
|
_c = _vm._self._c;
|
|
60611
60618
|
return _c('div', [_c('vxe-grid', _vm._g(_vm._b({
|
|
@@ -60678,7 +60685,7 @@ var tablevue_type_template_id_620fc66c_render = function render() {
|
|
|
60678
60685
|
}
|
|
60679
60686
|
}) : _vm._e()], 1);
|
|
60680
60687
|
};
|
|
60681
|
-
var
|
|
60688
|
+
var tablevue_type_template_id_5e713c15_staticRenderFns = [];
|
|
60682
60689
|
|
|
60683
60690
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
60684
60691
|
var es_array_push = __webpack_require__(4114);
|
|
@@ -61364,7 +61371,7 @@ const replaceColumnWidthToColumns = (name, columns) => {
|
|
|
61364
61371
|
};
|
|
61365
61372
|
|
|
61366
61373
|
/**
|
|
61367
|
-
* 重写列宽
|
|
61374
|
+
* 重写列宽 (v3是否要替换这个方法的逻辑???)
|
|
61368
61375
|
* @param fromColumns 原始列
|
|
61369
61376
|
* @param toColumns 目标列
|
|
61370
61377
|
* @returns 重写后的列
|
|
@@ -61372,25 +61379,38 @@ const replaceColumnWidthToColumns = (name, columns) => {
|
|
|
61372
61379
|
const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
61373
61380
|
if (!fromColumns || !toColumns) return [];
|
|
61374
61381
|
if (!fromColumns || fromColumns.length === 0) return toColumns;
|
|
61382
|
+
console.log('>>>>>>>>>> 重写列宽 fromColumns', fromColumns);
|
|
61375
61383
|
const result = [];
|
|
61376
61384
|
for (const col of toColumns) {
|
|
61377
61385
|
const fromCol = fromColumns.find(from => from.field === col.field);
|
|
61378
61386
|
if (col.children) {
|
|
61379
61387
|
// 递归处理子列
|
|
61380
|
-
|
|
61388
|
+
const newCol = {
|
|
61381
61389
|
...col,
|
|
61382
|
-
...((fromCol === null || fromCol === void 0 ? void 0 : fromCol.width) && {
|
|
61383
|
-
width: fromCol.width
|
|
61384
|
-
}),
|
|
61385
61390
|
children: rewriteWidthColumns((fromCol === null || fromCol === void 0 ? void 0 : fromCol.children) || [], col.children)
|
|
61386
|
-
}
|
|
61391
|
+
};
|
|
61392
|
+
// 如果 fromCol 有 width,则添加 width,否则不添加 width 字段
|
|
61393
|
+
if (fromCol) {
|
|
61394
|
+
if (fromCol !== null && fromCol !== void 0 && fromCol.width) {
|
|
61395
|
+
newCol.width = fromCol.width;
|
|
61396
|
+
} else {
|
|
61397
|
+
delete newCol.width;
|
|
61398
|
+
}
|
|
61399
|
+
}
|
|
61400
|
+
result.push(newCol);
|
|
61387
61401
|
} else {
|
|
61388
|
-
|
|
61389
|
-
...col
|
|
61390
|
-
|
|
61391
|
-
|
|
61392
|
-
|
|
61393
|
-
|
|
61402
|
+
const newCol = {
|
|
61403
|
+
...col
|
|
61404
|
+
};
|
|
61405
|
+
// 如果 fromCol 有 width,则添加 width,否则不添加 width 字段
|
|
61406
|
+
if (fromCol) {
|
|
61407
|
+
if (fromCol !== null && fromCol !== void 0 && fromCol.width) {
|
|
61408
|
+
newCol.width = fromCol.width;
|
|
61409
|
+
} else {
|
|
61410
|
+
delete newCol.width;
|
|
61411
|
+
}
|
|
61412
|
+
}
|
|
61413
|
+
result.push(newCol);
|
|
61394
61414
|
}
|
|
61395
61415
|
}
|
|
61396
61416
|
return result;
|
|
@@ -61445,26 +61465,22 @@ const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
|
61445
61465
|
hasCache: false,
|
|
61446
61466
|
// 原始列配置
|
|
61447
61467
|
originColumns: [],
|
|
61448
|
-
tempColumns: []
|
|
61449
|
-
isFirst: true
|
|
61468
|
+
tempColumns: []
|
|
61450
61469
|
};
|
|
61451
61470
|
},
|
|
61452
61471
|
mounted() {
|
|
61453
61472
|
this.showResetCache = !!this.name;
|
|
61454
|
-
if (this.gridOptions.columns && this.isFirst) {
|
|
61455
|
-
this.tempColumns = deepClone(this.gridOptions.columns);
|
|
61456
|
-
this.isFirst = false;
|
|
61457
|
-
}
|
|
61458
61473
|
},
|
|
61459
61474
|
watch: {
|
|
61460
61475
|
'gridOptions.columns': {
|
|
61461
61476
|
handler(newColumns) {
|
|
61462
61477
|
//这里保存的列宽要恢复至最初未拖动时的列宽
|
|
61463
61478
|
const result = rewriteWidthColumns(this.tempColumns, newColumns);
|
|
61479
|
+
|
|
61464
61480
|
// 保存列配置,重置列宽后,恢复该配置
|
|
61465
61481
|
this.originColumns = result;
|
|
61466
61482
|
},
|
|
61467
|
-
deep: true
|
|
61483
|
+
deep: true
|
|
61468
61484
|
}
|
|
61469
61485
|
},
|
|
61470
61486
|
computed: {
|
|
@@ -61475,8 +61491,8 @@ const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
|
61475
61491
|
...others
|
|
61476
61492
|
} = this.gridOptions;
|
|
61477
61493
|
|
|
61478
|
-
//保存原始配置 (确保重置后,恢复到外部传入的配置)
|
|
61479
|
-
this.originColumns =
|
|
61494
|
+
// //保存原始配置 (确保重置后,恢复到外部传入的配置) - 注意:这里要使用rewriteWidthColumns
|
|
61495
|
+
this.originColumns = rewriteWidthColumns(this.tempColumns, columns);
|
|
61480
61496
|
|
|
61481
61497
|
// 使用列宽缓存值(若有)
|
|
61482
61498
|
const newColumns = replaceColumnWidthToColumns(this.name, columns);
|
|
@@ -61557,6 +61573,7 @@ const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
|
61557
61573
|
removeCachedTableColumns(this.name);
|
|
61558
61574
|
this.setHasCache();
|
|
61559
61575
|
if (this.$refs.xGrid) {
|
|
61576
|
+
console.log('>>>>>>>>>> 重置为 this.originColumns', this.originColumns);
|
|
61560
61577
|
// 直接重新设置列配置
|
|
61561
61578
|
this.$refs.xGrid.reloadColumn(this.originColumns);
|
|
61562
61579
|
}
|
|
@@ -61584,8 +61601,6 @@ const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
|
61584
61601
|
},
|
|
61585
61602
|
// 改变表头字段
|
|
61586
61603
|
changeTableFields(cols) {
|
|
61587
|
-
// 这里保存?
|
|
61588
|
-
this.tempColumns = deepClone(cols);
|
|
61589
61604
|
const columns = [];
|
|
61590
61605
|
cols.forEach(item => {
|
|
61591
61606
|
if (!columns.some(col => col.field === item.key) && item.type) {
|
|
@@ -61602,6 +61617,7 @@ const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
|
61602
61617
|
});
|
|
61603
61618
|
}
|
|
61604
61619
|
});
|
|
61620
|
+
this.tempColumns = deepClone(columns);
|
|
61605
61621
|
|
|
61606
61622
|
// 使用列宽缓存值(若有)
|
|
61607
61623
|
const newColumns = replaceColumnWidthToColumns(this.name, columns);
|
|
@@ -61665,8 +61681,8 @@ const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
|
61665
61681
|
;
|
|
61666
61682
|
var table_component = normalizeComponent(
|
|
61667
61683
|
components_tablevue_type_script_lang_js,
|
|
61668
|
-
|
|
61669
|
-
|
|
61684
|
+
tablevue_type_template_id_5e713c15_render,
|
|
61685
|
+
tablevue_type_template_id_5e713c15_staticRenderFns,
|
|
61670
61686
|
false,
|
|
61671
61687
|
null,
|
|
61672
61688
|
null,
|
|
@@ -61675,8 +61691,8 @@ var table_component = normalizeComponent(
|
|
|
61675
61691
|
)
|
|
61676
61692
|
|
|
61677
61693
|
/* harmony default export */ var table = (table_component.exports);
|
|
61678
|
-
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/form.vue?vue&type=template&id=
|
|
61679
|
-
var
|
|
61694
|
+
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/form.vue?vue&type=template&id=396e0fe6&scoped=true
|
|
61695
|
+
var formvue_type_template_id_396e0fe6_scoped_true_render = function render() {
|
|
61680
61696
|
var _vm = this,
|
|
61681
61697
|
_c = _vm._self._c;
|
|
61682
61698
|
return _c('div', {
|
|
@@ -61705,7 +61721,6 @@ var formvue_type_template_id_c48999d6_render = function render() {
|
|
|
61705
61721
|
}
|
|
61706
61722
|
}
|
|
61707
61723
|
}, [_c('el-row', [_vm._l(_vm.formItems, function (item) {
|
|
61708
|
-
var _item$otherOptions, _item$otherOptions2, _item$otherOptions3;
|
|
61709
61724
|
return [!item.isHidden ? _c('el-col', _vm._b({
|
|
61710
61725
|
directives: [{
|
|
61711
61726
|
name: "show",
|
|
@@ -61927,26 +61942,26 @@ var formvue_type_template_id_c48999d6_render = function render() {
|
|
|
61927
61942
|
on: {
|
|
61928
61943
|
"click": _vm.handleQueryClick
|
|
61929
61944
|
}
|
|
61930
|
-
}, 'el-button',
|
|
61945
|
+
}, 'el-button', item.otherOptions || {}, false), [_vm._v(" " + _vm._s((item.otherOptions || {}).text || '搜索') + " ")])] : item.type === 'formButtons' ? [!item.otherOptions || item.otherOptions.reset !== false ? _c('el-button', _vm._b({
|
|
61931
61946
|
attrs: {
|
|
61932
61947
|
"native-type": "reset",
|
|
61933
61948
|
"size": _vm.elSize || 'mini'
|
|
61934
61949
|
}
|
|
61935
|
-
}, 'el-button',
|
|
61950
|
+
}, 'el-button', item.otherOptions || {}, false), [_vm._v(" " + _vm._s((item.otherOptions || {}).resetText || '重置') + " ")]) : _vm._e(), !item.otherOptions || item.otherOptions.submit !== false ? _c('el-button', _vm._b({
|
|
61936
61951
|
attrs: {
|
|
61937
61952
|
"native-type": "submit",
|
|
61938
61953
|
"size": _vm.elSize || 'mini',
|
|
61939
61954
|
"type": "primary",
|
|
61940
61955
|
"icon": !item.otherOptions || item.otherOptions.showSubmitIcon !== false ? 'el-icon-search' : ''
|
|
61941
61956
|
}
|
|
61942
|
-
}, 'el-button',
|
|
61957
|
+
}, 'el-button', item.otherOptions || {}, false), [_vm._v(" " + _vm._s((item.otherOptions || {}).submitText || '搜索') + " ")]) : _vm._e()] : _vm._e()], 2)], 1) : _vm._e()];
|
|
61943
61958
|
}), _vm._t("btn", null, {
|
|
61944
61959
|
"formData": _vm.formData
|
|
61945
61960
|
})], 2)], 1), _c('div', {
|
|
61946
61961
|
staticClass: "footer"
|
|
61947
61962
|
}, [_vm._t("footer")], 2)], 1);
|
|
61948
61963
|
};
|
|
61949
|
-
var
|
|
61964
|
+
var formvue_type_template_id_396e0fe6_scoped_true_staticRenderFns = [];
|
|
61950
61965
|
|
|
61951
61966
|
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/comps/pair-number-input.vue?vue&type=template&id=3344cc16
|
|
61952
61967
|
var pair_number_inputvue_type_template_id_3344cc16_render = function render() {
|
|
@@ -62416,10 +62431,10 @@ var custom_date_picker_component = normalizeComponent(
|
|
|
62416
62431
|
reset() {
|
|
62417
62432
|
// 重置为初始值
|
|
62418
62433
|
this.$refs.formRef.resetFields();
|
|
62434
|
+
this.$emit('input', {
|
|
62435
|
+
...this.initialValues
|
|
62436
|
+
});
|
|
62419
62437
|
this.$nextTick(() => {
|
|
62420
|
-
this.$emit('input', {
|
|
62421
|
-
...this.initialValues
|
|
62422
|
-
});
|
|
62423
62438
|
this.$emit('reset');
|
|
62424
62439
|
});
|
|
62425
62440
|
}
|
|
@@ -62427,21 +62442,27 @@ var custom_date_picker_component = normalizeComponent(
|
|
|
62427
62442
|
});
|
|
62428
62443
|
;// ./src/components/form/form.vue?vue&type=script&lang=js
|
|
62429
62444
|
/* harmony default export */ var form_formvue_type_script_lang_js = (formvue_type_script_lang_js);
|
|
62445
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/form.vue?vue&type=style&index=0&id=396e0fe6&prod&lang=scss&scoped=true
|
|
62446
|
+
// extracted by mini-css-extract-plugin
|
|
62447
|
+
|
|
62448
|
+
;// ./src/components/form/form.vue?vue&type=style&index=0&id=396e0fe6&prod&lang=scss&scoped=true
|
|
62449
|
+
|
|
62430
62450
|
;// ./src/components/form/form.vue
|
|
62431
62451
|
|
|
62432
62452
|
|
|
62433
62453
|
|
|
62454
|
+
;
|
|
62434
62455
|
|
|
62435
62456
|
|
|
62436
62457
|
/* normalize component */
|
|
62437
|
-
|
|
62458
|
+
|
|
62438
62459
|
var form_component = normalizeComponent(
|
|
62439
62460
|
form_formvue_type_script_lang_js,
|
|
62440
|
-
|
|
62441
|
-
|
|
62461
|
+
formvue_type_template_id_396e0fe6_scoped_true_render,
|
|
62462
|
+
formvue_type_template_id_396e0fe6_scoped_true_staticRenderFns,
|
|
62442
62463
|
false,
|
|
62443
62464
|
null,
|
|
62444
|
-
|
|
62465
|
+
"396e0fe6",
|
|
62445
62466
|
null
|
|
62446
62467
|
|
|
62447
62468
|
)
|
|
@@ -63169,11 +63190,14 @@ const components = {
|
|
|
63169
63190
|
BySelect: comps_select,
|
|
63170
63191
|
ByDatePickerRange: date_picker_range
|
|
63171
63192
|
};
|
|
63193
|
+
|
|
63172
63194
|
// 设置当前 z-index 起始值
|
|
63173
63195
|
index_esm.setCurrent(99999);
|
|
63174
63196
|
const install = Vue => {
|
|
63175
63197
|
Object.keys(components).forEach(name => {
|
|
63176
63198
|
Vue.component(name, components[name]);
|
|
63199
|
+
// 同时注册小写版本
|
|
63200
|
+
Vue.component(name.toLowerCase(), components[name]);
|
|
63177
63201
|
});
|
|
63178
63202
|
};
|
|
63179
63203
|
|
|
@@ -63184,6 +63208,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
63184
63208
|
/* harmony default export */ var src_0 = ({
|
|
63185
63209
|
install
|
|
63186
63210
|
});
|
|
63211
|
+
|
|
63187
63212
|
;// ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
63188
63213
|
|
|
63189
63214
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.b-form .header[data-v-396e0fe6]{margin-bottom:20px}.b-form .footer[data-v-396e0fe6]{margin-top:20px}
|
package/lib/by-components.umd.js
CHANGED
|
@@ -60383,6 +60383,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
60383
60383
|
|
|
60384
60384
|
// EXPORTS
|
|
60385
60385
|
__webpack_require__.d(__webpack_exports__, {
|
|
60386
|
+
ByDatePickerRange: function() { return /* reexport */ date_picker_range; },
|
|
60387
|
+
ByFoldSearch: function() { return /* reexport */ fold_search; },
|
|
60388
|
+
ByForm: function() { return /* reexport */ form_form; },
|
|
60389
|
+
ByPageSearch: function() { return /* reexport */ page_search; },
|
|
60390
|
+
ByPager: function() { return /* reexport */ pager; },
|
|
60391
|
+
BySelect: function() { return /* reexport */ comps_select; },
|
|
60392
|
+
ByTable: function() { return /* reexport */ table; },
|
|
60386
60393
|
"default": function() { return /* binding */ entry_lib; }
|
|
60387
60394
|
});
|
|
60388
60395
|
|
|
@@ -60614,8 +60621,8 @@ var component = normalizeComponent(
|
|
|
60614
60621
|
)
|
|
60615
60622
|
|
|
60616
60623
|
/* harmony default export */ var pager = (component.exports);
|
|
60617
|
-
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=
|
|
60618
|
-
var
|
|
60624
|
+
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=5e713c15
|
|
60625
|
+
var tablevue_type_template_id_5e713c15_render = function render() {
|
|
60619
60626
|
var _vm = this,
|
|
60620
60627
|
_c = _vm._self._c;
|
|
60621
60628
|
return _c('div', [_c('vxe-grid', _vm._g(_vm._b({
|
|
@@ -60688,7 +60695,7 @@ var tablevue_type_template_id_620fc66c_render = function render() {
|
|
|
60688
60695
|
}
|
|
60689
60696
|
}) : _vm._e()], 1);
|
|
60690
60697
|
};
|
|
60691
|
-
var
|
|
60698
|
+
var tablevue_type_template_id_5e713c15_staticRenderFns = [];
|
|
60692
60699
|
|
|
60693
60700
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
60694
60701
|
var es_array_push = __webpack_require__(4114);
|
|
@@ -61374,7 +61381,7 @@ const replaceColumnWidthToColumns = (name, columns) => {
|
|
|
61374
61381
|
};
|
|
61375
61382
|
|
|
61376
61383
|
/**
|
|
61377
|
-
* 重写列宽
|
|
61384
|
+
* 重写列宽 (v3是否要替换这个方法的逻辑???)
|
|
61378
61385
|
* @param fromColumns 原始列
|
|
61379
61386
|
* @param toColumns 目标列
|
|
61380
61387
|
* @returns 重写后的列
|
|
@@ -61382,25 +61389,38 @@ const replaceColumnWidthToColumns = (name, columns) => {
|
|
|
61382
61389
|
const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
61383
61390
|
if (!fromColumns || !toColumns) return [];
|
|
61384
61391
|
if (!fromColumns || fromColumns.length === 0) return toColumns;
|
|
61392
|
+
console.log('>>>>>>>>>> 重写列宽 fromColumns', fromColumns);
|
|
61385
61393
|
const result = [];
|
|
61386
61394
|
for (const col of toColumns) {
|
|
61387
61395
|
const fromCol = fromColumns.find(from => from.field === col.field);
|
|
61388
61396
|
if (col.children) {
|
|
61389
61397
|
// 递归处理子列
|
|
61390
|
-
|
|
61398
|
+
const newCol = {
|
|
61391
61399
|
...col,
|
|
61392
|
-
...((fromCol === null || fromCol === void 0 ? void 0 : fromCol.width) && {
|
|
61393
|
-
width: fromCol.width
|
|
61394
|
-
}),
|
|
61395
61400
|
children: rewriteWidthColumns((fromCol === null || fromCol === void 0 ? void 0 : fromCol.children) || [], col.children)
|
|
61396
|
-
}
|
|
61401
|
+
};
|
|
61402
|
+
// 如果 fromCol 有 width,则添加 width,否则不添加 width 字段
|
|
61403
|
+
if (fromCol) {
|
|
61404
|
+
if (fromCol !== null && fromCol !== void 0 && fromCol.width) {
|
|
61405
|
+
newCol.width = fromCol.width;
|
|
61406
|
+
} else {
|
|
61407
|
+
delete newCol.width;
|
|
61408
|
+
}
|
|
61409
|
+
}
|
|
61410
|
+
result.push(newCol);
|
|
61397
61411
|
} else {
|
|
61398
|
-
|
|
61399
|
-
...col
|
|
61400
|
-
|
|
61401
|
-
|
|
61402
|
-
|
|
61403
|
-
|
|
61412
|
+
const newCol = {
|
|
61413
|
+
...col
|
|
61414
|
+
};
|
|
61415
|
+
// 如果 fromCol 有 width,则添加 width,否则不添加 width 字段
|
|
61416
|
+
if (fromCol) {
|
|
61417
|
+
if (fromCol !== null && fromCol !== void 0 && fromCol.width) {
|
|
61418
|
+
newCol.width = fromCol.width;
|
|
61419
|
+
} else {
|
|
61420
|
+
delete newCol.width;
|
|
61421
|
+
}
|
|
61422
|
+
}
|
|
61423
|
+
result.push(newCol);
|
|
61404
61424
|
}
|
|
61405
61425
|
}
|
|
61406
61426
|
return result;
|
|
@@ -61455,26 +61475,22 @@ const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
|
61455
61475
|
hasCache: false,
|
|
61456
61476
|
// 原始列配置
|
|
61457
61477
|
originColumns: [],
|
|
61458
|
-
tempColumns: []
|
|
61459
|
-
isFirst: true
|
|
61478
|
+
tempColumns: []
|
|
61460
61479
|
};
|
|
61461
61480
|
},
|
|
61462
61481
|
mounted() {
|
|
61463
61482
|
this.showResetCache = !!this.name;
|
|
61464
|
-
if (this.gridOptions.columns && this.isFirst) {
|
|
61465
|
-
this.tempColumns = deepClone(this.gridOptions.columns);
|
|
61466
|
-
this.isFirst = false;
|
|
61467
|
-
}
|
|
61468
61483
|
},
|
|
61469
61484
|
watch: {
|
|
61470
61485
|
'gridOptions.columns': {
|
|
61471
61486
|
handler(newColumns) {
|
|
61472
61487
|
//这里保存的列宽要恢复至最初未拖动时的列宽
|
|
61473
61488
|
const result = rewriteWidthColumns(this.tempColumns, newColumns);
|
|
61489
|
+
|
|
61474
61490
|
// 保存列配置,重置列宽后,恢复该配置
|
|
61475
61491
|
this.originColumns = result;
|
|
61476
61492
|
},
|
|
61477
|
-
deep: true
|
|
61493
|
+
deep: true
|
|
61478
61494
|
}
|
|
61479
61495
|
},
|
|
61480
61496
|
computed: {
|
|
@@ -61485,8 +61501,8 @@ const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
|
61485
61501
|
...others
|
|
61486
61502
|
} = this.gridOptions;
|
|
61487
61503
|
|
|
61488
|
-
//保存原始配置 (确保重置后,恢复到外部传入的配置)
|
|
61489
|
-
this.originColumns =
|
|
61504
|
+
// //保存原始配置 (确保重置后,恢复到外部传入的配置) - 注意:这里要使用rewriteWidthColumns
|
|
61505
|
+
this.originColumns = rewriteWidthColumns(this.tempColumns, columns);
|
|
61490
61506
|
|
|
61491
61507
|
// 使用列宽缓存值(若有)
|
|
61492
61508
|
const newColumns = replaceColumnWidthToColumns(this.name, columns);
|
|
@@ -61567,6 +61583,7 @@ const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
|
61567
61583
|
removeCachedTableColumns(this.name);
|
|
61568
61584
|
this.setHasCache();
|
|
61569
61585
|
if (this.$refs.xGrid) {
|
|
61586
|
+
console.log('>>>>>>>>>> 重置为 this.originColumns', this.originColumns);
|
|
61570
61587
|
// 直接重新设置列配置
|
|
61571
61588
|
this.$refs.xGrid.reloadColumn(this.originColumns);
|
|
61572
61589
|
}
|
|
@@ -61594,8 +61611,6 @@ const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
|
61594
61611
|
},
|
|
61595
61612
|
// 改变表头字段
|
|
61596
61613
|
changeTableFields(cols) {
|
|
61597
|
-
// 这里保存?
|
|
61598
|
-
this.tempColumns = deepClone(cols);
|
|
61599
61614
|
const columns = [];
|
|
61600
61615
|
cols.forEach(item => {
|
|
61601
61616
|
if (!columns.some(col => col.field === item.key) && item.type) {
|
|
@@ -61612,6 +61627,7 @@ const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
|
61612
61627
|
});
|
|
61613
61628
|
}
|
|
61614
61629
|
});
|
|
61630
|
+
this.tempColumns = deepClone(columns);
|
|
61615
61631
|
|
|
61616
61632
|
// 使用列宽缓存值(若有)
|
|
61617
61633
|
const newColumns = replaceColumnWidthToColumns(this.name, columns);
|
|
@@ -61675,8 +61691,8 @@ const rewriteWidthColumns = (fromColumns, toColumns) => {
|
|
|
61675
61691
|
;
|
|
61676
61692
|
var table_component = normalizeComponent(
|
|
61677
61693
|
components_tablevue_type_script_lang_js,
|
|
61678
|
-
|
|
61679
|
-
|
|
61694
|
+
tablevue_type_template_id_5e713c15_render,
|
|
61695
|
+
tablevue_type_template_id_5e713c15_staticRenderFns,
|
|
61680
61696
|
false,
|
|
61681
61697
|
null,
|
|
61682
61698
|
null,
|
|
@@ -61685,8 +61701,8 @@ var table_component = normalizeComponent(
|
|
|
61685
61701
|
)
|
|
61686
61702
|
|
|
61687
61703
|
/* harmony default export */ var table = (table_component.exports);
|
|
61688
|
-
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/form.vue?vue&type=template&id=
|
|
61689
|
-
var
|
|
61704
|
+
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/form.vue?vue&type=template&id=396e0fe6&scoped=true
|
|
61705
|
+
var formvue_type_template_id_396e0fe6_scoped_true_render = function render() {
|
|
61690
61706
|
var _vm = this,
|
|
61691
61707
|
_c = _vm._self._c;
|
|
61692
61708
|
return _c('div', {
|
|
@@ -61715,7 +61731,6 @@ var formvue_type_template_id_c48999d6_render = function render() {
|
|
|
61715
61731
|
}
|
|
61716
61732
|
}
|
|
61717
61733
|
}, [_c('el-row', [_vm._l(_vm.formItems, function (item) {
|
|
61718
|
-
var _item$otherOptions, _item$otherOptions2, _item$otherOptions3;
|
|
61719
61734
|
return [!item.isHidden ? _c('el-col', _vm._b({
|
|
61720
61735
|
directives: [{
|
|
61721
61736
|
name: "show",
|
|
@@ -61937,26 +61952,26 @@ var formvue_type_template_id_c48999d6_render = function render() {
|
|
|
61937
61952
|
on: {
|
|
61938
61953
|
"click": _vm.handleQueryClick
|
|
61939
61954
|
}
|
|
61940
|
-
}, 'el-button',
|
|
61955
|
+
}, 'el-button', item.otherOptions || {}, false), [_vm._v(" " + _vm._s((item.otherOptions || {}).text || '搜索') + " ")])] : item.type === 'formButtons' ? [!item.otherOptions || item.otherOptions.reset !== false ? _c('el-button', _vm._b({
|
|
61941
61956
|
attrs: {
|
|
61942
61957
|
"native-type": "reset",
|
|
61943
61958
|
"size": _vm.elSize || 'mini'
|
|
61944
61959
|
}
|
|
61945
|
-
}, 'el-button',
|
|
61960
|
+
}, 'el-button', item.otherOptions || {}, false), [_vm._v(" " + _vm._s((item.otherOptions || {}).resetText || '重置') + " ")]) : _vm._e(), !item.otherOptions || item.otherOptions.submit !== false ? _c('el-button', _vm._b({
|
|
61946
61961
|
attrs: {
|
|
61947
61962
|
"native-type": "submit",
|
|
61948
61963
|
"size": _vm.elSize || 'mini',
|
|
61949
61964
|
"type": "primary",
|
|
61950
61965
|
"icon": !item.otherOptions || item.otherOptions.showSubmitIcon !== false ? 'el-icon-search' : ''
|
|
61951
61966
|
}
|
|
61952
|
-
}, 'el-button',
|
|
61967
|
+
}, 'el-button', item.otherOptions || {}, false), [_vm._v(" " + _vm._s((item.otherOptions || {}).submitText || '搜索') + " ")]) : _vm._e()] : _vm._e()], 2)], 1) : _vm._e()];
|
|
61953
61968
|
}), _vm._t("btn", null, {
|
|
61954
61969
|
"formData": _vm.formData
|
|
61955
61970
|
})], 2)], 1), _c('div', {
|
|
61956
61971
|
staticClass: "footer"
|
|
61957
61972
|
}, [_vm._t("footer")], 2)], 1);
|
|
61958
61973
|
};
|
|
61959
|
-
var
|
|
61974
|
+
var formvue_type_template_id_396e0fe6_scoped_true_staticRenderFns = [];
|
|
61960
61975
|
|
|
61961
61976
|
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/comps/pair-number-input.vue?vue&type=template&id=3344cc16
|
|
61962
61977
|
var pair_number_inputvue_type_template_id_3344cc16_render = function render() {
|
|
@@ -62426,10 +62441,10 @@ var custom_date_picker_component = normalizeComponent(
|
|
|
62426
62441
|
reset() {
|
|
62427
62442
|
// 重置为初始值
|
|
62428
62443
|
this.$refs.formRef.resetFields();
|
|
62444
|
+
this.$emit('input', {
|
|
62445
|
+
...this.initialValues
|
|
62446
|
+
});
|
|
62429
62447
|
this.$nextTick(() => {
|
|
62430
|
-
this.$emit('input', {
|
|
62431
|
-
...this.initialValues
|
|
62432
|
-
});
|
|
62433
62448
|
this.$emit('reset');
|
|
62434
62449
|
});
|
|
62435
62450
|
}
|
|
@@ -62437,21 +62452,27 @@ var custom_date_picker_component = normalizeComponent(
|
|
|
62437
62452
|
});
|
|
62438
62453
|
;// ./src/components/form/form.vue?vue&type=script&lang=js
|
|
62439
62454
|
/* harmony default export */ var form_formvue_type_script_lang_js = (formvue_type_script_lang_js);
|
|
62455
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/form.vue?vue&type=style&index=0&id=396e0fe6&prod&lang=scss&scoped=true
|
|
62456
|
+
// extracted by mini-css-extract-plugin
|
|
62457
|
+
|
|
62458
|
+
;// ./src/components/form/form.vue?vue&type=style&index=0&id=396e0fe6&prod&lang=scss&scoped=true
|
|
62459
|
+
|
|
62440
62460
|
;// ./src/components/form/form.vue
|
|
62441
62461
|
|
|
62442
62462
|
|
|
62443
62463
|
|
|
62464
|
+
;
|
|
62444
62465
|
|
|
62445
62466
|
|
|
62446
62467
|
/* normalize component */
|
|
62447
|
-
|
|
62468
|
+
|
|
62448
62469
|
var form_component = normalizeComponent(
|
|
62449
62470
|
form_formvue_type_script_lang_js,
|
|
62450
|
-
|
|
62451
|
-
|
|
62471
|
+
formvue_type_template_id_396e0fe6_scoped_true_render,
|
|
62472
|
+
formvue_type_template_id_396e0fe6_scoped_true_staticRenderFns,
|
|
62452
62473
|
false,
|
|
62453
62474
|
null,
|
|
62454
|
-
|
|
62475
|
+
"396e0fe6",
|
|
62455
62476
|
null
|
|
62456
62477
|
|
|
62457
62478
|
)
|
|
@@ -63179,11 +63200,14 @@ const components = {
|
|
|
63179
63200
|
BySelect: comps_select,
|
|
63180
63201
|
ByDatePickerRange: date_picker_range
|
|
63181
63202
|
};
|
|
63203
|
+
|
|
63182
63204
|
// 设置当前 z-index 起始值
|
|
63183
63205
|
index_esm.setCurrent(99999);
|
|
63184
63206
|
const install = Vue => {
|
|
63185
63207
|
Object.keys(components).forEach(name => {
|
|
63186
63208
|
Vue.component(name, components[name]);
|
|
63209
|
+
// 同时注册小写版本
|
|
63210
|
+
Vue.component(name.toLowerCase(), components[name]);
|
|
63187
63211
|
});
|
|
63188
63212
|
};
|
|
63189
63213
|
|
|
@@ -63194,6 +63218,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
63194
63218
|
/* harmony default export */ var src_0 = ({
|
|
63195
63219
|
install
|
|
63196
63220
|
});
|
|
63221
|
+
|
|
63197
63222
|
;// ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
63198
63223
|
|
|
63199
63224
|
|