vxe-table 4.22.2 → 4.22.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/dist/all.esm.js +76 -69
- package/dist/style.css +1 -1
- package/es/grid/src/grid.js +14 -7
- package/es/style.css +1 -1
- package/es/table/src/table.js +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +16 -6
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +105 -95
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/table.js +1 -1
- 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 +15 -7
- package/packages/table/src/table.ts +1 -1
- /package/es/{iconfont.1789983635313.ttf → iconfont.1791617063720.ttf} +0 -0
- /package/es/{iconfont.1789983635313.woff → iconfont.1791617063720.woff} +0 -0
- /package/es/{iconfont.1789983635313.woff2 → iconfont.1791617063720.woff2} +0 -0
- /package/lib/{iconfont.1789983635313.ttf → iconfont.1791617063720.ttf} +0 -0
- /package/lib/{iconfont.1789983635313.woff → iconfont.1791617063720.woff} +0 -0
- /package/lib/{iconfont.1789983635313.woff2 → iconfont.1791617063720.woff2} +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -10,8 +10,8 @@ import { getSlotVNs } from '../../ui/src/vn';
|
|
|
10
10
|
import { createComponentLog } from '../../ui/src/log';
|
|
11
11
|
import { tableEmits } from '../../table/src/emits';
|
|
12
12
|
import { tableProps } from '../../table/src/props';
|
|
13
|
-
import VxeTableComponent from '../../table
|
|
14
|
-
import VxeToolbarComponent from '../../toolbar
|
|
13
|
+
import VxeTableComponent from '../../table';
|
|
14
|
+
import VxeToolbarComponent from '../../toolbar';
|
|
15
15
|
const { warnLog, errLog } = createComponentLog('grid');
|
|
16
16
|
const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = VxeUI;
|
|
17
17
|
const tableComponentPropKeys = Object.keys(tableProps);
|
|
@@ -100,6 +100,10 @@ export default defineVxeComponent({
|
|
|
100
100
|
const computePagerOpts = computed(() => {
|
|
101
101
|
return Object.assign({}, getConfig().grid.pagerConfig, props.pagerConfig);
|
|
102
102
|
});
|
|
103
|
+
const computePagerProps = computed(() => {
|
|
104
|
+
const pagerOpts = computePagerOpts.value;
|
|
105
|
+
return Object.assign({}, pagerOpts, { enabled: undefined, slots: undefined });
|
|
106
|
+
});
|
|
103
107
|
const computeFormOpts = computed(() => {
|
|
104
108
|
return Object.assign({}, getConfig().grid.formConfig, props.formConfig);
|
|
105
109
|
});
|
|
@@ -442,12 +446,13 @@ export default defineVxeComponent({
|
|
|
442
446
|
const { $event } = params;
|
|
443
447
|
const proxyOpts = computeProxyOpts.value;
|
|
444
448
|
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
449
|
+
const formOptions = proxyOpts.formOptions || {};
|
|
445
450
|
$xeGrid.dispatchEvent('form-reset', params, $event);
|
|
446
451
|
if ($xeTable) {
|
|
447
452
|
$xeTable.clearScroll();
|
|
448
453
|
}
|
|
449
454
|
internalData.uFoot = true;
|
|
450
|
-
$xeGrid.commitProxy('reload').then((rest) => {
|
|
455
|
+
$xeGrid.commitProxy(formOptions.resetMode === 'reset_form' ? 'query' : 'reload').then((rest) => {
|
|
451
456
|
$xeGrid.dispatchEvent('proxy-query', Object.assign(Object.assign({}, rest), { isReload: true }), $event);
|
|
452
457
|
});
|
|
453
458
|
internalData.uFoot = false;
|
|
@@ -722,6 +727,7 @@ export default defineVxeComponent({
|
|
|
722
727
|
const { proxyConfig, pagerConfig } = props;
|
|
723
728
|
const proxyOpts = computeProxyOpts.value;
|
|
724
729
|
const pagerOpts = computePagerOpts.value;
|
|
730
|
+
const pagerProps = computePagerProps.value;
|
|
725
731
|
const pagerSlot = slots.pager;
|
|
726
732
|
if ((pagerConfig && isEnableConf(pagerOpts)) || slots.pager) {
|
|
727
733
|
return h('div', {
|
|
@@ -732,7 +738,7 @@ export default defineVxeComponent({
|
|
|
732
738
|
? pagerSlot({ $grid: $xeGrid, $gantt: null })
|
|
733
739
|
: [
|
|
734
740
|
VxeUIPagerComponent
|
|
735
|
-
? h(VxeUIPagerComponent, Object.assign(Object.assign(Object.assign({ ref: refPager },
|
|
741
|
+
? h(VxeUIPagerComponent, Object.assign(Object.assign(Object.assign({ ref: refPager }, pagerProps), (proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {})), { onPageChange: pageChangeEvent }), getConfigSlot(pagerOpts.slots))
|
|
736
742
|
: renderEmptyElement($xeGrid)
|
|
737
743
|
]);
|
|
738
744
|
}
|
|
@@ -1129,7 +1135,8 @@ export default defineVxeComponent({
|
|
|
1129
1135
|
}
|
|
1130
1136
|
break;
|
|
1131
1137
|
}
|
|
1132
|
-
case 'queryFooter':
|
|
1138
|
+
case 'queryFooter':
|
|
1139
|
+
case 'query_footer': {
|
|
1133
1140
|
const bqfMethod = ajax.beforeQueryFooter;
|
|
1134
1141
|
const qfMethod = ajax.queryFooter;
|
|
1135
1142
|
const aqfMethod = ajax.afterQueryFooter;
|
|
@@ -1483,14 +1490,14 @@ export default defineVxeComponent({
|
|
|
1483
1490
|
if ($form) {
|
|
1484
1491
|
return $form.validate();
|
|
1485
1492
|
}
|
|
1486
|
-
return
|
|
1493
|
+
return Promise.resolve();
|
|
1487
1494
|
},
|
|
1488
1495
|
validateFormField(field) {
|
|
1489
1496
|
const $form = refForm.value;
|
|
1490
1497
|
if ($form) {
|
|
1491
1498
|
return $form.validateField(field);
|
|
1492
1499
|
}
|
|
1493
|
-
return
|
|
1500
|
+
return Promise.resolve();
|
|
1494
1501
|
},
|
|
1495
1502
|
clearFormValidate(field) {
|
|
1496
1503
|
const $form = refForm.value;
|