vxe-table 4.12.0-beta.26 → 4.12.0-beta.28
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/style.css +1 -1
- package/es/table/module/custom/hook.js +1 -1
- package/es/table/module/custom/panel.js +4 -2
- package/es/table/module/edit/hook.js +3 -2
- package/es/table/module/export/export-panel.js +3 -2
- package/es/table/module/export/import-panel.js +3 -2
- package/es/table/module/menu/hook.js +2 -1
- package/es/table/module/validator/hook.js +2 -1
- package/es/table/src/body.js +8 -3
- package/es/table/src/cell.js +18 -4
- package/es/table/src/columnInfo.js +2 -2
- package/es/table/src/footer.js +6 -2
- package/es/table/src/header.js +6 -2
- package/es/table/src/table.js +10 -10
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +58 -32
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/hook.js +1 -1
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +4 -2
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +3 -2
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/export-panel.js +3 -2
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +3 -2
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/menu/hook.js +2 -1
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/module/validator/hook.js +2 -1
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/src/body.js +8 -3
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +12 -4
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +2 -4
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +6 -2
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +6 -2
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +10 -10
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/table/module/custom/hook.ts +1 -1
- package/packages/table/module/custom/panel.ts +6 -2
- package/packages/table/module/edit/hook.ts +4 -2
- package/packages/table/module/export/export-panel.ts +4 -2
- package/packages/table/module/export/import-panel.ts +4 -2
- package/packages/table/module/menu/hook.ts +3 -1
- package/packages/table/module/validator/hook.ts +3 -1
- package/packages/table/src/body.ts +9 -3
- package/packages/table/src/cell.ts +18 -4
- package/packages/table/src/columnInfo.ts +3 -2
- package/packages/table/src/footer.ts +7 -2
- package/packages/table/src/header.ts +7 -2
- package/packages/table/src/table.ts +10 -10
- package/packages/table/src/util.ts +1 -0
- /package/es/{iconfont.1742788362296.ttf → iconfont.1742873611926.ttf} +0 -0
- /package/es/{iconfont.1742788362296.woff → iconfont.1742873611926.woff} +0 -0
- /package/es/{iconfont.1742788362296.woff2 → iconfont.1742873611926.woff2} +0 -0
- /package/lib/{iconfont.1742788362296.ttf → iconfont.1742873611926.ttf} +0 -0
- /package/lib/{iconfont.1742788362296.woff → iconfont.1742873611926.woff} +0 -0
- /package/lib/{iconfont.1742788362296.woff2 → iconfont.1742873611926.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
|
|
|
3138
3138
|
;// ./packages/ui/index.ts
|
|
3139
3139
|
|
|
3140
3140
|
|
|
3141
|
-
const version = "4.12.0-beta.
|
|
3141
|
+
const version = "4.12.0-beta.28";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3587,7 +3587,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3587
3587
|
const {
|
|
3588
3588
|
log: log_log
|
|
3589
3589
|
} = core_.VxeUI;
|
|
3590
|
-
const log_version = `table v${"4.12.0-beta.
|
|
3590
|
+
const log_version = `table v${"4.12.0-beta.28"}`;
|
|
3591
3591
|
const warnLog = log_log.create('warn', log_version);
|
|
3592
3592
|
const errLog = log_log.create('error', log_version);
|
|
3593
3593
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -3608,12 +3608,10 @@ class ColumnInfo {
|
|
|
3608
3608
|
renderFooter,
|
|
3609
3609
|
renderData
|
|
3610
3610
|
} = {}) {
|
|
3611
|
-
const
|
|
3611
|
+
const tableProps = $xeTable.props;
|
|
3612
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
3612
3613
|
const formatter = _vm.formatter;
|
|
3613
3614
|
const visible = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.visible) ? _vm.visible : true;
|
|
3614
|
-
const {
|
|
3615
|
-
props: tableProps
|
|
3616
|
-
} = $xeTable;
|
|
3617
3615
|
const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
|
|
3618
3616
|
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
3619
3617
|
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')]);
|
|
@@ -4951,15 +4949,21 @@ function getFooterContent(params) {
|
|
|
4951
4949
|
});
|
|
4952
4950
|
if (footerFormatter) {
|
|
4953
4951
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerFormatter)) {
|
|
4954
|
-
return
|
|
4952
|
+
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
4953
|
+
class: 'vxe-cell--label'
|
|
4954
|
+
}, `${footerFormatter(footParams)}`)];
|
|
4955
4955
|
}
|
|
4956
4956
|
const isArr = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(footerFormatter);
|
|
4957
4957
|
const gFormatOpts = isArr ? cell_formats.get(footerFormatter[0]) : cell_formats.get(footerFormatter);
|
|
4958
4958
|
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
4959
4959
|
if (footerFormatMethod) {
|
|
4960
|
-
return
|
|
4960
|
+
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
4961
|
+
class: 'vxe-cell--label'
|
|
4962
|
+
}, `${isArr ? footerFormatMethod(footParams, ...footerFormatter.slice(1)) : footerFormatMethod(footParams)}`)];
|
|
4961
4963
|
}
|
|
4962
|
-
return ''
|
|
4964
|
+
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
4965
|
+
class: 'vxe-cell--label'
|
|
4966
|
+
}, '')];
|
|
4963
4967
|
}
|
|
4964
4968
|
if (renderOpts) {
|
|
4965
4969
|
const compConf = cell_renderer.get(renderOpts.name);
|
|
@@ -4970,7 +4974,9 @@ function getFooterContent(params) {
|
|
|
4970
4974
|
}
|
|
4971
4975
|
}
|
|
4972
4976
|
}
|
|
4973
|
-
return [
|
|
4977
|
+
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
4978
|
+
class: 'vxe-cell--label'
|
|
4979
|
+
}, formatText(itemValue, 1))];
|
|
4974
4980
|
}
|
|
4975
4981
|
function getDefaultCellLabel(params) {
|
|
4976
4982
|
const {
|
|
@@ -6339,6 +6345,7 @@ const renderType = 'body';
|
|
|
6339
6345
|
* 渲染列
|
|
6340
6346
|
*/
|
|
6341
6347
|
const renderTdColumn = (seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) => {
|
|
6348
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
6342
6349
|
const {
|
|
6343
6350
|
fullAllDataRowIdData,
|
|
6344
6351
|
visibleColumn
|
|
@@ -6456,7 +6463,7 @@ const renderType = 'body';
|
|
|
6456
6463
|
};
|
|
6457
6464
|
const cellParams = {
|
|
6458
6465
|
$table: $xeTable,
|
|
6459
|
-
$grid: $
|
|
6466
|
+
$grid: $xeGrid,
|
|
6460
6467
|
isEdit: false,
|
|
6461
6468
|
seq,
|
|
6462
6469
|
rowid,
|
|
@@ -6965,6 +6972,7 @@ const renderType = 'body';
|
|
|
6965
6972
|
const {
|
|
6966
6973
|
slots
|
|
6967
6974
|
} = tableContext;
|
|
6975
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
6968
6976
|
const {
|
|
6969
6977
|
fixedColumn,
|
|
6970
6978
|
fixedType,
|
|
@@ -7069,7 +7077,7 @@ const renderType = 'body';
|
|
|
7069
7077
|
if (emptySlot) {
|
|
7070
7078
|
emptyContent = $xeTable.callSlot(emptySlot, {
|
|
7071
7079
|
$table: $xeTable,
|
|
7072
|
-
$grid: $
|
|
7080
|
+
$grid: $xeGrid
|
|
7073
7081
|
});
|
|
7074
7082
|
} else {
|
|
7075
7083
|
const compConf = emptyOpts.name ? body_renderer.get(emptyOpts.name) : null;
|
|
@@ -7117,7 +7125,10 @@ const renderType = 'body';
|
|
|
7117
7125
|
}, renderColumnList.map((column, $columnIndex) => {
|
|
7118
7126
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
|
|
7119
7127
|
name: column.id,
|
|
7120
|
-
key: $columnIndex
|
|
7128
|
+
key: $columnIndex,
|
|
7129
|
+
style: {
|
|
7130
|
+
width: `${column.renderWidth}px`
|
|
7131
|
+
}
|
|
7121
7132
|
});
|
|
7122
7133
|
})),
|
|
7123
7134
|
/**
|
|
@@ -7224,6 +7235,7 @@ const header_renderType = 'header';
|
|
|
7224
7235
|
headerColumn.value = isGroup ? convertHeaderColumnToRows(props.tableGroupColumn) : [];
|
|
7225
7236
|
};
|
|
7226
7237
|
const renderRows = (isGroup, isOptimizeMode, cols, $rowIndex) => {
|
|
7238
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
7227
7239
|
const {
|
|
7228
7240
|
fixedType
|
|
7229
7241
|
} = props;
|
|
@@ -7291,7 +7303,7 @@ const header_renderType = 'header';
|
|
|
7291
7303
|
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
7292
7304
|
const cellParams = {
|
|
7293
7305
|
$table: $xeTable,
|
|
7294
|
-
$grid: $
|
|
7306
|
+
$grid: $xeGrid,
|
|
7295
7307
|
$rowIndex,
|
|
7296
7308
|
column,
|
|
7297
7309
|
columnIndex,
|
|
@@ -7538,7 +7550,10 @@ const header_renderType = 'header';
|
|
|
7538
7550
|
}, renderColumnList.map((column, $columnIndex) => {
|
|
7539
7551
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
|
|
7540
7552
|
name: column.id,
|
|
7541
|
-
key: $columnIndex
|
|
7553
|
+
key: $columnIndex,
|
|
7554
|
+
style: {
|
|
7555
|
+
width: `${column.renderWidth}px`
|
|
7556
|
+
}
|
|
7542
7557
|
});
|
|
7543
7558
|
})),
|
|
7544
7559
|
/**
|
|
@@ -7687,6 +7702,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
7687
7702
|
const refFooterTFoot = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
7688
7703
|
const refFooterXSpace = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
7689
7704
|
const renderRows = (tableColumn, footerTableData, row, $rowIndex, _rowIndex) => {
|
|
7705
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
7690
7706
|
const {
|
|
7691
7707
|
fixedType
|
|
7692
7708
|
} = props;
|
|
@@ -7754,7 +7770,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
7754
7770
|
const itemIndex = _columnIndex;
|
|
7755
7771
|
const cellParams = {
|
|
7756
7772
|
$table: $xeTable,
|
|
7757
|
-
$grid: $
|
|
7773
|
+
$grid: $xeGrid,
|
|
7758
7774
|
row,
|
|
7759
7775
|
rowIndex: _rowIndex,
|
|
7760
7776
|
_rowIndex,
|
|
@@ -8025,7 +8041,10 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
8025
8041
|
}, renderColumnList.map((column, $columnIndex) => {
|
|
8026
8042
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
|
|
8027
8043
|
name: column.id,
|
|
8028
|
-
key: $columnIndex
|
|
8044
|
+
key: $columnIndex,
|
|
8045
|
+
style: {
|
|
8046
|
+
width: `${column.renderWidth}px`
|
|
8047
|
+
}
|
|
8029
8048
|
});
|
|
8030
8049
|
})),
|
|
8031
8050
|
/**
|
|
@@ -8854,6 +8873,7 @@ const {
|
|
|
8854
8873
|
}, panel_getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']))])])]);
|
|
8855
8874
|
};
|
|
8856
8875
|
const renderSimplePanel = () => {
|
|
8876
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
8857
8877
|
const {
|
|
8858
8878
|
customStore
|
|
8859
8879
|
} = props;
|
|
@@ -8899,7 +8919,7 @@ const {
|
|
|
8899
8919
|
}
|
|
8900
8920
|
const params = {
|
|
8901
8921
|
$table: $xeTable,
|
|
8902
|
-
$grid: $
|
|
8922
|
+
$grid: $xeGrid,
|
|
8903
8923
|
columns: customColumnList,
|
|
8904
8924
|
isAllChecked,
|
|
8905
8925
|
isAllIndeterminate,
|
|
@@ -9056,6 +9076,7 @@ const {
|
|
|
9056
9076
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()])]) : null] : []);
|
|
9057
9077
|
};
|
|
9058
9078
|
const renderPopupPanel = () => {
|
|
9079
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
9059
9080
|
const {
|
|
9060
9081
|
customStore
|
|
9061
9082
|
} = props;
|
|
@@ -9108,7 +9129,7 @@ const {
|
|
|
9108
9129
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
9109
9130
|
const params = {
|
|
9110
9131
|
$table: $xeTable,
|
|
9111
|
-
$grid: $
|
|
9132
|
+
$grid: $xeGrid,
|
|
9112
9133
|
columns: customColumnList,
|
|
9113
9134
|
isAllChecked,
|
|
9114
9135
|
isAllIndeterminate,
|
|
@@ -9719,6 +9740,7 @@ const {
|
|
|
9719
9740
|
});
|
|
9720
9741
|
};
|
|
9721
9742
|
const renderVN = () => {
|
|
9743
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
9722
9744
|
const {
|
|
9723
9745
|
defaultOptions,
|
|
9724
9746
|
storeData
|
|
@@ -9755,7 +9777,7 @@ const {
|
|
|
9755
9777
|
default: () => {
|
|
9756
9778
|
const params = {
|
|
9757
9779
|
$table: $xeTable,
|
|
9758
|
-
$grid: $
|
|
9780
|
+
$grid: $xeGrid,
|
|
9759
9781
|
options: defaultOptions,
|
|
9760
9782
|
params: defaultOptions.params
|
|
9761
9783
|
};
|
|
@@ -9793,7 +9815,7 @@ const {
|
|
|
9793
9815
|
footer() {
|
|
9794
9816
|
const params = {
|
|
9795
9817
|
$table: $xeTable,
|
|
9796
|
-
$grid: $
|
|
9818
|
+
$grid: $xeGrid,
|
|
9797
9819
|
options: defaultOptions,
|
|
9798
9820
|
params: defaultOptions.params
|
|
9799
9821
|
};
|
|
@@ -10014,6 +10036,7 @@ const {
|
|
|
10014
10036
|
}
|
|
10015
10037
|
};
|
|
10016
10038
|
const renderVN = () => {
|
|
10039
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
10017
10040
|
const {
|
|
10018
10041
|
defaultOptions,
|
|
10019
10042
|
storeData
|
|
@@ -10099,7 +10122,7 @@ const {
|
|
|
10099
10122
|
default: () => {
|
|
10100
10123
|
const params = {
|
|
10101
10124
|
$table: $xeTable,
|
|
10102
|
-
$grid: $
|
|
10125
|
+
$grid: $xeGrid,
|
|
10103
10126
|
options: defaultOptions,
|
|
10104
10127
|
columns,
|
|
10105
10128
|
params: defaultOptions.params
|
|
@@ -10240,7 +10263,7 @@ const {
|
|
|
10240
10263
|
footer() {
|
|
10241
10264
|
const params = {
|
|
10242
10265
|
$table: $xeTable,
|
|
10243
|
-
$grid: $
|
|
10266
|
+
$grid: $xeGrid,
|
|
10244
10267
|
options: defaultOptions,
|
|
10245
10268
|
columns,
|
|
10246
10269
|
params: defaultOptions.params
|
|
@@ -11051,7 +11074,7 @@ if(editMode!=='insert'){setCellValue(selected.row,selected.column,null);}$xeTabl
|
|
|
11051
11074
|
* 处理显示 tooltip
|
|
11052
11075
|
* @param {Event} evnt 事件
|
|
11053
11076
|
* @param {Row} row 行对象
|
|
11054
|
-
*/const handleTooltip=(evnt,tdEl,overflowElem,
|
|
11077
|
+
*/const handleTooltip=(evnt,tdEl,overflowElem,params)=>{const tipOverEl=overflowElem||tdEl;if(!tipOverEl){return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}params.cell=tdEl;const{tooltipStore}=reactData;const tooltipOpts=computeTooltipOpts.value;const{column,row}=params;const{showAll,contentMethod}=tooltipOpts;const customContent=contentMethod?contentMethod(params):null;const useCustom=contentMethod&&!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(customContent);const content=useCustom?customContent:external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toString(column.type==='html'?tipOverEl.innerText:tipOverEl.textContent).trim();if(content&&(showAll||useCustom||tipOverEl.scrollWidth>tipOverEl.clientWidth)){Object.assign(tooltipStore,{row,column,visible:true,currOpts:{}});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{const $tooltip=refTooltip.value;if($tooltip&&$tooltip.open){$tooltip.open(tipOverEl,formatText(content));}});}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();};const callSlot=(slotFunc,params)=>{if(slotFunc){if($xeGrid){return $xeGrid.callSlot(slotFunc,params);}if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)){return getSlotVNs(slotFunc(params));}}return[];};/**
|
|
11055
11078
|
* 内部方法
|
|
11056
11079
|
*/tablePrivateMethods={getSetupOptions(){return table_getConfig();},updateAfterDataIndex,callSlot,/**
|
|
11057
11080
|
* 获取父容器元素
|
|
@@ -11107,14 +11130,14 @@ rows.forEach(row=>{const rowid=handleGetRowId(row);if(isForce||!checkMethod||che
|
|
|
11107
11130
|
* @deprecated
|
|
11108
11131
|
*/handleSelectRow({row},checked,isForce){$xeTable.handleBatchSelectRows([row],checked,isForce);},triggerHeaderTitleEvent(evnt,iconParams,params){const tipContent=iconParams.content||iconParams.message;if(tipContent){const{tooltipStore}=reactData;const{column}=params;const content=getFuncText(tipContent);handleTargetEnterEvent(true);tooltipStore.row=null;tooltipStore.column=column;tooltipStore.visible=true;tooltipStore.currOpts=iconParams;(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{const $tooltip=refTooltip.value;if($tooltip&&$tooltip.open){$tooltip.open(evnt.currentTarget,content);}});}},/**
|
|
11109
11132
|
* 触发表头 tooltip 事件
|
|
11110
|
-
*/triggerHeaderTooltipEvent(evnt,params){const{tooltipStore}=reactData;const{column}=params;handleTargetEnterEvent(true);const titleElem=evnt.currentTarget;if(!titleElem){return;}const cellEl=titleElem.parentElement;if(!cellEl){return;}const thEl=cellEl.parentElement;if(!thEl){return;}if(tooltipStore.column!==column||!tooltipStore.visible){handleTooltip(evnt,thEl,cellEl,
|
|
11133
|
+
*/triggerHeaderTooltipEvent(evnt,params){const{tooltipStore}=reactData;const{column}=params;handleTargetEnterEvent(true);const titleElem=evnt.currentTarget;if(!titleElem){return;}const cellEl=titleElem.parentElement;if(!cellEl){return;}const thEl=cellEl.parentElement;if(!thEl){return;}if(tooltipStore.column!==column||!tooltipStore.visible){handleTooltip(evnt,thEl,thEl.querySelector('.vxe-cell--title')||cellEl,params);}},/**
|
|
11111
11134
|
* 触发单元格 tooltip 事件
|
|
11112
11135
|
*/triggerBodyTooltipEvent(evnt,params){const{editConfig}=props;const{editStore}=reactData;const{tooltipStore}=reactData;const editOpts=computeEditOpts.value;const{actived}=editStore;const{row,column}=params;const tdEl=evnt.currentTarget;handleTargetEnterEvent(tooltipStore.column!==column||tooltipStore.row!==row);// 单元格处于编辑状态时不触发提示框
|
|
11113
11136
|
if(column.editRender&&isEnableConf(editConfig)){// 如果是行编辑模式
|
|
11114
11137
|
if(editOpts.mode==='row'&&actived.row===row){return;}// 如果是单元格编辑模式
|
|
11115
|
-
if(actived.row===row&&actived.column===column){return;}}if(tooltipStore.column!==column||tooltipStore.row!==row||!tooltipStore.visible){handleTooltip(evnt,tdEl,tdEl.querySelector('.vxe-cell--wrapper'),
|
|
11138
|
+
if(actived.row===row&&actived.column===column){return;}}if(tooltipStore.column!==column||tooltipStore.row!==row||!tooltipStore.visible){handleTooltip(evnt,tdEl,tdEl.querySelector('.vxe-cell--label')||tdEl.querySelector('.vxe-cell--wrapper'),params);}},/**
|
|
11116
11139
|
* 触发表尾 tooltip 事件
|
|
11117
|
-
*/triggerFooterTooltipEvent(evnt,params){const{column}=params;const{tooltipStore}=reactData;const
|
|
11140
|
+
*/triggerFooterTooltipEvent(evnt,params){const{column}=params;const{tooltipStore}=reactData;const tdEl=evnt.currentTarget;handleTargetEnterEvent(tooltipStore.column!==column||!!tooltipStore.row);if(tooltipStore.column!==column||!tooltipStore.visible){handleTooltip(evnt,tdEl,tdEl.querySelector('.vxe-cell--label')||tdEl.querySelector('.vxe-cell--wrapper'),params);}},handleTargetLeaveEvent(){const tooltipOpts=computeTooltipOpts.value;let $tooltip=refTooltip.value;if($tooltip&&$tooltip.setActived){$tooltip.setActived(false);}if(tooltipOpts.enterable){internalData.tooltipTimeout=setTimeout(()=>{$tooltip=refTooltip.value;if($tooltip&&$tooltip.isActived&&!$tooltip.isActived()){$xeTable.closeTooltip();}},tooltipOpts.leaveDelay);}else{$xeTable.closeTooltip();}},triggerHeaderCellClickEvent(evnt,params){const{_lastResizeTime}=internalData;const sortOpts=computeSortOpts.value;const columnOpts=computeColumnOpts.value;const currentColumnOpts=computeCurrentColumnOpts.value;const{column}=params;const cell=evnt.currentTarget;const triggerResizable=_lastResizeTime&&_lastResizeTime>Date.now()-300;const triggerSort=getEventTargetNode(evnt,cell,'vxe-cell--sort').flag;const triggerFilter=getEventTargetNode(evnt,cell,'vxe-cell--filter').flag;if(sortOpts.trigger==='cell'&&!(triggerResizable||triggerSort||triggerFilter)){$xeTable.triggerSortEvent(evnt,column,getNextSortOrder(column));}dispatchEvent('header-cell-click',Object.assign({triggerResizable,triggerSort,triggerFilter,cell},params),evnt);if((columnOpts.isCurrent||props.highlightCurrentColumn)&&(!currentColumnOpts.trigger||['header','default'].includes(currentColumnOpts.trigger))){$xeTable.triggerCurrentColumnEvent(evnt,params);}},triggerHeaderCellDblclickEvent(evnt,params){dispatchEvent('header-cell-dblclick',Object.assign({cell:evnt.currentTarget},params),evnt);},/**
|
|
11118
11141
|
* 列点击事件
|
|
11119
11142
|
* 如果是单击模式,则激活为编辑状态
|
|
11120
11143
|
* 如果是双击模式,则单击后选中状态
|
|
@@ -12101,13 +12124,14 @@ menu_hook_hooks.add('tableMenuModule', {
|
|
|
12101
12124
|
* 快捷菜单点击事件
|
|
12102
12125
|
*/
|
|
12103
12126
|
ctxMenuLinkEvent(evnt, menu) {
|
|
12127
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
12104
12128
|
// 如果一级菜单有配置 code 则允许点击,否则不能点击
|
|
12105
12129
|
if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
12106
12130
|
const gMenuOpts = hook_menus.get(menu.code);
|
|
12107
12131
|
const params = Object.assign({}, internalData._currMenuParams, {
|
|
12108
12132
|
menu,
|
|
12109
12133
|
$table: $xeTable,
|
|
12110
|
-
$grid: $
|
|
12134
|
+
$grid: $xeGrid,
|
|
12111
12135
|
$event: evnt
|
|
12112
12136
|
});
|
|
12113
12137
|
const tmMethod = gMenuOpts ? gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod : null;
|
|
@@ -12618,6 +12642,7 @@ edit_hook_hooks.add('tableEditModule', {
|
|
|
12618
12642
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => $xeTable.updateCellAreas());
|
|
12619
12643
|
};
|
|
12620
12644
|
const handleEditActive = (params, evnt, isFocus, isPos) => {
|
|
12645
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
12621
12646
|
const {
|
|
12622
12647
|
editConfig,
|
|
12623
12648
|
mouseConfig
|
|
@@ -12653,7 +12678,7 @@ edit_hook_hooks.add('tableEditModule', {
|
|
|
12653
12678
|
if (!beforeEditMethod || beforeEditMethod({
|
|
12654
12679
|
...params,
|
|
12655
12680
|
$table: $xeTable,
|
|
12656
|
-
$grid: $
|
|
12681
|
+
$grid: $xeGrid
|
|
12657
12682
|
})) {
|
|
12658
12683
|
if (mouseConfig) {
|
|
12659
12684
|
$xeTable.clearSelected();
|
|
@@ -12685,7 +12710,7 @@ edit_hook_hooks.add('tableEditModule', {
|
|
|
12685
12710
|
afterEditMethod({
|
|
12686
12711
|
...params,
|
|
12687
12712
|
$table: $xeTable,
|
|
12688
|
-
$grid: $
|
|
12713
|
+
$grid: $xeGrid
|
|
12689
12714
|
});
|
|
12690
12715
|
}
|
|
12691
12716
|
});
|
|
@@ -16149,6 +16174,7 @@ validator_hook_hooks.add('tableValidatorModule', {
|
|
|
16149
16174
|
* trigger=blur|change 触发方式(除非特殊场景,否则默认为空就行)
|
|
16150
16175
|
*/
|
|
16151
16176
|
validCellRules(validType, row, column, val) {
|
|
16177
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
16152
16178
|
const {
|
|
16153
16179
|
editRules
|
|
16154
16180
|
} = props;
|
|
@@ -16180,7 +16206,7 @@ validator_hook_hooks.add('tableValidatorModule', {
|
|
|
16180
16206
|
columnIndex: $xeTable.getColumnIndex(column),
|
|
16181
16207
|
field: column.field,
|
|
16182
16208
|
$table: $xeTable,
|
|
16183
|
-
$grid: $
|
|
16209
|
+
$grid: $xeGrid
|
|
16184
16210
|
};
|
|
16185
16211
|
let customValid;
|
|
16186
16212
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(validator)) {
|
|
@@ -16396,7 +16422,7 @@ core_.VxeUI.hooks.add('tableCustomModule', {
|
|
|
16396
16422
|
const {
|
|
16397
16423
|
refElem
|
|
16398
16424
|
} = $xeTable.getRefMaps();
|
|
16399
|
-
const $xeGrid = $xeTable.
|
|
16425
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
16400
16426
|
const calcMaxHeight = () => {
|
|
16401
16427
|
const {
|
|
16402
16428
|
customStore
|