vxe-table 3.12.13 → 3.12.14
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/edit/mixin.js +5 -6
- package/es/table/module/validator/mixin.js +13 -1
- package/es/table/render/index.js +104 -43
- package/es/table/src/header.js +4 -2
- package/es/table/src/methods.js +35 -28
- package/es/table/src/table.js +44 -6
- package/es/table/style.css +33 -2
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +33 -2
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +224 -101
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/edit/mixin.js +5 -6
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +18 -4
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +109 -41
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/header.js +4 -2
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +46 -40
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +40 -6
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +33 -2
- package/lib/table/style/style.min.css +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/lib/vxe-table/style/style.css +33 -2
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/table/module/edit/mixin.ts +5 -6
- package/packages/table/module/validator/mixin.ts +15 -2
- package/packages/table/render/index.ts +120 -51
- package/packages/table/src/header.ts +4 -2
- package/packages/table/src/methods.ts +42 -30
- package/packages/table/src/table.ts +47 -6
- package/styles/components/table.scss +31 -2
- /package/es/{iconfont.1739152166680.ttf → iconfont.1739181382716.ttf} +0 -0
- /package/es/{iconfont.1739152166680.woff → iconfont.1739181382716.woff} +0 -0
- /package/es/{iconfont.1739152166680.woff2 → iconfont.1739181382716.woff2} +0 -0
- /package/lib/{iconfont.1739152166680.ttf → iconfont.1739181382716.ttf} +0 -0
- /package/lib/{iconfont.1739152166680.woff → iconfont.1739181382716.woff} +0 -0
- /package/lib/{iconfont.1739152166680.woff2 → iconfont.1739181382716.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.12.
|
|
2223
|
+
const version = "3.12.14";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2842,7 +2842,7 @@ function isNodeElement(elem) {
|
|
|
2842
2842
|
const {
|
|
2843
2843
|
log: log_log
|
|
2844
2844
|
} = core_.VxeUI;
|
|
2845
|
-
const log_version = `table v${"3.12.
|
|
2845
|
+
const log_version = `table v${"3.12.14"}`;
|
|
2846
2846
|
const warnLog = log_log.create('warn', log_version);
|
|
2847
2847
|
const errLog = log_log.create('error', log_version);
|
|
2848
2848
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -12145,10 +12145,9 @@ const Methods = {
|
|
|
12145
12145
|
} = sortOpts;
|
|
12146
12146
|
const {
|
|
12147
12147
|
field,
|
|
12148
|
-
sortable
|
|
12149
|
-
remoteSort
|
|
12148
|
+
sortable
|
|
12150
12149
|
} = column;
|
|
12151
|
-
if (sortable || remoteSort) {
|
|
12150
|
+
if (sortable || column.remoteSort) {
|
|
12152
12151
|
if (!order || column.order === order) {
|
|
12153
12152
|
if (allowClear) {
|
|
12154
12153
|
$xeTable.clearSort(multiple ? column : null);
|
|
@@ -12162,6 +12161,44 @@ const Methods = {
|
|
|
12162
12161
|
$xeTable.handleColumnSortEvent(evnt, column);
|
|
12163
12162
|
}
|
|
12164
12163
|
},
|
|
12164
|
+
handleCellRuleUpdateStatus(type, cellParams, cellValue) {
|
|
12165
|
+
const $xeTable = this;
|
|
12166
|
+
const reactData = $xeTable;
|
|
12167
|
+
const {
|
|
12168
|
+
validStore
|
|
12169
|
+
} = reactData;
|
|
12170
|
+
const {
|
|
12171
|
+
row,
|
|
12172
|
+
column
|
|
12173
|
+
} = cellParams;
|
|
12174
|
+
if ($xeTable.hasCellRules) {
|
|
12175
|
+
if ($xeTable.hasCellRules(type, row, column)) {
|
|
12176
|
+
const cell = $xeTable.getCellElement(row, column);
|
|
12177
|
+
if (cell) {
|
|
12178
|
+
const customVal = !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(cellValue);
|
|
12179
|
+
return $xeTable.validCellRules(type, row, column, cellValue).then(() => {
|
|
12180
|
+
if (customVal && validStore.visible) {
|
|
12181
|
+
setCellValue(row, column, cellValue);
|
|
12182
|
+
}
|
|
12183
|
+
$xeTable.clearValidate(row, column);
|
|
12184
|
+
}).catch(({
|
|
12185
|
+
rule
|
|
12186
|
+
}) => {
|
|
12187
|
+
if (customVal) {
|
|
12188
|
+
setCellValue(row, column, cellValue);
|
|
12189
|
+
}
|
|
12190
|
+
$xeTable.showValidTooltip({
|
|
12191
|
+
rule,
|
|
12192
|
+
row,
|
|
12193
|
+
column,
|
|
12194
|
+
cell
|
|
12195
|
+
});
|
|
12196
|
+
});
|
|
12197
|
+
}
|
|
12198
|
+
}
|
|
12199
|
+
}
|
|
12200
|
+
return $xeTable.$nextTick();
|
|
12201
|
+
},
|
|
12165
12202
|
/**
|
|
12166
12203
|
* 表头单元格按下事件
|
|
12167
12204
|
*/
|
|
@@ -14884,45 +14921,14 @@ const Methods = {
|
|
|
14884
14921
|
* 如果单元格配置了校验规则,则会进行校验
|
|
14885
14922
|
*/
|
|
14886
14923
|
updateStatus(slotParams, cellValue) {
|
|
14887
|
-
const
|
|
14924
|
+
const $xeTable = this;
|
|
14925
|
+
const props = $xeTable;
|
|
14888
14926
|
return this.$nextTick().then(() => {
|
|
14889
14927
|
const {
|
|
14890
|
-
|
|
14891
|
-
|
|
14892
|
-
|
|
14893
|
-
|
|
14894
|
-
const refTableBody = $refs.refTableBody;
|
|
14895
|
-
if (slotParams && refTableBody && editRules) {
|
|
14896
|
-
const {
|
|
14897
|
-
row,
|
|
14898
|
-
column
|
|
14899
|
-
} = slotParams;
|
|
14900
|
-
const type = 'change';
|
|
14901
|
-
if (this.hasCellRules) {
|
|
14902
|
-
if (this.hasCellRules(type, row, column)) {
|
|
14903
|
-
const cell = this.getCellElement(row, column);
|
|
14904
|
-
if (cell) {
|
|
14905
|
-
return this.validCellRules(type, row, column, cellValue).then(() => {
|
|
14906
|
-
if (customVal && validStore.visible) {
|
|
14907
|
-
setCellValue(row, column, cellValue);
|
|
14908
|
-
}
|
|
14909
|
-
this.clearValidate(row, column);
|
|
14910
|
-
}).catch(({
|
|
14911
|
-
rule
|
|
14912
|
-
}) => {
|
|
14913
|
-
if (customVal) {
|
|
14914
|
-
setCellValue(row, column, cellValue);
|
|
14915
|
-
}
|
|
14916
|
-
this.showValidTooltip({
|
|
14917
|
-
rule,
|
|
14918
|
-
row,
|
|
14919
|
-
column,
|
|
14920
|
-
cell
|
|
14921
|
-
});
|
|
14922
|
-
});
|
|
14923
|
-
}
|
|
14924
|
-
}
|
|
14925
|
-
}
|
|
14928
|
+
editRules
|
|
14929
|
+
} = props;
|
|
14930
|
+
if (slotParams && editRules) {
|
|
14931
|
+
return $xeTable.handleCellRuleUpdateStatus('change', slotParams, cellValue);
|
|
14926
14932
|
}
|
|
14927
14933
|
});
|
|
14928
14934
|
},
|
|
@@ -16167,8 +16173,10 @@ const header_renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) =>
|
|
|
16167
16173
|
const showResizable = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
|
|
16168
16174
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
16169
16175
|
let isVNPreEmptyStatus = false;
|
|
16170
|
-
if (
|
|
16171
|
-
|
|
16176
|
+
if (!isGroup) {
|
|
16177
|
+
if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
16178
|
+
isVNPreEmptyStatus = true;
|
|
16179
|
+
}
|
|
16172
16180
|
}
|
|
16173
16181
|
const tcStyle = {};
|
|
16174
16182
|
if (hasEllipsis) {
|
|
@@ -21079,11 +21087,6 @@ function handleInsertChildRowAt($xeTable, records, parentRow, targetRow, isInser
|
|
|
21079
21087
|
}
|
|
21080
21088
|
focused.row = null;
|
|
21081
21089
|
focused.column = null;
|
|
21082
|
-
$xeTable.$nextTick(() => {
|
|
21083
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreas) {
|
|
21084
|
-
return $xeTable.handleRecalculateCellAreas();
|
|
21085
|
-
}
|
|
21086
|
-
});
|
|
21087
21090
|
if (validOpts.autoClear) {
|
|
21088
21091
|
if (validOpts.msgMode !== 'full' || mixin_getConfig().cellVaildMode === 'obsolete') {
|
|
21089
21092
|
if ($xeTable.clearValidate) {
|
|
@@ -21091,7 +21094,11 @@ function handleInsertChildRowAt($xeTable, records, parentRow, targetRow, isInser
|
|
|
21091
21094
|
}
|
|
21092
21095
|
}
|
|
21093
21096
|
}
|
|
21094
|
-
return $xeTable.$nextTick()
|
|
21097
|
+
return $xeTable.$nextTick().then(() => {
|
|
21098
|
+
if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreas) {
|
|
21099
|
+
return $xeTable.handleRecalculateCellAreas();
|
|
21100
|
+
}
|
|
21101
|
+
});
|
|
21095
21102
|
},
|
|
21096
21103
|
_getActiveRecord() {
|
|
21097
21104
|
if (true) {
|
|
@@ -23921,13 +23928,22 @@ function validErrorRuleValue(rule, val) {
|
|
|
23921
23928
|
* 返回 Promise 对象,或者使用回调方式
|
|
23922
23929
|
*/
|
|
23923
23930
|
beginValidate(rows, cols, cb, isFull) {
|
|
23931
|
+
const $xeTable = this;
|
|
23932
|
+
const props = $xeTable;
|
|
23933
|
+
const reactData = $xeTable;
|
|
23934
|
+
const internalData = $xeTable;
|
|
23924
23935
|
const validRest = {};
|
|
23925
23936
|
const {
|
|
23926
23937
|
editRules,
|
|
23927
|
-
|
|
23928
|
-
|
|
23929
|
-
|
|
23930
|
-
|
|
23938
|
+
treeConfig
|
|
23939
|
+
} = props;
|
|
23940
|
+
const {
|
|
23941
|
+
pendingRowMaps
|
|
23942
|
+
} = reactData;
|
|
23943
|
+
const {
|
|
23944
|
+
afterFullData
|
|
23945
|
+
} = internalData;
|
|
23946
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
23931
23947
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
23932
23948
|
let validList;
|
|
23933
23949
|
if (rows === true) {
|
|
@@ -23950,6 +23966,11 @@ function validErrorRuleValue(rule, val) {
|
|
|
23950
23966
|
if (editRules) {
|
|
23951
23967
|
const columns = cols && cols.length ? cols : this.getColumns();
|
|
23952
23968
|
const handleVaild = row => {
|
|
23969
|
+
const rowid = getRowid($xeTable, row);
|
|
23970
|
+
// 是否标记删除
|
|
23971
|
+
if (pendingRowMaps[rowid]) {
|
|
23972
|
+
return;
|
|
23973
|
+
}
|
|
23953
23974
|
if (isFull || !this.validRuleErr) {
|
|
23954
23975
|
const colVailds = [];
|
|
23955
23976
|
columns.forEach(column => {
|
|
@@ -25188,6 +25209,12 @@ function renderBody(h, $xeTable) {
|
|
|
25188
25209
|
isHeader: false,
|
|
25189
25210
|
isFooter: false
|
|
25190
25211
|
},
|
|
25212
|
+
rowHeightStore: {
|
|
25213
|
+
default: 48,
|
|
25214
|
+
medium: 44,
|
|
25215
|
+
small: 40,
|
|
25216
|
+
mini: 36
|
|
25217
|
+
},
|
|
25191
25218
|
scrollVMLoading: false,
|
|
25192
25219
|
calcCellHeightFlag: 0,
|
|
25193
25220
|
resizeHeightFlag: 0,
|
|
@@ -25295,12 +25322,9 @@ function renderBody(h, $xeTable) {
|
|
|
25295
25322
|
return this.computeRowHeightMaps;
|
|
25296
25323
|
},
|
|
25297
25324
|
computeRowHeightMaps() {
|
|
25298
|
-
|
|
25299
|
-
|
|
25300
|
-
|
|
25301
|
-
small: 40,
|
|
25302
|
-
mini: 36
|
|
25303
|
-
};
|
|
25325
|
+
const $xeTable = this;
|
|
25326
|
+
const reactData = $xeTable;
|
|
25327
|
+
return reactData.rowHeightStore;
|
|
25304
25328
|
},
|
|
25305
25329
|
computeDefaultRowHeight() {
|
|
25306
25330
|
const $xeTable = this;
|
|
@@ -26075,9 +26099,29 @@ function renderBody(h, $xeTable) {
|
|
|
26075
26099
|
mounted() {
|
|
26076
26100
|
const $xeTable = this;
|
|
26077
26101
|
const props = $xeTable;
|
|
26102
|
+
const reactData = $xeTable;
|
|
26103
|
+
const {
|
|
26104
|
+
rowHeightStore
|
|
26105
|
+
} = reactData;
|
|
26106
|
+
const varEl = $xeTable.$refs.refVarElem;
|
|
26078
26107
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
26079
26108
|
const rowOpts = $xeTable.computeRowOpts;
|
|
26080
26109
|
const customOpts = $xeTable.computeCustomOpts;
|
|
26110
|
+
if (varEl) {
|
|
26111
|
+
const [defEl, mediumEl, smallEl, miniEl] = varEl.children;
|
|
26112
|
+
if (defEl) {
|
|
26113
|
+
rowHeightStore.default = defEl.clientHeight;
|
|
26114
|
+
}
|
|
26115
|
+
if (mediumEl) {
|
|
26116
|
+
rowHeightStore.medium = mediumEl.clientHeight;
|
|
26117
|
+
}
|
|
26118
|
+
if (smallEl) {
|
|
26119
|
+
rowHeightStore.small = smallEl.clientHeight;
|
|
26120
|
+
}
|
|
26121
|
+
if (miniEl) {
|
|
26122
|
+
rowHeightStore.mini = miniEl.clientHeight;
|
|
26123
|
+
}
|
|
26124
|
+
}
|
|
26081
26125
|
if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
|
|
26082
26126
|
initTpImg();
|
|
26083
26127
|
}
|
|
@@ -26256,6 +26300,17 @@ function renderBody(h, $xeTable) {
|
|
|
26256
26300
|
class: 'vxe-table-slots',
|
|
26257
26301
|
ref: 'hideColumn'
|
|
26258
26302
|
}, this.$slots.default), h('div', {
|
|
26303
|
+
ref: 'refVarElem',
|
|
26304
|
+
class: 'vxe-table-vars'
|
|
26305
|
+
}, [h('div', {
|
|
26306
|
+
class: 'vxe-table-var-default'
|
|
26307
|
+
}), h('div', {
|
|
26308
|
+
class: 'vxe-table-var-medium'
|
|
26309
|
+
}), h('div', {
|
|
26310
|
+
class: 'vxe-table-var-small'
|
|
26311
|
+
}), h('div', {
|
|
26312
|
+
class: 'vxe-table-var-mini'
|
|
26313
|
+
})]), h('div', {
|
|
26259
26314
|
key: 'tw',
|
|
26260
26315
|
class: 'vxe-table--render-wrapper'
|
|
26261
26316
|
}, scrollbarXToTop ? [renderScrollX(h, $xeTable), renderBody(h, $xeTable)] : [renderBody(h, $xeTable), renderScrollX(h, $xeTable)]),
|
|
@@ -28931,12 +28986,17 @@ function getCellLabelVNs(h, renderOpts, params, cellLabel) {
|
|
|
28931
28986
|
* @param modelFunc
|
|
28932
28987
|
* @param changeFunc
|
|
28933
28988
|
*/
|
|
28934
|
-
function getNativeElementOns(renderOpts, params,
|
|
28989
|
+
function getNativeElementOns(renderOpts, params, eFns) {
|
|
28935
28990
|
const {
|
|
28936
28991
|
events
|
|
28937
28992
|
} = renderOpts;
|
|
28938
28993
|
const modelEvent = getModelEvent(renderOpts);
|
|
28939
28994
|
const changeEvent = getChangeEvent(renderOpts);
|
|
28995
|
+
const {
|
|
28996
|
+
model: modelFunc,
|
|
28997
|
+
change: changeFunc,
|
|
28998
|
+
blur: blurFunc
|
|
28999
|
+
} = eFns || {};
|
|
28940
29000
|
const isSameEvent = changeEvent === modelEvent;
|
|
28941
29001
|
const ons = {};
|
|
28942
29002
|
if (events) {
|
|
@@ -28958,15 +29018,24 @@ function getNativeElementOns(renderOpts, params, modelFunc, changeFunc) {
|
|
|
28958
29018
|
};
|
|
28959
29019
|
}
|
|
28960
29020
|
if (!isSameEvent && changeFunc) {
|
|
28961
|
-
ons[getOnName(changeEvent)] = function (
|
|
28962
|
-
changeFunc(
|
|
29021
|
+
ons[getOnName(changeEvent)] = function (evnt) {
|
|
29022
|
+
changeFunc(evnt);
|
|
28963
29023
|
if (events && events[changeEvent]) {
|
|
28964
|
-
events[changeEvent](params,
|
|
29024
|
+
events[changeEvent](params, evnt);
|
|
29025
|
+
}
|
|
29026
|
+
};
|
|
29027
|
+
}
|
|
29028
|
+
if (blurFunc) {
|
|
29029
|
+
ons[getOnName(blurEvent)] = function (evnt) {
|
|
29030
|
+
blurFunc(evnt);
|
|
29031
|
+
if (events && events[blurEvent]) {
|
|
29032
|
+
events[blurEvent](params, evnt);
|
|
28965
29033
|
}
|
|
28966
29034
|
};
|
|
28967
29035
|
}
|
|
28968
29036
|
return ons;
|
|
28969
29037
|
}
|
|
29038
|
+
const blurEvent = 'blur';
|
|
28970
29039
|
/**
|
|
28971
29040
|
* 组件事件处理
|
|
28972
29041
|
* @param renderOpts
|
|
@@ -28974,12 +29043,17 @@ function getNativeElementOns(renderOpts, params, modelFunc, changeFunc) {
|
|
|
28974
29043
|
* @param modelFunc
|
|
28975
29044
|
* @param changeFunc
|
|
28976
29045
|
*/
|
|
28977
|
-
function getComponentOns(renderOpts, params,
|
|
29046
|
+
function getComponentOns(renderOpts, params, eFns) {
|
|
28978
29047
|
const {
|
|
28979
29048
|
events
|
|
28980
29049
|
} = renderOpts;
|
|
28981
29050
|
const modelEvent = getModelEvent(renderOpts);
|
|
28982
29051
|
const changeEvent = getChangeEvent(renderOpts);
|
|
29052
|
+
const {
|
|
29053
|
+
model: modelFunc,
|
|
29054
|
+
change: changeFunc,
|
|
29055
|
+
blur: blurFunc
|
|
29056
|
+
} = eFns || {};
|
|
28983
29057
|
const ons = {};
|
|
28984
29058
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(events, (func, key) => {
|
|
28985
29059
|
ons[getOnName(key)] = function (...args) {
|
|
@@ -29007,6 +29081,14 @@ function getComponentOns(renderOpts, params, modelFunc, changeFunc) {
|
|
|
29007
29081
|
}
|
|
29008
29082
|
};
|
|
29009
29083
|
}
|
|
29084
|
+
if (blurFunc) {
|
|
29085
|
+
ons[getOnName(blurEvent)] = function (...args) {
|
|
29086
|
+
blurFunc(...args);
|
|
29087
|
+
if (events && events[blurEvent]) {
|
|
29088
|
+
events[blurEvent](params, ...args);
|
|
29089
|
+
}
|
|
29090
|
+
};
|
|
29091
|
+
}
|
|
29010
29092
|
return ons;
|
|
29011
29093
|
}
|
|
29012
29094
|
function getEditOns(renderOpts, params) {
|
|
@@ -29022,31 +29104,47 @@ function getEditOns(renderOpts, params) {
|
|
|
29022
29104
|
model
|
|
29023
29105
|
} = column;
|
|
29024
29106
|
const isImmediate = isImmediateCell(renderOpts, params);
|
|
29025
|
-
return getComponentOns(renderOpts, params,
|
|
29026
|
-
|
|
29027
|
-
|
|
29028
|
-
model.value = cellValue;
|
|
29029
|
-
if (isImmediate) {
|
|
29030
|
-
setCellValue(row, column, cellValue);
|
|
29031
|
-
}
|
|
29032
|
-
}, eventParams => {
|
|
29033
|
-
// 处理 change 事件相关逻辑
|
|
29034
|
-
if (!isImmediate && ['VxeInput', 'VxeNumberInput', 'VxeTextarea', '$input', '$textarea'].includes(name)) {
|
|
29035
|
-
const cellValue = eventParams.value;
|
|
29107
|
+
return getComponentOns(renderOpts, params, {
|
|
29108
|
+
model(cellValue) {
|
|
29109
|
+
// 处理 model 值双向绑定
|
|
29036
29110
|
model.update = true;
|
|
29037
29111
|
model.value = cellValue;
|
|
29038
|
-
|
|
29039
|
-
|
|
29040
|
-
|
|
29112
|
+
if (isImmediate) {
|
|
29113
|
+
setCellValue(row, column, cellValue);
|
|
29114
|
+
}
|
|
29115
|
+
},
|
|
29116
|
+
change(eventParams) {
|
|
29117
|
+
// 处理 change 事件相关逻辑
|
|
29118
|
+
if (!isImmediate && name && ['VxeInput', 'VxeNumberInput', 'VxeTextarea', '$input', '$textarea'].includes(name)) {
|
|
29119
|
+
const cellValue = eventParams.value;
|
|
29120
|
+
model.update = true;
|
|
29121
|
+
model.value = cellValue;
|
|
29122
|
+
$table.updateStatus(params, cellValue);
|
|
29123
|
+
} else {
|
|
29124
|
+
$table.updateStatus(params);
|
|
29125
|
+
}
|
|
29126
|
+
},
|
|
29127
|
+
blur() {
|
|
29128
|
+
if (isImmediate) {
|
|
29129
|
+
$table.handleCellRuleUpdateStatus('blur', params);
|
|
29130
|
+
} else {
|
|
29131
|
+
$table.handleCellRuleUpdateStatus('blur', params, model.value);
|
|
29132
|
+
}
|
|
29041
29133
|
}
|
|
29042
29134
|
});
|
|
29043
29135
|
}
|
|
29044
29136
|
function getFilterOns(renderOpts, params, option) {
|
|
29045
|
-
return getComponentOns(renderOpts, params,
|
|
29046
|
-
|
|
29047
|
-
|
|
29048
|
-
|
|
29049
|
-
|
|
29137
|
+
return getComponentOns(renderOpts, params, {
|
|
29138
|
+
model(value) {
|
|
29139
|
+
// 处理 model 值双向绑定
|
|
29140
|
+
option.data = value;
|
|
29141
|
+
},
|
|
29142
|
+
change() {
|
|
29143
|
+
handleConfirmFilter(params, !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(option.data), option);
|
|
29144
|
+
},
|
|
29145
|
+
blur() {
|
|
29146
|
+
handleConfirmFilter(params, !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(option.data), option);
|
|
29147
|
+
}
|
|
29050
29148
|
});
|
|
29051
29149
|
}
|
|
29052
29150
|
function getNativeEditOns(renderOpts, params) {
|
|
@@ -29058,27 +29156,52 @@ function getNativeEditOns(renderOpts, params) {
|
|
|
29058
29156
|
const {
|
|
29059
29157
|
model
|
|
29060
29158
|
} = column;
|
|
29061
|
-
return getNativeElementOns(renderOpts, params,
|
|
29062
|
-
|
|
29063
|
-
|
|
29064
|
-
|
|
29065
|
-
|
|
29066
|
-
|
|
29067
|
-
|
|
29068
|
-
|
|
29159
|
+
return getNativeElementOns(renderOpts, params, {
|
|
29160
|
+
model(evnt) {
|
|
29161
|
+
// 处理 model 值双向绑定
|
|
29162
|
+
const targetEl = evnt.target;
|
|
29163
|
+
if (targetEl) {
|
|
29164
|
+
const cellValue = targetEl.value;
|
|
29165
|
+
if (isImmediateCell(renderOpts, params)) {
|
|
29166
|
+
setCellValue(row, column, cellValue);
|
|
29167
|
+
} else {
|
|
29168
|
+
model.update = true;
|
|
29169
|
+
model.value = cellValue;
|
|
29170
|
+
}
|
|
29171
|
+
}
|
|
29172
|
+
},
|
|
29173
|
+
change(evnt) {
|
|
29174
|
+
// 处理 change 事件相关逻辑
|
|
29175
|
+
const targetEl = evnt.target;
|
|
29176
|
+
if (targetEl) {
|
|
29177
|
+
const cellValue = targetEl.value;
|
|
29178
|
+
$table.updateStatus(params, cellValue);
|
|
29179
|
+
}
|
|
29180
|
+
},
|
|
29181
|
+
blur(evnt) {
|
|
29182
|
+
const targetEl = evnt.target;
|
|
29183
|
+
if (targetEl) {
|
|
29184
|
+
const cellValue = targetEl.value;
|
|
29185
|
+
$table.updateStatus(params, cellValue);
|
|
29186
|
+
}
|
|
29069
29187
|
}
|
|
29070
|
-
}, evnt => {
|
|
29071
|
-
// 处理 change 事件相关逻辑
|
|
29072
|
-
const cellValue = evnt.target.value;
|
|
29073
|
-
$table.updateStatus(params, cellValue);
|
|
29074
29188
|
});
|
|
29075
29189
|
}
|
|
29076
29190
|
function getNativeFilterOns(renderOpts, params, option) {
|
|
29077
|
-
return getNativeElementOns(renderOpts, params,
|
|
29078
|
-
|
|
29079
|
-
|
|
29080
|
-
|
|
29081
|
-
|
|
29191
|
+
return getNativeElementOns(renderOpts, params, {
|
|
29192
|
+
model(evnt) {
|
|
29193
|
+
// 处理 model 值双向绑定
|
|
29194
|
+
const targetEl = evnt.target;
|
|
29195
|
+
if (targetEl) {
|
|
29196
|
+
option.data = targetEl.value;
|
|
29197
|
+
}
|
|
29198
|
+
},
|
|
29199
|
+
change() {
|
|
29200
|
+
handleConfirmFilter(params, !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(option.data), option);
|
|
29201
|
+
},
|
|
29202
|
+
blur() {
|
|
29203
|
+
handleConfirmFilter(params, !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(option.data), option);
|
|
29204
|
+
}
|
|
29082
29205
|
});
|
|
29083
29206
|
}
|
|
29084
29207
|
/**
|