vxe-table 3.15.0-beta.3 → 3.15.0-beta.4
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 +8 -8
- package/es/style.css +1 -1
- package/es/table/src/methods.js +27 -9
- package/es/table/src/table.js +6 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +10 -10
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +58 -29
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/methods.js +38 -17
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +6 -0
- 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 +21 -21
- package/packages/table/src/methods.ts +29 -13
- package/packages/table/src/table.ts +6 -0
- /package/es/{iconfont.1744078788889.ttf → iconfont.1744095177947.ttf} +0 -0
- /package/es/{iconfont.1744078788889.woff → iconfont.1744095177947.woff} +0 -0
- /package/es/{iconfont.1744078788889.woff2 → iconfont.1744095177947.woff2} +0 -0
- /package/lib/{iconfont.1744078788889.ttf → iconfont.1744095177947.ttf} +0 -0
- /package/lib/{iconfont.1744078788889.woff → iconfont.1744095177947.woff} +0 -0
- /package/lib/{iconfont.1744078788889.woff2 → iconfont.1744095177947.woff2} +0 -0
package/lib/table/src/methods.js
CHANGED
|
@@ -7441,13 +7441,14 @@ const Methods = {
|
|
|
7441
7441
|
*/
|
|
7442
7442
|
triggerRadioRowEvent(evnt, params) {
|
|
7443
7443
|
const $xeTable = this;
|
|
7444
|
+
const reactData = $xeTable;
|
|
7444
7445
|
const {
|
|
7445
|
-
selectRadioRow: oldValue
|
|
7446
|
-
|
|
7447
|
-
} = this;
|
|
7446
|
+
selectRadioRow: oldValue
|
|
7447
|
+
} = reactData;
|
|
7448
7448
|
const {
|
|
7449
7449
|
row
|
|
7450
7450
|
} = params;
|
|
7451
|
+
const radioOpts = $xeTable.computeRadioOpts;
|
|
7451
7452
|
const {
|
|
7452
7453
|
trigger
|
|
7453
7454
|
} = radioOpts;
|
|
@@ -7463,11 +7464,11 @@ const Methods = {
|
|
|
7463
7464
|
isChange = oldValue === newValue;
|
|
7464
7465
|
if (isChange) {
|
|
7465
7466
|
newValue = null;
|
|
7466
|
-
|
|
7467
|
+
$xeTable.clearRadioRow();
|
|
7467
7468
|
}
|
|
7468
7469
|
}
|
|
7469
7470
|
if (isChange) {
|
|
7470
|
-
|
|
7471
|
+
$xeTable.dispatchEvent('radio-change', Object.assign({
|
|
7471
7472
|
oldValue,
|
|
7472
7473
|
newValue
|
|
7473
7474
|
}, params), evnt);
|
|
@@ -7475,17 +7476,30 @@ const Methods = {
|
|
|
7475
7476
|
},
|
|
7476
7477
|
triggerCurrentColumnEvent(evnt, params) {
|
|
7477
7478
|
const $xeTable = this;
|
|
7478
|
-
const
|
|
7479
|
+
const reactData = $xeTable;
|
|
7479
7480
|
const {
|
|
7480
|
-
|
|
7481
|
-
} =
|
|
7481
|
+
currentColumn: oldValue
|
|
7482
|
+
} = reactData;
|
|
7483
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
7484
|
+
const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
|
|
7485
|
+
const beforeRowMethod = currentColumnOpts.beforeSelectMethod || columnOpts.currentMethod;
|
|
7482
7486
|
const {
|
|
7483
|
-
column
|
|
7487
|
+
column: newValue
|
|
7484
7488
|
} = params;
|
|
7485
|
-
|
|
7486
|
-
|
|
7489
|
+
const isChange = oldValue !== newValue;
|
|
7490
|
+
if (!beforeRowMethod || beforeRowMethod({
|
|
7491
|
+
column: newValue,
|
|
7492
|
+
$table: $xeTable
|
|
7487
7493
|
})) {
|
|
7488
|
-
$xeTable.setCurrentColumn(
|
|
7494
|
+
$xeTable.setCurrentColumn(newValue);
|
|
7495
|
+
if (isChange) {
|
|
7496
|
+
$xeTable.dispatchEvent('current-column-change', Object.assign({
|
|
7497
|
+
oldValue,
|
|
7498
|
+
newValue
|
|
7499
|
+
}, params), evnt);
|
|
7500
|
+
}
|
|
7501
|
+
} else {
|
|
7502
|
+
$xeTable.dispatchEvent('current-column-disabled', params, evnt);
|
|
7489
7503
|
}
|
|
7490
7504
|
},
|
|
7491
7505
|
triggerCurrentRowEvent(evnt, params) {
|
|
@@ -7495,23 +7509,30 @@ const Methods = {
|
|
|
7495
7509
|
currentRow: oldValue
|
|
7496
7510
|
} = reactData;
|
|
7497
7511
|
const rowOpts = $xeTable.computeRowOpts;
|
|
7498
|
-
const
|
|
7499
|
-
|
|
7500
|
-
} = rowOpts;
|
|
7512
|
+
const currentRowOpts = $xeTable.computeCurrentRowOpts;
|
|
7513
|
+
const beforeRowMethod = currentRowOpts.beforeSelectMethod || rowOpts.currentMethod;
|
|
7501
7514
|
const {
|
|
7502
7515
|
row: newValue
|
|
7503
7516
|
} = params;
|
|
7504
7517
|
const isChange = oldValue !== newValue;
|
|
7505
|
-
if (!
|
|
7506
|
-
row: newValue
|
|
7518
|
+
if (!beforeRowMethod || beforeRowMethod({
|
|
7519
|
+
row: newValue,
|
|
7520
|
+
$table: $xeTable
|
|
7507
7521
|
})) {
|
|
7508
7522
|
$xeTable.setCurrentRow(newValue);
|
|
7509
7523
|
if (isChange) {
|
|
7524
|
+
$xeTable.dispatchEvent('current-row-change', Object.assign({
|
|
7525
|
+
oldValue,
|
|
7526
|
+
newValue
|
|
7527
|
+
}, params), evnt);
|
|
7528
|
+
// 已废弃
|
|
7510
7529
|
$xeTable.dispatchEvent('current-change', Object.assign({
|
|
7511
7530
|
oldValue,
|
|
7512
7531
|
newValue
|
|
7513
7532
|
}, params), evnt);
|
|
7514
7533
|
}
|
|
7534
|
+
} else {
|
|
7535
|
+
$xeTable.dispatchEvent('current-row-disabled', params, evnt);
|
|
7515
7536
|
}
|
|
7516
7537
|
},
|
|
7517
7538
|
/**
|