vxe-table 3.24.3 → 3.25.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 +26 -7
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +3 -2
- package/es/table/module/edit/mixin.js +5 -4
- package/es/table/module/export/mixin.js +6 -4
- package/es/table/module/filter/mixin.js +2 -2
- package/es/table/module/keyboard/mixin.js +4 -3
- package/es/table/module/menu/mixin.js +3 -3
- package/es/table/render/index.js +5 -3
- package/es/table/src/body.js +4 -4
- package/es/table/src/header.js +4 -3
- package/es/table/src/methods.js +77 -49
- package/es/table/src/table.js +30 -27
- package/es/table/src/util.js +6 -3
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.js +9 -0
- package/lib/grid/src/grid.js +28 -6
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +5202 -5144
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +2 -1
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +4 -3
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/mixin.js +9 -3
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/filter/mixin.js +1 -1
- package/lib/table/module/filter/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +4 -3
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +2 -2
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/render/index.js +4 -2
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +3 -3
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/header.js +3 -2
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +33 -31
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +33 -26
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +8 -2
- package/lib/table/src/util.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/lib/ui/src/utils.js +10 -0
- package/lib/ui/src/utils.min.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +28 -7
- package/packages/table/module/custom/panel.ts +3 -2
- package/packages/table/module/edit/mixin.ts +5 -4
- package/packages/table/module/export/mixin.ts +6 -4
- package/packages/table/module/filter/mixin.ts +2 -2
- package/packages/table/module/keyboard/mixin.ts +4 -3
- package/packages/table/module/menu/mixin.ts +3 -3
- package/packages/table/render/index.ts +5 -3
- package/packages/table/src/body.ts +4 -4
- package/packages/table/src/header.ts +4 -3
- package/packages/table/src/methods.ts +74 -47
- package/packages/table/src/table.ts +30 -27
- package/packages/table/src/util.ts +6 -3
- package/packages/ui/src/utils.ts +10 -0
- /package/es/{iconfont.1790757586395.ttf → iconfont.1791880417274.ttf} +0 -0
- /package/es/{iconfont.1790757586395.woff → iconfont.1791880417274.woff} +0 -0
- /package/es/{iconfont.1790757586395.woff2 → iconfont.1791880417274.woff2} +0 -0
- /package/lib/{iconfont.1790757586395.ttf → iconfont.1791880417274.ttf} +0 -0
- /package/lib/{iconfont.1790757586395.woff → iconfont.1791880417274.woff} +0 -0
- /package/lib/{iconfont.1790757586395.woff2 → iconfont.1791880417274.woff2} +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils';
|
|
4
|
-
import { getOffsetHeight, getPaddingTopBottomSize, getDomNode, toCssUnit } from '../../ui/src/dom';
|
|
4
|
+
import { getOffsetHeight, getPaddingTopBottomSize, getDomNode, toCssUnit, hasClass } from '../../ui/src/dom';
|
|
5
5
|
import { VxeUI } from '../../ui';
|
|
6
6
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
7
7
|
import { createComponentLog } from '../../ui/src/log';
|
|
8
8
|
import { tableProps } from '../../table/src/props';
|
|
9
|
-
import VxeTableComponent from '../../table
|
|
10
|
-
import VxeToolbarComponent from '../../toolbar
|
|
9
|
+
import VxeTableComponent from '../../table';
|
|
10
|
+
import VxeToolbarComponent from '../../toolbar';
|
|
11
11
|
const { warnLog, errLog } = createComponentLog('grid');
|
|
12
12
|
const { getConfig, getI18n, commands, globalEvents, globalMixins, createEvent, GLOBAL_EVENT_KEYS, renderEmptyElement } = VxeUI;
|
|
13
13
|
const tableMethods = {};
|
|
@@ -123,6 +123,11 @@ export default {
|
|
|
123
123
|
const props = $xeGrid;
|
|
124
124
|
return Object.assign({}, getConfig().grid.pagerConfig, props.pagerConfig);
|
|
125
125
|
},
|
|
126
|
+
computePagerProps() {
|
|
127
|
+
const $xeGrid = this;
|
|
128
|
+
const pagerOpts = $xeGrid.computePagerOpts;
|
|
129
|
+
return Object.assign({}, pagerOpts, { enabled: undefined, slots: undefined });
|
|
130
|
+
},
|
|
126
131
|
formOpts() {
|
|
127
132
|
const $xeGrid = this;
|
|
128
133
|
return $xeGrid.computeFormOpts;
|
|
@@ -392,12 +397,25 @@ export default {
|
|
|
392
397
|
}
|
|
393
398
|
return 0;
|
|
394
399
|
},
|
|
400
|
+
getParentElem() {
|
|
401
|
+
const $xeGrid = this;
|
|
402
|
+
const el = $xeGrid.$refs.refElem;
|
|
403
|
+
if (!el) {
|
|
404
|
+
return null;
|
|
405
|
+
}
|
|
406
|
+
let parentEl = el.parentElement;
|
|
407
|
+
// 如果是虚拟滚动条
|
|
408
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
409
|
+
parentEl = parentEl.parentElement;
|
|
410
|
+
}
|
|
411
|
+
return parentEl;
|
|
412
|
+
},
|
|
395
413
|
getParentHeight() {
|
|
396
414
|
const $xeGrid = this;
|
|
397
415
|
const reactData = $xeGrid.reactData;
|
|
398
416
|
const el = $xeGrid.$refs.refElem;
|
|
399
417
|
if (el) {
|
|
400
|
-
const parentEl =
|
|
418
|
+
const parentEl = $xeGrid.getParentElem();
|
|
401
419
|
return (reactData.isZMax ? getDomNode().visibleHeight : (parentEl ? XEUtils.toNumber(getComputedStyle(parentEl).height) : 0)) - $xeGrid.getExcludeHeight();
|
|
402
420
|
}
|
|
403
421
|
return 0;
|
|
@@ -1142,7 +1160,7 @@ export default {
|
|
|
1142
1160
|
if ($form) {
|
|
1143
1161
|
return $form.validate();
|
|
1144
1162
|
}
|
|
1145
|
-
return
|
|
1163
|
+
return Promise.resolve();
|
|
1146
1164
|
},
|
|
1147
1165
|
validateFormField(field) {
|
|
1148
1166
|
const $xeGrid = this;
|
|
@@ -1150,7 +1168,7 @@ export default {
|
|
|
1150
1168
|
if ($form) {
|
|
1151
1169
|
return $form.validateField(field);
|
|
1152
1170
|
}
|
|
1153
|
-
return
|
|
1171
|
+
return Promise.resolve();
|
|
1154
1172
|
},
|
|
1155
1173
|
clearFormValidate(field) {
|
|
1156
1174
|
const $xeGrid = this;
|
|
@@ -1749,6 +1767,7 @@ export default {
|
|
|
1749
1767
|
const { proxyConfig, pagerConfig } = props;
|
|
1750
1768
|
const proxyOpts = $xeGrid.computeProxyOpts;
|
|
1751
1769
|
const pagerOpts = $xeGrid.computePagerOpts;
|
|
1770
|
+
const pagerProps = $xeGrid.computePagerProps;
|
|
1752
1771
|
const pagerSlot = slots.pager;
|
|
1753
1772
|
if ((pagerConfig && isEnableConf(pagerOpts)) || slots.pager) {
|
|
1754
1773
|
return h('div', {
|
|
@@ -1761,7 +1780,7 @@ export default {
|
|
|
1761
1780
|
VxeUIPagerComponent
|
|
1762
1781
|
? h(VxeUIPagerComponent, {
|
|
1763
1782
|
ref: 'refPager',
|
|
1764
|
-
props: Object.assign(Object.assign({},
|
|
1783
|
+
props: Object.assign(Object.assign({}, pagerProps), (proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {})),
|
|
1765
1784
|
on: {
|
|
1766
1785
|
'page-change': $xeGrid.pageChangeEvent
|
|
1767
1786
|
},
|