vxe-table 3.13.14 → 3.14.0-beta.0
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 +41 -31
- package/es/locale/lang/ar-EG.js +1 -0
- package/es/locale/lang/de-DE.js +1 -0
- package/es/locale/lang/en-US.js +3 -2
- package/es/locale/lang/es-ES.js +1 -0
- package/es/locale/lang/fr-FR.js +1 -0
- package/es/locale/lang/hu-HU.js +1 -0
- package/es/locale/lang/hy-AM.js +1 -0
- package/es/locale/lang/id-ID.js +1 -0
- package/es/locale/lang/it-IT.js +1 -0
- package/es/locale/lang/ja-JP.js +1 -0
- package/es/locale/lang/ko-KR.js +1 -0
- package/es/locale/lang/nb-NO.js +1 -0
- package/es/locale/lang/pt-BR.js +1 -0
- package/es/locale/lang/ru-RU.js +1 -0
- package/es/locale/lang/th-TH.js +1 -0
- package/es/locale/lang/ug-CN.js +1 -0
- package/es/locale/lang/uk-UA.js +1 -0
- package/es/locale/lang/vi-VN.js +1 -0
- package/es/locale/lang/zh-CHT.js +1 -0
- package/es/locale/lang/zh-CN.js +1 -0
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +18 -16
- package/es/table/module/edit/mixin.js +3 -1
- package/es/table/src/cell.js +2 -1
- package/es/table/src/methods.js +297 -178
- package/es/table/src/table.js +170 -165
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +41 -32
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +1743 -2683
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +1 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +1 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +3 -2
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +3 -2
- package/lib/locale/lang/es-ES.js +1 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +1 -0
- package/lib/locale/lang/fr-FR.js +1 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +1 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +1 -0
- package/lib/locale/lang/hy-AM.js +1 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/id-ID.js +1 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/it-IT.js +1 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +1 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -0
- package/lib/locale/lang/ko-KR.js +1 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +1 -0
- package/lib/locale/lang/nb-NO.js +1 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +1 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +1 -0
- package/lib/locale/lang/ru-RU.js +1 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +1 -0
- package/lib/locale/lang/th-TH.js +1 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +1 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +1 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +1 -0
- package/lib/locale/lang/vi-VN.js +1 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +1 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +1 -0
- package/lib/locale/lang/zh-CN.js +1 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -0
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +18 -16
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +3 -1
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/src/cell.js +2 -1
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +312 -184
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +179 -180
- 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 +2 -2
- package/packages/grid/src/grid.ts +41 -31
- package/packages/locale/lang/ar-EG.ts +1 -0
- package/packages/locale/lang/de-DE.ts +1 -0
- package/packages/locale/lang/en-US.ts +3 -2
- package/packages/locale/lang/es-ES.ts +1 -0
- package/packages/locale/lang/fr-FR.ts +1 -0
- package/packages/locale/lang/hu-HU.ts +1 -0
- package/packages/locale/lang/hy-AM.ts +1 -0
- package/packages/locale/lang/id-ID.ts +1 -0
- package/packages/locale/lang/it-IT.ts +1 -0
- package/packages/locale/lang/ja-JP.ts +1 -0
- package/packages/locale/lang/ko-KR.ts +1 -0
- package/packages/locale/lang/nb-NO.ts +1 -0
- package/packages/locale/lang/pt-BR.ts +1 -0
- package/packages/locale/lang/ru-RU.ts +1 -0
- package/packages/locale/lang/th-TH.ts +1 -0
- package/packages/locale/lang/ug-CN.ts +1 -0
- package/packages/locale/lang/uk-UA.ts +1 -0
- package/packages/locale/lang/vi-VN.ts +1 -0
- package/packages/locale/lang/zh-CHT.ts +1 -0
- package/packages/locale/lang/zh-CN.ts +1 -0
- package/packages/table/module/custom/panel.ts +22 -20
- package/packages/table/module/edit/mixin.ts +3 -1
- package/packages/table/src/cell.ts +2 -1
- package/packages/table/src/methods.ts +308 -182
- package/packages/table/src/table.ts +172 -165
- /package/es/{iconfont.1740640529071.ttf → iconfont.1740732119954.ttf} +0 -0
- /package/es/{iconfont.1740640529071.woff → iconfont.1740732119954.woff} +0 -0
- /package/es/{iconfont.1740640529071.woff2 → iconfont.1740732119954.woff2} +0 -0
- /package/lib/{iconfont.1740640529071.ttf → iconfont.1740732119954.ttf} +0 -0
- /package/lib/{iconfont.1740640529071.woff → iconfont.1740732119954.woff} +0 -0
- /package/lib/{iconfont.1740640529071.woff2 → iconfont.1740732119954.woff2} +0 -0
package/es/table/src/table.js
CHANGED
|
@@ -1216,7 +1216,9 @@ export default {
|
|
|
1216
1216
|
},
|
|
1217
1217
|
created() {
|
|
1218
1218
|
const $xeTable = this;
|
|
1219
|
-
const
|
|
1219
|
+
const props = $xeTable;
|
|
1220
|
+
const internalData = $xeTable;
|
|
1221
|
+
Object.assign($xeTable, {
|
|
1220
1222
|
tZindex: 0,
|
|
1221
1223
|
elemStore: {},
|
|
1222
1224
|
// 存放横向 X 虚拟滚动相关的信息
|
|
@@ -1282,162 +1284,164 @@ export default {
|
|
|
1282
1284
|
swYInterval: 0,
|
|
1283
1285
|
swYTotal: 0
|
|
1284
1286
|
});
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
}
|
|
1301
|
-
if (treeConfig && (treeOpts.showLine || treeOpts.line) && (!(this.rowKey || rowOpts.useKey) || !showOverflow)) {
|
|
1302
|
-
warnLog('vxe.error.reqProp', ['row-config.useKey | show-overflow']);
|
|
1303
|
-
}
|
|
1304
|
-
if (treeConfig && !treeOpts.transform && this.stripe) {
|
|
1305
|
-
warnLog('vxe.error.noTree', ['stripe']);
|
|
1306
|
-
}
|
|
1307
|
-
if (this.showFooter && !(this.footerMethod || this.footerData)) {
|
|
1308
|
-
warnLog('vxe.error.reqProp', ['footer-data | footer-method']);
|
|
1309
|
-
}
|
|
1310
|
-
if (rowOpts.height) {
|
|
1311
|
-
warnLog('vxe.error.delProp', ['row-config.height', 'cell-config.height']);
|
|
1312
|
-
}
|
|
1313
|
-
if (this.tooltipOpts.enabled) {
|
|
1314
|
-
warnLog('vxe.error.delProp', ['tooltip-config.enabled', 'tooltip-config.showAll']);
|
|
1315
|
-
}
|
|
1316
|
-
// if (this.highlightCurrentRow) {
|
|
1317
|
-
// warnLog('vxe.error.delProp', ['highlight-current-row', 'row-config.isCurrent'])
|
|
1318
|
-
// }
|
|
1319
|
-
// if (this.highlightHoverRow) {
|
|
1320
|
-
// warnLog('vxe.error.delProp', ['highlight-hover-row', 'row-config.isHover'])
|
|
1321
|
-
// }
|
|
1322
|
-
// if (this.highlightCurrentColumn) {
|
|
1323
|
-
// warnLog('vxe.error.delProp', ['highlight-current-column', 'column-config.isCurrent'])
|
|
1324
|
-
// }
|
|
1325
|
-
// if (this.highlightHoverColumn) {
|
|
1326
|
-
// warnLog('vxe.error.delProp', ['highlight-hover-column', 'column-config.isHover'])
|
|
1327
|
-
// }
|
|
1328
|
-
// 检查导入导出类型,如果自定义导入导出方法,则不校验类型
|
|
1329
|
-
const { exportConfig, exportOpts, importConfig, importOpts } = this;
|
|
1330
|
-
if (importConfig && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
1331
|
-
warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(importOpts._typeMaps), type)).join(',') || XEUtils.keys(importOpts._typeMaps).join(',')]);
|
|
1332
|
-
}
|
|
1333
|
-
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
1334
|
-
warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)).join(',') || XEUtils.keys(exportOpts._typeMaps).join(',')]);
|
|
1335
|
-
}
|
|
1287
|
+
const { data, exportConfig, importConfig, treeConfig, showOverflow } = props;
|
|
1288
|
+
const { scrollXStore, scrollYStore } = internalData;
|
|
1289
|
+
const sYOpts = $xeTable.computeSYOpts;
|
|
1290
|
+
const editOpts = $xeTable.computeEditOpts;
|
|
1291
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
1292
|
+
const radioOpts = $xeTable.computeRadioOpts;
|
|
1293
|
+
const checkboxOpts = $xeTable.computeCheckboxOpts;
|
|
1294
|
+
const expandOpts = $xeTable.computeExpandOpts;
|
|
1295
|
+
const rowOpts = $xeTable.computeRowOpts;
|
|
1296
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
1297
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
1298
|
+
const exportOpts = $xeTable.computeExportOpts;
|
|
1299
|
+
const importOpts = $xeTable.computeImportOpts;
|
|
1300
|
+
if (props.rowId) {
|
|
1301
|
+
warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField']);
|
|
1336
1302
|
}
|
|
1337
|
-
if (
|
|
1338
|
-
|
|
1339
|
-
if (!this.id) {
|
|
1340
|
-
if ((this.customConfig ? isEnableConf(customOpts) : customOpts.enabled) && customOpts.storage) {
|
|
1341
|
-
errLog('vxe.error.reqProp', ['id']);
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
if (this.treeConfig && this.checkboxOpts.range) {
|
|
1345
|
-
errLog('vxe.error.noTree', ['checkbox-config.range']);
|
|
1346
|
-
}
|
|
1347
|
-
if (this.rowOpts.height && !this.showOverflow) {
|
|
1348
|
-
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
1349
|
-
}
|
|
1350
|
-
if (!this.handleMousedownCellAreaEvent) {
|
|
1351
|
-
if (this.areaConfig) {
|
|
1352
|
-
warnLog('vxe.error.notProp', ['area-config']);
|
|
1353
|
-
}
|
|
1354
|
-
if (this.clipConfig) {
|
|
1355
|
-
warnLog('vxe.error.notProp', ['clip-config']);
|
|
1356
|
-
}
|
|
1357
|
-
if (this.fnrConfig) {
|
|
1358
|
-
warnLog('vxe.error.notProp', ['fnr-config']);
|
|
1359
|
-
}
|
|
1360
|
-
if (this.mouseOpts.area) {
|
|
1361
|
-
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
1362
|
-
return;
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
|
-
if (this.dragConfig) {
|
|
1366
|
-
warnLog('vxe.error.delProp', ['drag-config', 'row-drag-config']);
|
|
1367
|
-
}
|
|
1368
|
-
if (this.treeConfig && treeOpts.children) {
|
|
1369
|
-
warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField']);
|
|
1370
|
-
}
|
|
1371
|
-
if (this.treeConfig && treeOpts.line) {
|
|
1372
|
-
warnLog('vxe.error.delProp', ['tree-config.line', 'tree-config.showLine']);
|
|
1373
|
-
}
|
|
1374
|
-
if (this.mouseOpts.area && this.mouseOpts.selected) {
|
|
1375
|
-
warnLog('vxe.error.errConflicts', ['mouse-config.area', 'mouse-config.selected']);
|
|
1376
|
-
}
|
|
1377
|
-
// if (this.mouseOpts.area && this.checkboxOpts.range) {
|
|
1378
|
-
// warnLog('vxe.error.errConflicts', ['mouse-config.area', 'checkbox-config.range'])
|
|
1379
|
-
// }
|
|
1380
|
-
if (this.mouseOpts.area && (this.treeConfig && !treeOpts.transform)) {
|
|
1381
|
-
errLog('vxe.error.noTree', ['mouse-config.area']);
|
|
1382
|
-
}
|
|
1303
|
+
if (props.rowKey) {
|
|
1304
|
+
warnLog('vxe.error.delProp', ['row-key', 'row-config.useKey']);
|
|
1383
1305
|
}
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1306
|
+
if (props.columnKey) {
|
|
1307
|
+
warnLog('vxe.error.delProp', ['column-id', 'column-config.useKey']);
|
|
1308
|
+
}
|
|
1309
|
+
if (!(props.rowId || rowOpts.keyField) && (checkboxOpts.reserve || checkboxOpts.checkRowKeys || radioOpts.reserve || radioOpts.checkRowKey || expandOpts.expandRowKeys || treeOpts.expandRowKeys)) {
|
|
1310
|
+
warnLog('vxe.error.reqProp', ['row-config.keyField']);
|
|
1311
|
+
}
|
|
1312
|
+
if (props.editConfig && editOpts.showStatus && !props.keepSource) {
|
|
1313
|
+
warnLog('vxe.error.reqProp', ['keep-source']);
|
|
1314
|
+
}
|
|
1315
|
+
if (treeConfig && (treeOpts.showLine || treeOpts.line) && (!(props.rowKey || rowOpts.useKey) || !showOverflow)) {
|
|
1316
|
+
warnLog('vxe.error.reqProp', ['row-config.useKey | show-overflow']);
|
|
1317
|
+
}
|
|
1318
|
+
if (treeConfig && !treeOpts.transform && props.stripe) {
|
|
1319
|
+
warnLog('vxe.error.noTree', ['stripe']);
|
|
1320
|
+
}
|
|
1321
|
+
if (props.showFooter && !(props.footerMethod || props.footerData)) {
|
|
1322
|
+
warnLog('vxe.error.reqProp', ['footer-data | footer-method']);
|
|
1323
|
+
}
|
|
1324
|
+
if (rowOpts.height) {
|
|
1325
|
+
warnLog('vxe.error.delProp', ['row-config.height', 'cell-config.height']);
|
|
1326
|
+
}
|
|
1327
|
+
if (this.tooltipOpts.enabled) {
|
|
1328
|
+
warnLog('vxe.error.delProp', ['tooltip-config.enabled', 'tooltip-config.showAll']);
|
|
1329
|
+
}
|
|
1330
|
+
if (this.highlightCurrentRow) {
|
|
1331
|
+
warnLog('vxe.error.delProp', ['highlight-current-row', 'row-config.isCurrent']);
|
|
1332
|
+
}
|
|
1333
|
+
if (this.highlightHoverRow) {
|
|
1334
|
+
warnLog('vxe.error.delProp', ['highlight-hover-row', 'row-config.isHover']);
|
|
1335
|
+
}
|
|
1336
|
+
if (this.highlightCurrentColumn) {
|
|
1337
|
+
warnLog('vxe.error.delProp', ['highlight-current-column', 'column-config.isCurrent']);
|
|
1338
|
+
}
|
|
1339
|
+
if (this.highlightHoverColumn) {
|
|
1340
|
+
warnLog('vxe.error.delProp', ['highlight-hover-column', 'column-config.isHover']);
|
|
1341
|
+
}
|
|
1342
|
+
// 检查导入导出类型,如果自定义导入导出方法,则不校验类型
|
|
1343
|
+
if (importConfig && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
1344
|
+
warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(importOpts._typeMaps), type)).join(',') || XEUtils.keys(importOpts._typeMaps).join(',')]);
|
|
1345
|
+
}
|
|
1346
|
+
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
1347
|
+
warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)).join(',') || XEUtils.keys(exportOpts._typeMaps).join(',')]);
|
|
1348
|
+
}
|
|
1349
|
+
if (!props.id) {
|
|
1350
|
+
if ((props.customConfig ? isEnableConf(customOpts) : customOpts.enabled) && customOpts.storage) {
|
|
1351
|
+
errLog('vxe.error.reqProp', ['id']);
|
|
1410
1352
|
}
|
|
1411
|
-
|
|
1412
|
-
|
|
1353
|
+
}
|
|
1354
|
+
if (treeConfig && checkboxOpts.range) {
|
|
1355
|
+
errLog('vxe.error.noTree', ['checkbox-config.range']);
|
|
1356
|
+
}
|
|
1357
|
+
if (rowOpts.height && !this.showOverflow) {
|
|
1358
|
+
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
1359
|
+
}
|
|
1360
|
+
if (!$xeTable.handleMousedownCellAreaEvent) {
|
|
1361
|
+
if (props.areaConfig) {
|
|
1362
|
+
warnLog('vxe.error.notProp', ['area-config']);
|
|
1413
1363
|
}
|
|
1414
|
-
if (
|
|
1415
|
-
warnLog('vxe.error.
|
|
1364
|
+
if (props.clipConfig) {
|
|
1365
|
+
warnLog('vxe.error.notProp', ['clip-config']);
|
|
1416
1366
|
}
|
|
1417
|
-
if (
|
|
1418
|
-
warnLog('vxe.error.
|
|
1367
|
+
if (props.fnrConfig) {
|
|
1368
|
+
warnLog('vxe.error.notProp', ['fnr-config']);
|
|
1419
1369
|
}
|
|
1420
|
-
if (
|
|
1421
|
-
errLog('vxe.error.
|
|
1370
|
+
if (mouseOpts.area) {
|
|
1371
|
+
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
1372
|
+
return;
|
|
1422
1373
|
}
|
|
1423
|
-
|
|
1424
|
-
|
|
1374
|
+
}
|
|
1375
|
+
if (treeConfig && rowOpts.drag && !treeOpts.transform) {
|
|
1376
|
+
warnLog('vxe.error.notSupportProp', ['column-config.drag', 'tree-config.transform=false', 'tree-config.transform=true']);
|
|
1377
|
+
}
|
|
1378
|
+
if (props.dragConfig) {
|
|
1379
|
+
warnLog('vxe.error.delProp', ['drag-config', 'row-drag-config']);
|
|
1380
|
+
}
|
|
1381
|
+
if (props.treeConfig && treeOpts.children) {
|
|
1382
|
+
warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField']);
|
|
1383
|
+
}
|
|
1384
|
+
if (props.treeConfig && treeOpts.line) {
|
|
1385
|
+
warnLog('vxe.error.delProp', ['tree-config.line', 'tree-config.showLine']);
|
|
1386
|
+
}
|
|
1387
|
+
if (mouseOpts.area && mouseOpts.selected) {
|
|
1388
|
+
warnLog('vxe.error.errConflicts', ['mouse-config.area', 'mouse-config.selected']);
|
|
1389
|
+
}
|
|
1390
|
+
if (mouseOpts.area && (props.treeConfig && !treeOpts.transform)) {
|
|
1391
|
+
errLog('vxe.error.noTree', ['mouse-config.area']);
|
|
1392
|
+
}
|
|
1393
|
+
if (props.editConfig && editOpts.activeMethod) {
|
|
1394
|
+
warnLog('vxe.error.delProp', ['table.edit-config.activeMethod', 'table.edit-config.beforeEditMethod']);
|
|
1395
|
+
}
|
|
1396
|
+
if (props.treeConfig && checkboxOpts.isShiftKey) {
|
|
1397
|
+
errLog('vxe.error.errConflicts', ['tree-config', 'checkbox-config.isShiftKey']);
|
|
1398
|
+
}
|
|
1399
|
+
if (checkboxOpts.halfField) {
|
|
1400
|
+
warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField']);
|
|
1401
|
+
}
|
|
1402
|
+
// 在 v3.0 中废弃 context-menu
|
|
1403
|
+
if (this.contextMenu) {
|
|
1404
|
+
warnLog('vxe.error.delProp', ['context-menu', 'menu-config']);
|
|
1405
|
+
if (!XEUtils.isObject(this.contextMenu)) {
|
|
1406
|
+
warnLog('vxe.error.errProp', [`table.context-menu=${this.contextMenu}`, 'table.context-menu={}']);
|
|
1425
1407
|
}
|
|
1426
1408
|
}
|
|
1409
|
+
if (this.menuConfig && !XEUtils.isObject(this.menuConfig)) {
|
|
1410
|
+
warnLog('vxe.error.errProp', [`table.menu-config=${this.menuConfig}`, 'table.menu-config={}']);
|
|
1411
|
+
}
|
|
1412
|
+
if (this.exportConfig && !XEUtils.isObject(this.exportConfig)) {
|
|
1413
|
+
warnLog('vxe.error.errProp', [`table.export-config=${this.exportConfig}`, 'table.export-config={}']);
|
|
1414
|
+
}
|
|
1415
|
+
if (this.importConfig && !XEUtils.isObject(this.importConfig)) {
|
|
1416
|
+
warnLog('vxe.error.errProp', [`table.import-config=${this.importConfig}`, 'table.import-config={}']);
|
|
1417
|
+
}
|
|
1418
|
+
if (this.printConfig && !XEUtils.isObject(this.printConfig)) {
|
|
1419
|
+
warnLog('vxe.error.errProp', [`table.print-config=${this.printConfig}`, 'table.print-config={}']);
|
|
1420
|
+
}
|
|
1421
|
+
if (this.treeConfig && !XEUtils.isObject(this.treeConfig)) {
|
|
1422
|
+
warnLog('vxe.error.errProp', [`table.tree-config=${this.treeConfig}`, 'table.tree-config={}']);
|
|
1423
|
+
}
|
|
1424
|
+
if (this.customConfig && !XEUtils.isObject(this.customConfig)) {
|
|
1425
|
+
warnLog('vxe.error.errProp', [`table.custom-config=${this.customConfig}`, 'table.custom-config={}']);
|
|
1426
|
+
}
|
|
1427
|
+
if (this.editConfig && !XEUtils.isObject(this.editConfig)) {
|
|
1428
|
+
warnLog('vxe.error.errProp', [`table.edit-config=${this.editConfig}`, 'table.edit-config={}']);
|
|
1429
|
+
}
|
|
1430
|
+
if (this.emptyRender && !XEUtils.isObject(this.emptyRender)) {
|
|
1431
|
+
warnLog('vxe.error.errProp', [`table.empty-render=${this.emptyRender}`, 'table.empty-render={}']);
|
|
1432
|
+
}
|
|
1427
1433
|
// 检查是否有安装需要的模块
|
|
1428
|
-
if (
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
errLog('vxe.error.reqModule', ['Export']);
|
|
1440
|
-
}
|
|
1434
|
+
if (props.editConfig && !$xeTable.insert) {
|
|
1435
|
+
errLog('vxe.error.reqModule', ['Edit']);
|
|
1436
|
+
}
|
|
1437
|
+
if (props.editRules && !$xeTable.validate) {
|
|
1438
|
+
errLog('vxe.error.reqModule', ['Validator']);
|
|
1439
|
+
}
|
|
1440
|
+
if ((checkboxOpts.range || props.keyboardConfig || props.mouseConfig) && !$xeTable.handleCellMousedownEvent) {
|
|
1441
|
+
errLog('vxe.error.reqModule', ['Keyboard']);
|
|
1442
|
+
}
|
|
1443
|
+
if ((props.printConfig || props.importConfig || props.exportConfig) && !$xeTable.exportData) {
|
|
1444
|
+
errLog('vxe.error.reqModule', ['Export']);
|
|
1441
1445
|
}
|
|
1442
1446
|
Object.assign(scrollYStore, {
|
|
1443
1447
|
startIndex: 0,
|
|
@@ -1459,15 +1463,15 @@ export default {
|
|
|
1459
1463
|
this.handleInitDefaults();
|
|
1460
1464
|
this.updateStyle();
|
|
1461
1465
|
});
|
|
1462
|
-
globalEvents.on(
|
|
1463
|
-
globalEvents.on(
|
|
1464
|
-
globalEvents.on(
|
|
1465
|
-
globalEvents.on(
|
|
1466
|
-
globalEvents.on(
|
|
1467
|
-
globalEvents.on(
|
|
1468
|
-
globalEvents.on(
|
|
1469
|
-
globalEvents.on(
|
|
1470
|
-
globalEvents.on(
|
|
1466
|
+
globalEvents.on($xeTable, 'paste', this.handleGlobalPasteEvent);
|
|
1467
|
+
globalEvents.on($xeTable, 'copy', this.handleGlobalCopyEvent);
|
|
1468
|
+
globalEvents.on($xeTable, 'cut', this.handleGlobalCutEvent);
|
|
1469
|
+
globalEvents.on($xeTable, 'mousedown', this.handleGlobalMousedownEvent);
|
|
1470
|
+
globalEvents.on($xeTable, 'blur', this.handleGlobalBlurEvent);
|
|
1471
|
+
globalEvents.on($xeTable, 'mousewheel', this.handleGlobalMousewheelEvent);
|
|
1472
|
+
globalEvents.on($xeTable, 'keydown', this.handleGlobalKeydownEvent);
|
|
1473
|
+
globalEvents.on($xeTable, 'resize', this.handleGlobalResizeEvent);
|
|
1474
|
+
globalEvents.on($xeTable, 'contextmenu', this.handleGlobalContextmenuEvent);
|
|
1471
1475
|
$xeTable.preventEvent(null, 'created');
|
|
1472
1476
|
},
|
|
1473
1477
|
mounted() {
|
|
@@ -1545,15 +1549,16 @@ export default {
|
|
|
1545
1549
|
this.preventEvent(null, 'beforeDestroy');
|
|
1546
1550
|
},
|
|
1547
1551
|
destroyed() {
|
|
1548
|
-
|
|
1549
|
-
globalEvents.off(
|
|
1550
|
-
globalEvents.off(
|
|
1551
|
-
globalEvents.off(
|
|
1552
|
-
globalEvents.off(
|
|
1553
|
-
globalEvents.off(
|
|
1554
|
-
globalEvents.off(
|
|
1555
|
-
globalEvents.off(
|
|
1556
|
-
globalEvents.off(
|
|
1552
|
+
const $xeTable = this;
|
|
1553
|
+
globalEvents.off($xeTable, 'paste');
|
|
1554
|
+
globalEvents.off($xeTable, 'copy');
|
|
1555
|
+
globalEvents.off($xeTable, 'cut');
|
|
1556
|
+
globalEvents.off($xeTable, 'mousedown');
|
|
1557
|
+
globalEvents.off($xeTable, 'blur');
|
|
1558
|
+
globalEvents.off($xeTable, 'mousewheel');
|
|
1559
|
+
globalEvents.off($xeTable, 'keydown');
|
|
1560
|
+
globalEvents.off($xeTable, 'resize');
|
|
1561
|
+
globalEvents.off($xeTable, 'contextmenu');
|
|
1557
1562
|
this.preventEvent(null, 'destroyed');
|
|
1558
1563
|
},
|
|
1559
1564
|
render(h) {
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/grid/src/grid.js
CHANGED
|
@@ -503,7 +503,7 @@ var _default = exports.default = {
|
|
|
503
503
|
});
|
|
504
504
|
return rest;
|
|
505
505
|
},
|
|
506
|
-
|
|
506
|
+
computeTableProps() {
|
|
507
507
|
const {
|
|
508
508
|
isZMax,
|
|
509
509
|
seqConfig,
|
|
@@ -514,30 +514,31 @@ var _default = exports.default = {
|
|
|
514
514
|
proxyOpts,
|
|
515
515
|
tableExtendProps,
|
|
516
516
|
tableLoading,
|
|
517
|
-
tablePage
|
|
518
|
-
tableData
|
|
517
|
+
tablePage
|
|
519
518
|
} = this;
|
|
520
|
-
const
|
|
519
|
+
const tProps = Object.assign({}, tableExtendProps);
|
|
521
520
|
if (isZMax) {
|
|
522
521
|
if (tableExtendProps.maxHeight) {
|
|
523
|
-
|
|
522
|
+
tProps.maxHeight = '100%';
|
|
524
523
|
} else {
|
|
525
|
-
|
|
524
|
+
tProps.height = '100%';
|
|
526
525
|
}
|
|
527
526
|
}
|
|
528
527
|
if (proxyConfig) {
|
|
529
|
-
|
|
530
|
-
tableProps.data = tableData;
|
|
528
|
+
tProps.loading = loading || tableLoading;
|
|
531
529
|
if (proxyOpts.seq && (0, _utils.isEnableConf)(pagerConfig)) {
|
|
532
|
-
|
|
530
|
+
tProps.seqConfig = Object.assign({}, seqConfig, {
|
|
533
531
|
startIndex: (tablePage.currentPage - 1) * tablePage.pageSize
|
|
534
532
|
});
|
|
535
533
|
}
|
|
536
534
|
}
|
|
537
535
|
if (editConfig) {
|
|
538
|
-
|
|
536
|
+
tProps.editConfig = Object.assign({}, editConfig);
|
|
539
537
|
}
|
|
540
|
-
return
|
|
538
|
+
return tProps;
|
|
539
|
+
},
|
|
540
|
+
tableProps() {
|
|
541
|
+
return this.computeTableProps;
|
|
541
542
|
},
|
|
542
543
|
computeCurrLayoutConf() {
|
|
543
544
|
const $xeGrid = this;
|
|
@@ -815,7 +816,7 @@ var _default = exports.default = {
|
|
|
815
816
|
ajax = {}
|
|
816
817
|
} = proxyOpts;
|
|
817
818
|
const resConfigs = proxyOpts.response || proxyOpts.props || {};
|
|
818
|
-
const $
|
|
819
|
+
const $xeTable = $refs.xTable;
|
|
819
820
|
const formData = this.getFormData();
|
|
820
821
|
let button;
|
|
821
822
|
let code;
|
|
@@ -886,10 +887,10 @@ var _default = exports.default = {
|
|
|
886
887
|
}
|
|
887
888
|
if (isInited) {
|
|
888
889
|
let defaultSort = null;
|
|
889
|
-
if ($
|
|
890
|
+
if ($xeTable) {
|
|
890
891
|
const {
|
|
891
892
|
sortOpts
|
|
892
|
-
} = $
|
|
893
|
+
} = $xeTable;
|
|
893
894
|
defaultSort = sortOpts.defaultSort;
|
|
894
895
|
}
|
|
895
896
|
// 如果使用默认排序
|
|
@@ -905,16 +906,16 @@ var _default = exports.default = {
|
|
|
905
906
|
};
|
|
906
907
|
});
|
|
907
908
|
}
|
|
908
|
-
if ($
|
|
909
|
-
filterList = $
|
|
909
|
+
if ($xeTable) {
|
|
910
|
+
filterList = $xeTable.getCheckedFilters();
|
|
910
911
|
}
|
|
911
912
|
} else {
|
|
912
|
-
if ($
|
|
913
|
+
if ($xeTable) {
|
|
913
914
|
if (isReload) {
|
|
914
|
-
$
|
|
915
|
+
$xeTable.clearAll();
|
|
915
916
|
} else {
|
|
916
|
-
sortList = $
|
|
917
|
-
filterList = $
|
|
917
|
+
sortList = $xeTable.getSortColumns();
|
|
918
|
+
filterList = $xeTable.getCheckedFilters();
|
|
918
919
|
}
|
|
919
920
|
}
|
|
920
921
|
}
|
|
@@ -936,6 +937,7 @@ var _default = exports.default = {
|
|
|
936
937
|
this.tableLoading = true;
|
|
937
938
|
const applyArgs = [commitParams].concat(args);
|
|
938
939
|
return Promise.resolve((beforeQuery || ajaxMethods)(...applyArgs)).then(rest => {
|
|
940
|
+
let tableData = [];
|
|
939
941
|
this.tableLoading = false;
|
|
940
942
|
if (rest) {
|
|
941
943
|
if (pagerConfig && (0, _utils.isEnableConf)(pagerOpts)) {
|
|
@@ -946,7 +948,7 @@ var _default = exports.default = {
|
|
|
946
948
|
}) : _xeUtils.default.get(rest, totalProp || 'page.total')) || 0;
|
|
947
949
|
tablePage.total = _xeUtils.default.toNumber(total);
|
|
948
950
|
const resultProp = resConfigs.result;
|
|
949
|
-
|
|
951
|
+
tableData = (_xeUtils.default.isFunction(resultProp) ? resultProp({
|
|
950
952
|
data: rest,
|
|
951
953
|
$grid: this
|
|
952
954
|
}) : _xeUtils.default.get(rest, resultProp || 'result')) || [];
|
|
@@ -957,13 +959,20 @@ var _default = exports.default = {
|
|
|
957
959
|
}
|
|
958
960
|
} else {
|
|
959
961
|
const listProp = resConfigs.list;
|
|
960
|
-
|
|
962
|
+
tableData = (listProp ? _xeUtils.default.isFunction(listProp) ? listProp({
|
|
961
963
|
data: rest,
|
|
962
964
|
$grid: this
|
|
963
965
|
}) : _xeUtils.default.get(rest, listProp) : rest) || [];
|
|
964
966
|
}
|
|
967
|
+
}
|
|
968
|
+
if ($xeTable) {
|
|
969
|
+
$xeTable.loadData(tableData);
|
|
965
970
|
} else {
|
|
966
|
-
|
|
971
|
+
$xeTable.$nextTick(() => {
|
|
972
|
+
if ($xeTable) {
|
|
973
|
+
$xeTable.loadData(tableData);
|
|
974
|
+
}
|
|
975
|
+
});
|
|
967
976
|
}
|
|
968
977
|
if (afterQuery) {
|
|
969
978
|
afterQuery(...applyArgs);
|
|
@@ -1000,8 +1009,8 @@ var _default = exports.default = {
|
|
|
1000
1009
|
const deleteSuccessMethods = ajax.deleteSuccess;
|
|
1001
1010
|
const deleteErrorMethods = ajax.deleteError;
|
|
1002
1011
|
if (ajaxMethods) {
|
|
1003
|
-
const selectRecords = $
|
|
1004
|
-
const removeRecords = selectRecords.filter(row => !$
|
|
1012
|
+
const selectRecords = $xeTable.getCheckboxRecords();
|
|
1013
|
+
const removeRecords = selectRecords.filter(row => !$xeTable.isInsertByRow(row));
|
|
1005
1014
|
const body = {
|
|
1006
1015
|
removeRecords
|
|
1007
1016
|
};
|
|
@@ -1017,12 +1026,12 @@ var _default = exports.default = {
|
|
|
1017
1026
|
if (selectRecords.length) {
|
|
1018
1027
|
return this.handleDeleteRow(code, 'vxe.grid.deleteSelectRecord', () => {
|
|
1019
1028
|
if (!removeRecords.length) {
|
|
1020
|
-
return $
|
|
1029
|
+
return $xeTable.remove(selectRecords);
|
|
1021
1030
|
}
|
|
1022
1031
|
this.tableLoading = true;
|
|
1023
1032
|
return Promise.resolve((beforeDelete || ajaxMethods)(...applyArgs)).then(rest => {
|
|
1024
1033
|
this.tableLoading = false;
|
|
1025
|
-
$
|
|
1034
|
+
$xeTable.setPendingRow(removeRecords, false);
|
|
1026
1035
|
if (isRespMsg) {
|
|
1027
1036
|
// 检测弹窗模块
|
|
1028
1037
|
if (process.env.NODE_ENV === 'development') {
|
|
@@ -1139,7 +1148,7 @@ var _default = exports.default = {
|
|
|
1139
1148
|
this.tableLoading = true;
|
|
1140
1149
|
return Promise.resolve((beforeSave || ajaxMethods)(...applyArgs)).then(rest => {
|
|
1141
1150
|
this.tableLoading = false;
|
|
1142
|
-
$
|
|
1151
|
+
$xeTable.clearPendingRow();
|
|
1143
1152
|
if (isRespMsg) {
|
|
1144
1153
|
// 检测弹窗模块
|
|
1145
1154
|
if (process.env.NODE_ENV === 'development') {
|
|
@@ -1221,7 +1230,7 @@ var _default = exports.default = {
|
|
|
1221
1230
|
code,
|
|
1222
1231
|
button,
|
|
1223
1232
|
$grid: this,
|
|
1224
|
-
$table: $
|
|
1233
|
+
$table: $xeTable
|
|
1225
1234
|
}, ...args);
|
|
1226
1235
|
} else {
|
|
1227
1236
|
if (process.env.NODE_ENV === 'development') {
|
|
@@ -1515,16 +1524,16 @@ var _default = exports.default = {
|
|
|
1515
1524
|
sortData,
|
|
1516
1525
|
proxyConfig
|
|
1517
1526
|
} = this;
|
|
1518
|
-
const $
|
|
1527
|
+
const $xeTable = $refs.xTable;
|
|
1519
1528
|
if (proxyConfig) {
|
|
1520
1529
|
return {
|
|
1521
|
-
data:
|
|
1530
|
+
data: $xeTable ? $xeTable.getFullData() : [],
|
|
1522
1531
|
filter: this.filterData,
|
|
1523
1532
|
form: this.getFormData(),
|
|
1524
1533
|
sort: sortData.length ? sortData[0] : {},
|
|
1525
1534
|
sorts: sortData,
|
|
1526
1535
|
pager: this.tablePage,
|
|
1527
|
-
pendingRecords: $
|
|
1536
|
+
pendingRecords: $xeTable ? $xeTable.getPendingRecords() : []
|
|
1528
1537
|
};
|
|
1529
1538
|
}
|
|
1530
1539
|
return null;
|