vxe-table 4.3.6 → 4.3.8
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/es/grid/src/grid.js +15 -5
- package/es/header/src/header.js +2 -2
- package/es/icon/style/{iconfont.1669214286403.ttf → iconfont.1673016604432.ttf} +0 -0
- package/es/icon/style/{iconfont.1669214286403.woff → iconfont.1673016604432.woff} +0 -0
- package/es/icon/style/{iconfont.1669214286403.woff2 → iconfont.1673016604432.woff2} +0 -0
- package/es/icon/style.css +565 -1
- package/es/{iconfont.1669214286403.ttf → iconfont.1673016604432.ttf} +0 -0
- package/es/{iconfont.1669214286403.woff → iconfont.1673016604432.woff} +0 -0
- package/es/{iconfont.1669214286403.woff2 → iconfont.1673016604432.woff2} +0 -0
- package/es/input/src/input.js +46 -5
- package/es/loading/src/loading.js +7 -2
- package/es/loading/style.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/table.js +12 -3
- package/es/table/src/util.js +25 -1
- package/es/table/style.css +1 -1
- package/es/tools/log.js +1 -1
- package/es/v-x-e-table/index.js +1 -1
- package/es/v-x-e-table/style.css +564 -1
- package/es/vxe-icon/style.css +564 -0
- package/es/vxe-loading/style.css +1 -1
- package/es/vxe-table/style.css +1 -1
- package/lib/grid/src/grid.js +19 -7
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/header/src/header.js +1 -1
- package/lib/header/src/header.min.js +1 -1
- package/lib/icon/style/{iconfont.1669214286403.ttf → iconfont.1673016604432.ttf} +0 -0
- package/lib/icon/style/{iconfont.1669214286403.woff → iconfont.1673016604432.woff} +0 -0
- package/lib/icon/style/{iconfont.1669214286403.woff2 → iconfont.1673016604432.woff2} +0 -0
- package/lib/icon/style/style.css +565 -1
- package/lib/icon/style/style.min.css +565 -1
- package/lib/{iconfont.1669214286403.ttf → iconfont.1673016604432.ttf} +0 -0
- package/lib/{iconfont.1669214286403.woff → iconfont.1673016604432.woff} +0 -0
- package/lib/{iconfont.1669214286403.woff2 → iconfont.1673016604432.woff2} +0 -0
- package/lib/index.umd.js +107 -19
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +51 -5
- package/lib/input/src/input.min.js +1 -1
- package/lib/loading/src/loading.js +5 -2
- package/lib/loading/src/loading.min.js +1 -1
- package/lib/loading/style/style.css +1 -1
- package/lib/loading/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/table.js +14 -3
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +27 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +1 -1
- package/lib/table/style/style.min.css +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/style/style.css +564 -1
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/lib/vxe-icon/style/style.css +564 -0
- package/lib/vxe-icon/style/style.min.css +1 -1
- package/lib/vxe-loading/style/style.css +1 -1
- package/lib/vxe-loading/style/style.min.css +1 -1
- package/lib/vxe-table/style/style.css +1 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/form/src/form.ts +1 -1
- package/packages/grid/src/grid.ts +18 -5
- package/packages/header/src/header.ts +2 -2
- package/packages/input/src/input.ts +35 -6
- package/packages/loading/src/loading.ts +6 -2
- package/packages/table/src/table.ts +12 -3
- package/packages/table/src/util.ts +33 -1
- package/styles/icon.scss +2 -0
- package/styles/loading.scss +2 -1
package/lib/index.umd.js
CHANGED
|
@@ -2260,7 +2260,7 @@ const GlobalConfig = {
|
|
|
2260
2260
|
;// CONCATENATED MODULE: ./packages/tools/log.ts
|
|
2261
2261
|
|
|
2262
2262
|
function getLog(message, params) {
|
|
2263
|
-
return `[vxe-table v${"4.3.
|
|
2263
|
+
return `[vxe-table v${"4.3.8"}] ${conf.i18n(message, params)}`;
|
|
2264
2264
|
}
|
|
2265
2265
|
function outLog(type) {
|
|
2266
2266
|
return function (message, params) {
|
|
@@ -2813,7 +2813,37 @@ function getCellValue(row, column) {
|
|
|
2813
2813
|
function setCellValue(row, column, value) {
|
|
2814
2814
|
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, column.field, value);
|
|
2815
2815
|
}
|
|
2816
|
-
|
|
2816
|
+
/**
|
|
2817
|
+
* 列宽拖动最大宽度
|
|
2818
|
+
* @param params
|
|
2819
|
+
* @returns
|
|
2820
|
+
*/
|
|
2821
|
+
function getColReMaxWidth(params) {
|
|
2822
|
+
const {
|
|
2823
|
+
$table
|
|
2824
|
+
} = params;
|
|
2825
|
+
const {
|
|
2826
|
+
computeResizableOpts
|
|
2827
|
+
} = $table.getComputeMaps();
|
|
2828
|
+
const resizableOpts = computeResizableOpts.value;
|
|
2829
|
+
const {
|
|
2830
|
+
maxWidth: reMaxWidth
|
|
2831
|
+
} = resizableOpts;
|
|
2832
|
+
// 如果自定义调整宽度逻辑
|
|
2833
|
+
if (reMaxWidth) {
|
|
2834
|
+
const customMaxWidth = XEUtils.isFunction(reMaxWidth) ? reMaxWidth(params) : reMaxWidth;
|
|
2835
|
+
if (customMaxWidth !== 'auto') {
|
|
2836
|
+
return Math.max(1, XEUtils.toNumber(customMaxWidth));
|
|
2837
|
+
}
|
|
2838
|
+
}
|
|
2839
|
+
return -1;
|
|
2840
|
+
}
|
|
2841
|
+
/**
|
|
2842
|
+
* 列宽拖动最小宽度
|
|
2843
|
+
* @param params
|
|
2844
|
+
* @returns
|
|
2845
|
+
*/
|
|
2846
|
+
function getColReMinWidth(params) {
|
|
2817
2847
|
const {
|
|
2818
2848
|
$table,
|
|
2819
2849
|
column,
|
|
@@ -4027,7 +4057,7 @@ const config = new VXETableConfig();
|
|
|
4027
4057
|
const v = 'v4';
|
|
4028
4058
|
const VXETable = {
|
|
4029
4059
|
v,
|
|
4030
|
-
version: "4.3.
|
|
4060
|
+
version: "4.3.8",
|
|
4031
4061
|
setup: setup,
|
|
4032
4062
|
interceptor: interceptor,
|
|
4033
4063
|
renderer: renderer,
|
|
@@ -6719,7 +6749,9 @@ function useSize(props) {
|
|
|
6719
6749
|
icon: String,
|
|
6720
6750
|
text: String
|
|
6721
6751
|
},
|
|
6722
|
-
setup(props
|
|
6752
|
+
setup(props, {
|
|
6753
|
+
slots
|
|
6754
|
+
}) {
|
|
6723
6755
|
const computeLoadingIcon = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6724
6756
|
return props.icon || conf.icon.LOADING;
|
|
6725
6757
|
});
|
|
@@ -6734,7 +6766,9 @@ function useSize(props) {
|
|
|
6734
6766
|
class: ['vxe-loading', {
|
|
6735
6767
|
'is--visible': props.modelValue
|
|
6736
6768
|
}]
|
|
6737
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6769
|
+
}, slots.default ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6770
|
+
class: 'vxe-loading--warpper'
|
|
6771
|
+
}, slots.default({}))] : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6738
6772
|
class: 'vxe-loading--chunk'
|
|
6739
6773
|
}, [loadingIcon ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
6740
6774
|
class: loadingIcon
|
|
@@ -8760,17 +8794,22 @@ const quarterSize = 8;
|
|
|
8760
8794
|
const dateMultipleValue = computeDateMultipleValue.value;
|
|
8761
8795
|
if (isDateTimeType) {
|
|
8762
8796
|
// 如果是datetime特殊类型
|
|
8763
|
-
const dateListValue = computeDateListValue.value;
|
|
8797
|
+
const dateListValue = [...computeDateListValue.value];
|
|
8764
8798
|
const datetimeRest = [];
|
|
8799
|
+
const eqIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(dateListValue, val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(date, val, 'yyyyMMdd'));
|
|
8800
|
+
if (eqIndex === -1) {
|
|
8801
|
+
dateListValue.push(date);
|
|
8802
|
+
} else {
|
|
8803
|
+
dateListValue.splice(eqIndex, 1);
|
|
8804
|
+
}
|
|
8765
8805
|
dateListValue.forEach(item => {
|
|
8766
|
-
if (item
|
|
8806
|
+
if (item) {
|
|
8767
8807
|
item.setHours(datetimePanelValue.getHours());
|
|
8768
8808
|
item.setMinutes(datetimePanelValue.getMinutes());
|
|
8769
8809
|
item.setSeconds(datetimePanelValue.getSeconds());
|
|
8770
8810
|
datetimeRest.push(item);
|
|
8771
8811
|
}
|
|
8772
8812
|
});
|
|
8773
|
-
datetimeRest.push(date);
|
|
8774
8813
|
emitModel(datetimeRest.map(date => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat)).join(','), {
|
|
8775
8814
|
type: 'update'
|
|
8776
8815
|
});
|
|
@@ -9283,10 +9322,40 @@ const quarterSize = 8;
|
|
|
9283
9322
|
const {
|
|
9284
9323
|
multiple
|
|
9285
9324
|
} = props;
|
|
9325
|
+
const {
|
|
9326
|
+
datetimePanelValue
|
|
9327
|
+
} = reactData;
|
|
9286
9328
|
const dateValue = computeDateValue.value;
|
|
9287
9329
|
const isDateTimeType = computeIsDateTimeType.value;
|
|
9288
|
-
if (isDateTimeType
|
|
9289
|
-
|
|
9330
|
+
if (isDateTimeType) {
|
|
9331
|
+
const dateValueFormat = computeDateValueFormat.value;
|
|
9332
|
+
if (multiple) {
|
|
9333
|
+
// 如果为多选
|
|
9334
|
+
const dateMultipleValue = computeDateMultipleValue.value;
|
|
9335
|
+
if (isDateTimeType) {
|
|
9336
|
+
// 如果是datetime特殊类型
|
|
9337
|
+
const dateListValue = [...computeDateListValue.value];
|
|
9338
|
+
const datetimeRest = [];
|
|
9339
|
+
dateListValue.forEach(item => {
|
|
9340
|
+
if (item) {
|
|
9341
|
+
item.setHours(datetimePanelValue.getHours());
|
|
9342
|
+
item.setMinutes(datetimePanelValue.getMinutes());
|
|
9343
|
+
item.setSeconds(datetimePanelValue.getSeconds());
|
|
9344
|
+
datetimeRest.push(item);
|
|
9345
|
+
}
|
|
9346
|
+
});
|
|
9347
|
+
emitModel(datetimeRest.map(date => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat)).join(','), {
|
|
9348
|
+
type: 'update'
|
|
9349
|
+
});
|
|
9350
|
+
} else {
|
|
9351
|
+
// 如果是日期类型
|
|
9352
|
+
emitModel(dateMultipleValue.join(','), {
|
|
9353
|
+
type: 'update'
|
|
9354
|
+
});
|
|
9355
|
+
}
|
|
9356
|
+
} else {
|
|
9357
|
+
dateChange(dateValue || reactData.currentDate);
|
|
9358
|
+
}
|
|
9290
9359
|
}
|
|
9291
9360
|
hidePanel();
|
|
9292
9361
|
};
|
|
@@ -16540,7 +16609,9 @@ const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit
|
|
|
16540
16609
|
methodKeys.forEach(name => {
|
|
16541
16610
|
funcs[name] = (...args) => {
|
|
16542
16611
|
const $xetable = refTable.value;
|
|
16543
|
-
|
|
16612
|
+
if ($xetable && $xetable[name]) {
|
|
16613
|
+
return $xetable[name](...args);
|
|
16614
|
+
}
|
|
16544
16615
|
};
|
|
16545
16616
|
});
|
|
16546
16617
|
return funcs;
|
|
@@ -16549,7 +16620,9 @@ const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit
|
|
|
16549
16620
|
tableComponentMethodKeys.forEach(name => {
|
|
16550
16621
|
gridExtendTableMethods[name] = (...args) => {
|
|
16551
16622
|
const $xetable = refTable.value;
|
|
16552
|
-
|
|
16623
|
+
if ($xetable && $xetable[name]) {
|
|
16624
|
+
return $xetable && $xetable[name](...args);
|
|
16625
|
+
}
|
|
16553
16626
|
};
|
|
16554
16627
|
});
|
|
16555
16628
|
const computeProxyOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
@@ -17039,6 +17112,7 @@ const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit
|
|
|
17039
17112
|
const proxyOpts = computeProxyOpts.value;
|
|
17040
17113
|
const tableOns = Object.assign({}, tableCompEvents);
|
|
17041
17114
|
const emptySlot = slots.empty;
|
|
17115
|
+
const loadingSlot = slots.loading;
|
|
17042
17116
|
if (proxyConfig) {
|
|
17043
17117
|
if (proxyOpts.sort) {
|
|
17044
17118
|
tableOns.onSortChange = sortChangeEvent;
|
|
@@ -17047,13 +17121,18 @@ const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit
|
|
|
17047
17121
|
tableOns.onFilterChange = filterChangeEvent;
|
|
17048
17122
|
}
|
|
17049
17123
|
}
|
|
17124
|
+
const slotObj = {};
|
|
17125
|
+
if (emptySlot) {
|
|
17126
|
+
slotObj.empty = () => emptySlot({});
|
|
17127
|
+
}
|
|
17128
|
+
if (loadingSlot) {
|
|
17129
|
+
slotObj.loading = () => loadingSlot({});
|
|
17130
|
+
}
|
|
17050
17131
|
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)('vxe-table'), {
|
|
17051
17132
|
ref: refTable,
|
|
17052
17133
|
...tableProps,
|
|
17053
17134
|
...tableOns
|
|
17054
|
-
},
|
|
17055
|
-
empty: () => emptySlot({})
|
|
17056
|
-
} : {})];
|
|
17135
|
+
}, slotObj)];
|
|
17057
17136
|
};
|
|
17058
17137
|
/**
|
|
17059
17138
|
* 渲染表格底部区域
|
|
@@ -23765,7 +23844,7 @@ const header_renderType = 'header';
|
|
|
23765
23844
|
const pos = getOffsetPos(dragBtnElem, wrapperElem);
|
|
23766
23845
|
const dragBtnWidth = dragBtnElem.clientWidth;
|
|
23767
23846
|
const dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2);
|
|
23768
|
-
const minInterval =
|
|
23847
|
+
const minInterval = getColReMinWidth(params) - dragBtnOffsetWidth; // 列之间的最小间距
|
|
23769
23848
|
let dragMinLeft = pos.left - cell.clientWidth + dragBtnWidth + minInterval;
|
|
23770
23849
|
let dragPosLeft = pos.left + dragBtnOffsetWidth;
|
|
23771
23850
|
const domMousemove = document.onmousemove;
|
|
@@ -30305,8 +30384,14 @@ const visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
30305
30384
|
} = params;
|
|
30306
30385
|
const cell = evnt.currentTarget;
|
|
30307
30386
|
handleTargetEnterEvent(tooltipStore.column !== column || tooltipStore.row !== row);
|
|
30308
|
-
|
|
30309
|
-
|
|
30387
|
+
// 单元格处于编辑状态时不触发提示框
|
|
30388
|
+
if (column.editRender && isEnableConf(editConfig)) {
|
|
30389
|
+
// 如果是行编辑模式
|
|
30390
|
+
if (editOpts.mode === 'row' && actived.row === row) {
|
|
30391
|
+
return;
|
|
30392
|
+
}
|
|
30393
|
+
// 如果是单元格编辑模式
|
|
30394
|
+
if (actived.row === row && actived.column === column) {
|
|
30310
30395
|
return;
|
|
30311
30396
|
}
|
|
30312
30397
|
}
|
|
@@ -31415,6 +31500,7 @@ const visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
31415
31500
|
leftList,
|
|
31416
31501
|
rightList
|
|
31417
31502
|
} = columnStore;
|
|
31503
|
+
const loadingSlot = slots.loading;
|
|
31418
31504
|
const tipConfig = computeTipConfig.value;
|
|
31419
31505
|
const treeOpts = computeTreeOpts.value;
|
|
31420
31506
|
const rowOpts = computeRowOpts.value;
|
|
@@ -31532,7 +31618,9 @@ const visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
31532
31618
|
modelValue: loading,
|
|
31533
31619
|
icon: loadingOpts.icon,
|
|
31534
31620
|
text: loadingOpts.text
|
|
31535
|
-
}
|
|
31621
|
+
}, loadingSlot ? {
|
|
31622
|
+
default: () => loadingSlot({})
|
|
31623
|
+
} : {}),
|
|
31536
31624
|
/**
|
|
31537
31625
|
* 筛选
|
|
31538
31626
|
*/
|