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/dist/all.esm.js
CHANGED
|
@@ -47,7 +47,7 @@ function getDefaultConfig(val1, def1) {
|
|
|
47
47
|
return XEUtils.eqNull(val1) ? def1 : val1;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
const version = "4.22.
|
|
50
|
+
const version = "4.22.4";
|
|
51
51
|
VxeUI.version = version;
|
|
52
52
|
VxeUI.tableVersion = version;
|
|
53
53
|
VxeUI.setConfig({
|
|
@@ -931,7 +931,7 @@ function getPopupWrapperElement(panelElem) {
|
|
|
931
931
|
}
|
|
932
932
|
|
|
933
933
|
const { log } = VxeUI;
|
|
934
|
-
const tableVersion = `table v${"4.22.
|
|
934
|
+
const tableVersion = `table v${"4.22.4"}`;
|
|
935
935
|
function createComponentLog(name) {
|
|
936
936
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
937
937
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -30599,7 +30599,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30599
30599
|
const parentEl = $xeTable.getParentElem();
|
|
30600
30600
|
resizeObserver = globalResize.create(() => {
|
|
30601
30601
|
if (props.autoResize) {
|
|
30602
|
-
|
|
30602
|
+
layoutReFlag.value++;
|
|
30603
30603
|
}
|
|
30604
30604
|
});
|
|
30605
30605
|
if (el) {
|
|
@@ -30717,6 +30717,54 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30717
30717
|
}
|
|
30718
30718
|
});
|
|
30719
30719
|
|
|
30720
|
+
function useCellView(props) {
|
|
30721
|
+
const currColumn = computed(() => {
|
|
30722
|
+
const { renderParams } = props;
|
|
30723
|
+
return renderParams.column;
|
|
30724
|
+
});
|
|
30725
|
+
const currRow = computed(() => {
|
|
30726
|
+
const { renderParams } = props;
|
|
30727
|
+
return renderParams.row;
|
|
30728
|
+
});
|
|
30729
|
+
const cellOptions = computed(() => {
|
|
30730
|
+
const { renderOpts } = props;
|
|
30731
|
+
return renderOpts.props || {};
|
|
30732
|
+
});
|
|
30733
|
+
const cellModel = computed({
|
|
30734
|
+
get() {
|
|
30735
|
+
const { renderParams } = props;
|
|
30736
|
+
const { row, column } = renderParams;
|
|
30737
|
+
return XEUtils.get(row, column.field);
|
|
30738
|
+
},
|
|
30739
|
+
set(value) {
|
|
30740
|
+
const { renderParams } = props;
|
|
30741
|
+
const { row, column } = renderParams;
|
|
30742
|
+
return XEUtils.set(row, column.field, value);
|
|
30743
|
+
}
|
|
30744
|
+
});
|
|
30745
|
+
return {
|
|
30746
|
+
currColumn,
|
|
30747
|
+
currRow,
|
|
30748
|
+
cellModel,
|
|
30749
|
+
cellOptions
|
|
30750
|
+
};
|
|
30751
|
+
}
|
|
30752
|
+
|
|
30753
|
+
const VxeTable = Object.assign({}, VxeTableComponent, {
|
|
30754
|
+
install(app) {
|
|
30755
|
+
app.component(VxeTableComponent.name, VxeTableComponent);
|
|
30756
|
+
}
|
|
30757
|
+
});
|
|
30758
|
+
const tableHandle = {
|
|
30759
|
+
useCellView
|
|
30760
|
+
};
|
|
30761
|
+
if (VxeUI.dynamicApp) {
|
|
30762
|
+
VxeUI.dynamicApp.component(VxeTableComponent.name, VxeTableComponent);
|
|
30763
|
+
}
|
|
30764
|
+
VxeUI.component(VxeTableComponent);
|
|
30765
|
+
VxeUI.tableHandle = tableHandle;
|
|
30766
|
+
const Table = VxeTable;
|
|
30767
|
+
|
|
30720
30768
|
const { warnLog: warnLog$1, errLog: errLog$1 } = createComponentLog('toolbar');
|
|
30721
30769
|
const { getConfig: getConfig$1, getIcon, getI18n: getI18n$1, renderer, commands: commands$1, createEvent: createEvent$1, useFns: useFns$1 } = VxeUI;
|
|
30722
30770
|
function createReactData$1() {
|
|
@@ -31335,6 +31383,17 @@ var VxeToolbarComponent = defineVxeComponent({
|
|
|
31335
31383
|
}
|
|
31336
31384
|
});
|
|
31337
31385
|
|
|
31386
|
+
const VxeToolbar = Object.assign({}, VxeToolbarComponent, {
|
|
31387
|
+
install(app) {
|
|
31388
|
+
app.component(VxeToolbarComponent.name, VxeToolbarComponent);
|
|
31389
|
+
}
|
|
31390
|
+
});
|
|
31391
|
+
if (VxeUI.dynamicApp) {
|
|
31392
|
+
VxeUI.dynamicApp.component(VxeToolbarComponent.name, VxeToolbarComponent);
|
|
31393
|
+
}
|
|
31394
|
+
VxeUI.component(VxeToolbarComponent);
|
|
31395
|
+
const Toolbar = VxeToolbar;
|
|
31396
|
+
|
|
31338
31397
|
const { warnLog, errLog } = createComponentLog('grid');
|
|
31339
31398
|
const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = VxeUI;
|
|
31340
31399
|
const tableComponentPropKeys = Object.keys(tableProps);
|
|
@@ -31423,6 +31482,10 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
31423
31482
|
const computePagerOpts = computed(() => {
|
|
31424
31483
|
return Object.assign({}, getConfig().grid.pagerConfig, props.pagerConfig);
|
|
31425
31484
|
});
|
|
31485
|
+
const computePagerProps = computed(() => {
|
|
31486
|
+
const pagerOpts = computePagerOpts.value;
|
|
31487
|
+
return Object.assign({}, pagerOpts, { enabled: undefined, slots: undefined });
|
|
31488
|
+
});
|
|
31426
31489
|
const computeFormOpts = computed(() => {
|
|
31427
31490
|
return Object.assign({}, getConfig().grid.formConfig, props.formConfig);
|
|
31428
31491
|
});
|
|
@@ -31765,12 +31828,13 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
31765
31828
|
const { $event } = params;
|
|
31766
31829
|
const proxyOpts = computeProxyOpts.value;
|
|
31767
31830
|
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
31831
|
+
const formOptions = proxyOpts.formOptions || {};
|
|
31768
31832
|
$xeGrid.dispatchEvent('form-reset', params, $event);
|
|
31769
31833
|
if ($xeTable) {
|
|
31770
31834
|
$xeTable.clearScroll();
|
|
31771
31835
|
}
|
|
31772
31836
|
internalData.uFoot = true;
|
|
31773
|
-
$xeGrid.commitProxy('reload').then((rest) => {
|
|
31837
|
+
$xeGrid.commitProxy(formOptions.resetMode === 'reset_form' ? 'query' : 'reload').then((rest) => {
|
|
31774
31838
|
$xeGrid.dispatchEvent('proxy-query', Object.assign(Object.assign({}, rest), { isReload: true }), $event);
|
|
31775
31839
|
});
|
|
31776
31840
|
internalData.uFoot = false;
|
|
@@ -31930,7 +31994,7 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
31930
31994
|
toolbarSlots.toolSuffix = toolSuffixSlot;
|
|
31931
31995
|
}
|
|
31932
31996
|
}
|
|
31933
|
-
slotVNs.push(h(
|
|
31997
|
+
slotVNs.push(h(VxeToolbar, Object.assign(Object.assign({ ref: refToolbar }, toolbarOpts), { slots: undefined }), toolbarSlots));
|
|
31934
31998
|
}
|
|
31935
31999
|
return h('div', {
|
|
31936
32000
|
ref: refToolbarWrapper,
|
|
@@ -32022,7 +32086,7 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
32022
32086
|
return h('div', {
|
|
32023
32087
|
class: 'vxe-grid--table-wrapper'
|
|
32024
32088
|
}, [
|
|
32025
|
-
h(
|
|
32089
|
+
h(VxeTable, Object.assign(Object.assign({ ref: refTable }, tableProps), tableOns), slotObj)
|
|
32026
32090
|
]);
|
|
32027
32091
|
};
|
|
32028
32092
|
/**
|
|
@@ -32045,6 +32109,7 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
32045
32109
|
const { proxyConfig, pagerConfig } = props;
|
|
32046
32110
|
const proxyOpts = computeProxyOpts.value;
|
|
32047
32111
|
const pagerOpts = computePagerOpts.value;
|
|
32112
|
+
const pagerProps = computePagerProps.value;
|
|
32048
32113
|
const pagerSlot = slots.pager;
|
|
32049
32114
|
if ((pagerConfig && isEnableConf(pagerOpts)) || slots.pager) {
|
|
32050
32115
|
return h('div', {
|
|
@@ -32055,7 +32120,7 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
32055
32120
|
? pagerSlot({ $grid: $xeGrid, $gantt: null })
|
|
32056
32121
|
: [
|
|
32057
32122
|
VxeUIPagerComponent
|
|
32058
|
-
? h(VxeUIPagerComponent, Object.assign(Object.assign(Object.assign({ ref: refPager },
|
|
32123
|
+
? h(VxeUIPagerComponent, Object.assign(Object.assign(Object.assign({ ref: refPager }, pagerProps), (proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {})), { onPageChange: pageChangeEvent }), getConfigSlot(pagerOpts.slots))
|
|
32059
32124
|
: renderEmptyElement($xeGrid)
|
|
32060
32125
|
]);
|
|
32061
32126
|
}
|
|
@@ -32452,7 +32517,8 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
32452
32517
|
}
|
|
32453
32518
|
break;
|
|
32454
32519
|
}
|
|
32455
|
-
case 'queryFooter':
|
|
32520
|
+
case 'queryFooter':
|
|
32521
|
+
case 'query_footer': {
|
|
32456
32522
|
const bqfMethod = ajax.beforeQueryFooter;
|
|
32457
32523
|
const qfMethod = ajax.queryFooter;
|
|
32458
32524
|
const aqfMethod = ajax.afterQueryFooter;
|
|
@@ -32806,14 +32872,14 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
32806
32872
|
if ($form) {
|
|
32807
32873
|
return $form.validate();
|
|
32808
32874
|
}
|
|
32809
|
-
return
|
|
32875
|
+
return Promise.resolve();
|
|
32810
32876
|
},
|
|
32811
32877
|
validateFormField(field) {
|
|
32812
32878
|
const $form = refForm.value;
|
|
32813
32879
|
if ($form) {
|
|
32814
32880
|
return $form.validateField(field);
|
|
32815
32881
|
}
|
|
32816
|
-
return
|
|
32882
|
+
return Promise.resolve();
|
|
32817
32883
|
},
|
|
32818
32884
|
clearFormValidate(field) {
|
|
32819
32885
|
const $form = refForm.value;
|
|
@@ -33130,65 +33196,6 @@ if (VxeUI.dynamicApp) {
|
|
|
33130
33196
|
VxeUI.component(VxeGridComponent);
|
|
33131
33197
|
const Grid = VxeGrid;
|
|
33132
33198
|
|
|
33133
|
-
function useCellView(props) {
|
|
33134
|
-
const currColumn = computed(() => {
|
|
33135
|
-
const { renderParams } = props;
|
|
33136
|
-
return renderParams.column;
|
|
33137
|
-
});
|
|
33138
|
-
const currRow = computed(() => {
|
|
33139
|
-
const { renderParams } = props;
|
|
33140
|
-
return renderParams.row;
|
|
33141
|
-
});
|
|
33142
|
-
const cellOptions = computed(() => {
|
|
33143
|
-
const { renderOpts } = props;
|
|
33144
|
-
return renderOpts.props || {};
|
|
33145
|
-
});
|
|
33146
|
-
const cellModel = computed({
|
|
33147
|
-
get() {
|
|
33148
|
-
const { renderParams } = props;
|
|
33149
|
-
const { row, column } = renderParams;
|
|
33150
|
-
return XEUtils.get(row, column.field);
|
|
33151
|
-
},
|
|
33152
|
-
set(value) {
|
|
33153
|
-
const { renderParams } = props;
|
|
33154
|
-
const { row, column } = renderParams;
|
|
33155
|
-
return XEUtils.set(row, column.field, value);
|
|
33156
|
-
}
|
|
33157
|
-
});
|
|
33158
|
-
return {
|
|
33159
|
-
currColumn,
|
|
33160
|
-
currRow,
|
|
33161
|
-
cellModel,
|
|
33162
|
-
cellOptions
|
|
33163
|
-
};
|
|
33164
|
-
}
|
|
33165
|
-
|
|
33166
|
-
const VxeTable = Object.assign({}, VxeTableComponent, {
|
|
33167
|
-
install(app) {
|
|
33168
|
-
app.component(VxeTableComponent.name, VxeTableComponent);
|
|
33169
|
-
}
|
|
33170
|
-
});
|
|
33171
|
-
const tableHandle = {
|
|
33172
|
-
useCellView
|
|
33173
|
-
};
|
|
33174
|
-
if (VxeUI.dynamicApp) {
|
|
33175
|
-
VxeUI.dynamicApp.component(VxeTableComponent.name, VxeTableComponent);
|
|
33176
|
-
}
|
|
33177
|
-
VxeUI.component(VxeTableComponent);
|
|
33178
|
-
VxeUI.tableHandle = tableHandle;
|
|
33179
|
-
const Table = VxeTable;
|
|
33180
|
-
|
|
33181
|
-
const VxeToolbar = Object.assign({}, VxeToolbarComponent, {
|
|
33182
|
-
install(app) {
|
|
33183
|
-
app.component(VxeToolbarComponent.name, VxeToolbarComponent);
|
|
33184
|
-
}
|
|
33185
|
-
});
|
|
33186
|
-
if (VxeUI.dynamicApp) {
|
|
33187
|
-
VxeUI.dynamicApp.component(VxeToolbarComponent.name, VxeToolbarComponent);
|
|
33188
|
-
}
|
|
33189
|
-
VxeUI.component(VxeToolbarComponent);
|
|
33190
|
-
const Toolbar = VxeToolbar;
|
|
33191
|
-
|
|
33192
33199
|
var zhCN = {
|
|
33193
33200
|
vxe: {
|
|
33194
33201
|
base: {
|