vxe-table 4.18.0-beta.2 → 4.18.0-beta.20
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/README.md +10 -10
- package/es/colgroup/style.css +0 -0
- package/es/colgroup/style.min.css +0 -0
- package/es/column/style.css +0 -0
- package/es/column/style.min.css +0 -0
- package/es/grid/src/grid.js +23 -19
- package/es/grid/style.css +86 -0
- package/es/grid/style.min.css +1 -0
- package/es/iconfont.1770109263422.ttf +0 -0
- package/es/iconfont.1770109263422.woff +0 -0
- package/es/iconfont.1770109263422.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.d.ts +2 -0
- package/es/locale/lang/ar-EG.js +6 -0
- package/es/locale/lang/de-DE.d.ts +2 -0
- package/es/locale/lang/de-DE.js +6 -0
- package/es/locale/lang/en-US.d.ts +2 -0
- package/es/locale/lang/en-US.js +6 -0
- package/es/locale/lang/es-ES.d.ts +2 -0
- package/es/locale/lang/es-ES.js +6 -0
- package/es/locale/lang/fr-FR.d.ts +2 -0
- package/es/locale/lang/fr-FR.js +6 -0
- package/es/locale/lang/hu-HU.d.ts +2 -0
- package/es/locale/lang/hu-HU.js +6 -0
- package/es/locale/lang/hy-AM.d.ts +2 -0
- package/es/locale/lang/hy-AM.js +6 -0
- package/es/locale/lang/id-ID.d.ts +2 -0
- package/es/locale/lang/id-ID.js +6 -0
- package/es/locale/lang/it-IT.d.ts +2 -0
- package/es/locale/lang/it-IT.js +6 -0
- package/es/locale/lang/ja-JP.d.ts +2 -0
- package/es/locale/lang/ja-JP.js +6 -0
- package/es/locale/lang/ko-KR.d.ts +2 -0
- package/es/locale/lang/ko-KR.js +6 -0
- package/es/locale/lang/ms-MY.d.ts +2 -0
- package/es/locale/lang/ms-MY.js +6 -0
- package/es/locale/lang/nb-NO.d.ts +2 -0
- package/es/locale/lang/nb-NO.js +6 -0
- package/es/locale/lang/pt-BR.d.ts +2 -0
- package/es/locale/lang/pt-BR.js +6 -0
- package/es/locale/lang/ru-RU.d.ts +2 -0
- package/es/locale/lang/ru-RU.js +6 -0
- package/es/locale/lang/th-TH.d.ts +2 -0
- package/es/locale/lang/th-TH.js +6 -0
- package/es/locale/lang/ug-CN.d.ts +2 -0
- package/es/locale/lang/ug-CN.js +6 -0
- package/es/locale/lang/uk-UA.d.ts +2 -0
- package/es/locale/lang/uk-UA.js +6 -0
- package/es/locale/lang/uz-UZ.d.ts +2 -0
- package/es/locale/lang/uz-UZ.js +6 -0
- package/es/locale/lang/vi-VN.d.ts +2 -0
- package/es/locale/lang/vi-VN.js +6 -0
- package/es/locale/lang/zh-CHT.d.ts +2 -0
- package/es/locale/lang/zh-CHT.js +6 -0
- package/es/locale/lang/zh-CN.d.ts +2 -0
- package/es/locale/lang/zh-CN.js +6 -0
- package/es/locale/lang/zh-HK.d.ts +2 -0
- package/es/locale/lang/zh-MO.d.ts +2 -0
- package/es/locale/lang/zh-TW.d.ts +2 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +25 -9
- package/es/table/module/custom/panel.js +14 -13
- package/es/table/module/edit/hook.js +3 -3
- package/es/table/module/export/hook.js +15 -1
- package/es/table/module/filter/panel.js +11 -3
- package/es/table/module/validator/hook.js +7 -6
- package/es/table/render/index.js +14 -0
- package/es/table/src/body.js +12 -5
- package/es/table/src/emits.js +1 -0
- package/es/table/src/props.js +2 -0
- package/es/table/src/table.js +235 -54
- package/es/table/src/util.js +23 -9
- package/es/table/style.css +3887 -0
- package/es/table/style.min.css +1 -0
- package/es/toolbar/src/toolbar.js +11 -7
- package/es/toolbar/style.css +110 -0
- package/es/toolbar/style.min.css +1 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/style.css +0 -0
- package/es/ui/style.min.css +0 -0
- package/es/v-x-e-table/style.css +0 -0
- package/es/v-x-e-table/style.min.css +0 -0
- package/es/vxe-colgroup/style.css +0 -0
- package/es/vxe-colgroup/style.min.css +0 -0
- package/es/vxe-column/style.css +0 -0
- package/es/vxe-column/style.min.css +0 -0
- package/es/vxe-grid/style.css +86 -0
- package/es/vxe-grid/style.min.css +1 -0
- package/es/vxe-table/style.css +3887 -0
- package/es/vxe-table/style.min.css +1 -0
- package/es/vxe-toolbar/style.css +110 -0
- package/es/vxe-toolbar/style.min.css +1 -0
- package/es/vxe-ui/style.css +0 -0
- package/es/vxe-ui/style.min.css +0 -0
- package/es/vxe-v-x-e-table/style.css +0 -0
- package/es/vxe-v-x-e-table/style.min.css +0 -0
- package/lib/colgroup/style/index.js +1 -0
- package/lib/colgroup/style/style.css +0 -0
- package/lib/colgroup/style/style.min.css +0 -0
- package/lib/column/style/index.js +1 -0
- package/lib/column/style/style.css +0 -0
- package/lib/column/style/style.min.css +0 -0
- package/lib/grid/src/grid.js +22 -18
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/index.js +1 -0
- package/lib/grid/style/style.css +86 -0
- package/lib/grid/style/style.min.css +1 -0
- package/lib/iconfont.1770109263422.ttf +0 -0
- package/lib/iconfont.1770109263422.woff +0 -0
- package/lib/iconfont.1770109263422.woff2 +0 -0
- package/lib/index.common.js +22 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +224 -106
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.d.ts +2 -0
- package/lib/locale/lang/ar-EG.js +6 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +848 -0
- package/lib/locale/lang/de-DE.d.ts +2 -0
- package/lib/locale/lang/de-DE.js +6 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +848 -0
- package/lib/locale/lang/en-US.d.ts +2 -0
- package/lib/locale/lang/en-US.js +6 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +848 -0
- package/lib/locale/lang/es-ES.d.ts +2 -0
- package/lib/locale/lang/es-ES.js +6 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +848 -0
- package/lib/locale/lang/fr-FR.d.ts +2 -0
- package/lib/locale/lang/fr-FR.js +6 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +848 -0
- package/lib/locale/lang/hu-HU.d.ts +2 -0
- package/lib/locale/lang/hu-HU.js +6 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +848 -0
- package/lib/locale/lang/hy-AM.d.ts +2 -0
- package/lib/locale/lang/hy-AM.js +6 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +848 -0
- package/lib/locale/lang/id-ID.d.ts +2 -0
- package/lib/locale/lang/id-ID.js +6 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +848 -0
- package/lib/locale/lang/it-IT.d.ts +2 -0
- package/lib/locale/lang/it-IT.js +6 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +848 -0
- package/lib/locale/lang/ja-JP.d.ts +2 -0
- package/lib/locale/lang/ja-JP.js +6 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +848 -0
- package/lib/locale/lang/ko-KR.d.ts +2 -0
- package/lib/locale/lang/ko-KR.js +6 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +848 -0
- package/lib/locale/lang/ms-MY.d.ts +2 -0
- package/lib/locale/lang/ms-MY.js +6 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +848 -0
- package/lib/locale/lang/nb-NO.d.ts +2 -0
- package/lib/locale/lang/nb-NO.js +6 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +848 -0
- package/lib/locale/lang/pt-BR.d.ts +2 -0
- package/lib/locale/lang/pt-BR.js +6 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +848 -0
- package/lib/locale/lang/ru-RU.d.ts +2 -0
- package/lib/locale/lang/ru-RU.js +6 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +848 -0
- package/lib/locale/lang/th-TH.d.ts +2 -0
- package/lib/locale/lang/th-TH.js +6 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +848 -0
- package/lib/locale/lang/ug-CN.d.ts +2 -0
- package/lib/locale/lang/ug-CN.js +6 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +848 -0
- package/lib/locale/lang/uk-UA.d.ts +2 -0
- package/lib/locale/lang/uk-UA.js +6 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +848 -0
- package/lib/locale/lang/uz-UZ.d.ts +2 -0
- package/lib/locale/lang/uz-UZ.js +6 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +848 -0
- package/lib/locale/lang/vi-VN.d.ts +2 -0
- package/lib/locale/lang/vi-VN.js +6 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +848 -0
- package/lib/locale/lang/zh-CHT.d.ts +2 -0
- package/lib/locale/lang/zh-CHT.js +6 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +848 -0
- package/lib/locale/lang/zh-CN.d.ts +2 -0
- package/lib/locale/lang/zh-CN.js +6 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +848 -0
- package/lib/locale/lang/zh-HK.d.ts +2 -0
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +23 -0
- package/lib/locale/lang/zh-MO.d.ts +2 -0
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +23 -0
- package/lib/locale/lang/zh-TW.d.ts +2 -0
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +23 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +29 -9
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +12 -8
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +3 -3
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +18 -6
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/filter/panel.js +14 -3
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/module/validator/hook.js +8 -6
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/render/index.js +18 -0
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +13 -4
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/emits.js +1 -1
- package/lib/table/src/emits.min.js +1 -1
- package/lib/table/src/props.js +2 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +37 -32
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +31 -11
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/index.js +1 -0
- package/lib/table/style/style.css +3887 -0
- package/lib/table/style/style.min.css +1 -0
- package/lib/toolbar/src/toolbar.js +10 -6
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/index.js +1 -0
- package/lib/toolbar/style/style.css +110 -0
- package/lib/toolbar/style/style.min.css +1 -0
- 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/style/index.js +1 -0
- package/lib/ui/style/style.css +0 -0
- package/lib/ui/style/style.min.css +0 -0
- package/lib/v-x-e-table/style/index.js +1 -0
- package/lib/v-x-e-table/style/style.css +0 -0
- package/lib/v-x-e-table/style/style.min.css +0 -0
- package/lib/vxe-colgroup/style/index.js +1 -0
- package/lib/vxe-colgroup/style/style.css +0 -0
- package/lib/vxe-colgroup/style/style.min.css +0 -0
- package/lib/vxe-column/style/index.js +1 -0
- package/lib/vxe-column/style/style.css +0 -0
- package/lib/vxe-column/style/style.min.css +0 -0
- package/lib/vxe-grid/style/index.js +1 -0
- package/lib/vxe-grid/style/style.css +86 -0
- package/lib/vxe-grid/style/style.min.css +1 -0
- package/lib/vxe-table/style/index.js +1 -0
- package/lib/vxe-table/style/style.css +3887 -0
- package/lib/vxe-table/style/style.min.css +1 -0
- package/lib/vxe-toolbar/style/index.js +1 -0
- package/lib/vxe-toolbar/style/style.css +110 -0
- package/lib/vxe-toolbar/style/style.min.css +1 -0
- package/lib/vxe-ui/style/index.js +1 -0
- package/lib/vxe-ui/style/style.css +0 -0
- package/lib/vxe-ui/style/style.min.css +0 -0
- package/lib/vxe-v-x-e-table/style/index.js +1 -0
- package/lib/vxe-v-x-e-table/style/style.css +0 -0
- package/lib/vxe-v-x-e-table/style/style.min.css +0 -0
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +23 -18
- package/packages/locale/lang/ar-EG.ts +6 -0
- package/packages/locale/lang/de-DE.ts +6 -0
- package/packages/locale/lang/en-US.ts +6 -0
- package/packages/locale/lang/es-ES.ts +6 -0
- package/packages/locale/lang/fr-FR.ts +6 -0
- package/packages/locale/lang/hu-HU.ts +6 -0
- package/packages/locale/lang/hy-AM.ts +6 -0
- package/packages/locale/lang/id-ID.ts +6 -0
- package/packages/locale/lang/it-IT.ts +6 -0
- package/packages/locale/lang/ja-JP.ts +6 -0
- package/packages/locale/lang/ko-KR.ts +6 -0
- package/packages/locale/lang/ms-MY.ts +6 -0
- package/packages/locale/lang/nb-NO.ts +6 -0
- package/packages/locale/lang/pt-BR.ts +6 -0
- package/packages/locale/lang/ru-RU.ts +6 -0
- package/packages/locale/lang/th-TH.ts +6 -0
- package/packages/locale/lang/ug-CN.ts +6 -0
- package/packages/locale/lang/uk-UA.ts +6 -0
- package/packages/locale/lang/uz-UZ.ts +6 -0
- package/packages/locale/lang/vi-VN.ts +6 -0
- package/packages/locale/lang/zh-CHT.ts +6 -0
- package/packages/locale/lang/zh-CN.ts +6 -0
- package/packages/table/module/custom/hook.ts +24 -9
- package/packages/table/module/custom/panel.ts +15 -14
- package/packages/table/module/edit/hook.ts +3 -3
- package/packages/table/module/export/hook.ts +13 -1
- package/packages/table/module/filter/panel.ts +10 -3
- package/packages/table/module/validator/hook.ts +7 -6
- package/packages/table/render/index.ts +16 -0
- package/packages/table/src/body.ts +12 -5
- package/packages/table/src/emits.ts +1 -0
- package/packages/table/src/props.ts +5 -3
- package/packages/table/src/table.ts +235 -53
- package/packages/table/src/util.ts +25 -9
- package/packages/toolbar/src/toolbar.ts +12 -7
- package/styles/components/table-module/custom.scss +3 -0
- package/styles/components/table-module/filter.scss +1 -1
- package/styles/components/table.scss +8 -2
- package/styles/components/toolbar.scss +5 -1
- package/styles/theme/base.scss +4 -0
|
@@ -6,14 +6,19 @@ const tableCustomMethodKeys = ['openCustom', 'closeCustom', 'getCustomVisible',
|
|
|
6
6
|
VxeUI.hooks.add('tableCustomModule', {
|
|
7
7
|
setupTable($xeTable) {
|
|
8
8
|
const { reactData, internalData } = $xeTable;
|
|
9
|
-
const { computeCustomOpts, computeRowGroupFields } = $xeTable.getComputeMaps();
|
|
9
|
+
const { computeCustomOpts, computeRowGroupFields, computeCustomSimpleMode } = $xeTable.getComputeMaps();
|
|
10
10
|
const { refElem } = $xeTable.getRefMaps();
|
|
11
11
|
const $xeGantt = $xeTable.xeGantt;
|
|
12
|
-
const
|
|
12
|
+
const updatePopupStyle = () => {
|
|
13
13
|
const { customStore } = reactData;
|
|
14
|
+
const customOpts = computeCustomOpts.value;
|
|
15
|
+
const customSimpleMode = computeCustomSimpleMode.value;
|
|
16
|
+
const showCustomSimpleOutside = customSimpleMode === 'outside';
|
|
17
|
+
const { popupOptions } = customOpts;
|
|
18
|
+
const { maxHeight } = popupOptions || {};
|
|
14
19
|
let wrapperEl = refElem.value;
|
|
15
|
-
|
|
16
|
-
let
|
|
20
|
+
let popupTop = 0;
|
|
21
|
+
let popupMaxHeight = 0;
|
|
17
22
|
if ($xeGantt) {
|
|
18
23
|
const { refGanttContainerElem } = $xeGantt.getRefMaps();
|
|
19
24
|
const ganttContainerElem = refGanttContainerElem.value;
|
|
@@ -21,10 +26,21 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
21
26
|
wrapperEl = ganttContainerElem;
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
|
-
if (
|
|
25
|
-
|
|
29
|
+
if (showCustomSimpleOutside) {
|
|
30
|
+
if (wrapperEl) {
|
|
31
|
+
popupTop = wrapperEl.offsetTop;
|
|
32
|
+
}
|
|
33
|
+
popupMaxHeight = XEUtils.eqNull(maxHeight) ? 360 : maxHeight;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
// 判断面板不能大于表格高度
|
|
37
|
+
if (wrapperEl) {
|
|
38
|
+
popupMaxHeight = wrapperEl.clientHeight - 22;
|
|
39
|
+
}
|
|
40
|
+
popupMaxHeight = Math.max(88, popupMaxHeight);
|
|
26
41
|
}
|
|
27
|
-
customStore.
|
|
42
|
+
customStore.popupTop = popupTop;
|
|
43
|
+
customStore.maxHeight = XEUtils.eqNull(maxHeight) ? popupMaxHeight : maxHeight;
|
|
28
44
|
};
|
|
29
45
|
const openCustom = () => {
|
|
30
46
|
const { initStore, customStore } = reactData;
|
|
@@ -32,8 +48,8 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
32
48
|
initStore.custom = true;
|
|
33
49
|
handleUpdateCustomColumn();
|
|
34
50
|
checkCustomStatus();
|
|
35
|
-
|
|
36
|
-
return nextTick().then(() =>
|
|
51
|
+
updatePopupStyle();
|
|
52
|
+
return nextTick().then(() => updatePopupStyle());
|
|
37
53
|
};
|
|
38
54
|
const handleUpdateCustomColumn = () => {
|
|
39
55
|
const { customStore } = reactData;
|
|
@@ -2,7 +2,7 @@ import { h, inject, ref, provide, nextTick, TransitionGroup, reactive, onUnmount
|
|
|
2
2
|
import { defineVxeComponent } from '../../../ui/src/comp';
|
|
3
3
|
import { VxeUI } from '../../../ui';
|
|
4
4
|
import { formatText } from '../../../ui/src/utils';
|
|
5
|
-
import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/dom';
|
|
5
|
+
import { getTpImg, addClass, removeClass, hasControlKey, toCssUnit } from '../../../ui/src/dom';
|
|
6
6
|
import { errLog } from '../../../ui/src/log';
|
|
7
7
|
import XEUtils from 'xe-utils';
|
|
8
8
|
const { getI18n, getIcon, renderEmptyElement } = VxeUI;
|
|
@@ -572,7 +572,7 @@ export default defineVxeComponent({
|
|
|
572
572
|
const customOpts = computeCustomOpts.value;
|
|
573
573
|
const { immediate } = customOpts;
|
|
574
574
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
575
|
-
const { maxHeight } = customStore;
|
|
575
|
+
const { maxHeight, popupTop } = customStore;
|
|
576
576
|
const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement } = customOpts;
|
|
577
577
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
578
578
|
const { isCrossDrag } = columnDragOpts;
|
|
@@ -704,17 +704,18 @@ export default defineVxeComponent({
|
|
|
704
704
|
]));
|
|
705
705
|
}
|
|
706
706
|
});
|
|
707
|
+
const popupStys = {};
|
|
708
|
+
if (maxHeight && !['left', 'right'].includes(placement || '')) {
|
|
709
|
+
popupStys.top = toCssUnit(popupTop);
|
|
710
|
+
popupStys.maxHeight = toCssUnit(maxHeight);
|
|
711
|
+
}
|
|
707
712
|
return h('div', {
|
|
708
713
|
ref: refElem,
|
|
709
714
|
key: 'simple',
|
|
710
715
|
class: ['vxe-table-custom-wrapper', `placement--${placement}`, {
|
|
711
716
|
'is--active': customStore.visible
|
|
712
717
|
}],
|
|
713
|
-
style:
|
|
714
|
-
? {
|
|
715
|
-
maxHeight: `${maxHeight}px`
|
|
716
|
-
}
|
|
717
|
-
: {}
|
|
718
|
+
style: popupStys
|
|
718
719
|
}, customStore.visible
|
|
719
720
|
? [
|
|
720
721
|
h('div', {
|
|
@@ -1029,6 +1030,11 @@ export default defineVxeComponent({
|
|
|
1029
1030
|
}, defaultSlot
|
|
1030
1031
|
? $xeTable.callSlot(defaultSlot, params)
|
|
1031
1032
|
: [
|
|
1033
|
+
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel
|
|
1034
|
+
? h($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
1035
|
+
customStore
|
|
1036
|
+
})
|
|
1037
|
+
: renderEmptyElement($xeTable),
|
|
1032
1038
|
h('div', {
|
|
1033
1039
|
ref: refCustomBodyElem,
|
|
1034
1040
|
class: 'vxe-table-custom-popup--handle-wrapper'
|
|
@@ -1107,12 +1113,7 @@ export default defineVxeComponent({
|
|
|
1107
1113
|
}, $xeTable.callSlot(bottomSlot, params))
|
|
1108
1114
|
: renderEmptyElement($xeTable),
|
|
1109
1115
|
renderDragTip()
|
|
1110
|
-
])
|
|
1111
|
-
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel
|
|
1112
|
-
? h($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
1113
|
-
customStore
|
|
1114
|
-
})
|
|
1115
|
-
: renderEmptyElement($xeTable)
|
|
1116
|
+
])
|
|
1116
1117
|
]);
|
|
1117
1118
|
},
|
|
1118
1119
|
footer: () => {
|
|
@@ -127,7 +127,7 @@ hooks.add('tableEditModule', {
|
|
|
127
127
|
if (treeConfig) {
|
|
128
128
|
throw new Error(getI18n('vxe.error.noTree', ['insert']));
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
errLog(getI18n('vxe.error.noGroup', ['insert']));
|
|
131
131
|
// insertGroupRow(newRecords, false)
|
|
132
132
|
}
|
|
133
133
|
else {
|
|
@@ -159,7 +159,7 @@ hooks.add('tableEditModule', {
|
|
|
159
159
|
if (treeConfig) {
|
|
160
160
|
throw new Error(getI18n('vxe.error.noTree', ['insert']));
|
|
161
161
|
}
|
|
162
|
-
|
|
162
|
+
errLog(getI18n('vxe.error.noGroup', ['insert']));
|
|
163
163
|
// insertGroupRow(newRecords, true)
|
|
164
164
|
}
|
|
165
165
|
else {
|
|
@@ -235,7 +235,7 @@ hooks.add('tableEditModule', {
|
|
|
235
235
|
if (treeConfig) {
|
|
236
236
|
throw new Error(getI18n('vxe.error.noTree', ['insert']));
|
|
237
237
|
}
|
|
238
|
-
|
|
238
|
+
errLog(getI18n('vxe.error.noGroup', ['insert']));
|
|
239
239
|
}
|
|
240
240
|
else {
|
|
241
241
|
if (treeConfig) {
|
|
@@ -1321,7 +1321,21 @@ hooks.add('tableExportModule', {
|
|
|
1321
1321
|
return Promise.resolve((beforeQueryAll || ajaxMethods)(params))
|
|
1322
1322
|
.then(rest => {
|
|
1323
1323
|
const listProp = resConfigs.list;
|
|
1324
|
-
|
|
1324
|
+
let tdData = [];
|
|
1325
|
+
if (listProp) {
|
|
1326
|
+
if (XEUtils.isFunction(listProp)) {
|
|
1327
|
+
tdData = listProp({ data: rest, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
1328
|
+
}
|
|
1329
|
+
else {
|
|
1330
|
+
tdData = XEUtils.isArray(rest) ? rest : XEUtils.get(rest, listProp);
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
else {
|
|
1334
|
+
if (XEUtils.isArray(rest)) {
|
|
1335
|
+
tdData = rest;
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
handleOptions.data = tdData;
|
|
1325
1339
|
if (afterQueryAll) {
|
|
1326
1340
|
afterQueryAll(params);
|
|
1327
1341
|
}
|
|
@@ -205,9 +205,17 @@ export default defineVxeComponent({
|
|
|
205
205
|
const filterOpts = computeFilterOpts.value;
|
|
206
206
|
const hasCheckOption = computeHasCheckOption.value;
|
|
207
207
|
const { filterRender, filterMultiple } = column;
|
|
208
|
+
const { confirmButtonText, resetButtonText, showFooter } = filterOpts;
|
|
208
209
|
const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null;
|
|
209
210
|
const isDisabled = !hasCheckOption && !filterStore.isAllSelected && !filterStore.isIndeterminate;
|
|
210
|
-
|
|
211
|
+
let showFlFoot = !!filterMultiple;
|
|
212
|
+
if (XEUtils.isBoolean(showFooter)) {
|
|
213
|
+
showFlFoot = showFooter;
|
|
214
|
+
}
|
|
215
|
+
else if (compConf) {
|
|
216
|
+
showFlFoot = !(compConf.showTableFilterFooter === false || compConf.showFilterFooter === false || compConf.isFooter === false);
|
|
217
|
+
}
|
|
218
|
+
return showFlFoot
|
|
211
219
|
? [
|
|
212
220
|
h('div', {
|
|
213
221
|
class: 'vxe-table--filter-footer'
|
|
@@ -218,10 +226,10 @@ export default defineVxeComponent({
|
|
|
218
226
|
},
|
|
219
227
|
disabled: isDisabled,
|
|
220
228
|
onClick: confirmFilter
|
|
221
|
-
},
|
|
229
|
+
}, confirmButtonText || getI18n('vxe.table.confirmFilter')),
|
|
222
230
|
h('button', {
|
|
223
231
|
onClick: resetFilter
|
|
224
|
-
},
|
|
232
|
+
}, resetButtonText || getI18n('vxe.table.resetFilter'))
|
|
225
233
|
])
|
|
226
234
|
]
|
|
227
235
|
: [];
|
|
@@ -112,20 +112,21 @@ function validRuleValue(rule, val, required) {
|
|
|
112
112
|
}
|
|
113
113
|
return true;
|
|
114
114
|
}
|
|
115
|
-
function checkRuleStatus(rule, val) {
|
|
116
|
-
const { required } = rule;
|
|
117
|
-
const
|
|
115
|
+
function checkRuleStatus(rule, row, val) {
|
|
116
|
+
const { required, field } = rule;
|
|
117
|
+
const currVal = field ? XEUtils.get(row, field) : val;
|
|
118
|
+
const isEmptyVal = XEUtils.isArray(currVal) ? !currVal.length : eqEmptyValue(currVal);
|
|
118
119
|
if (required) {
|
|
119
120
|
if (isEmptyVal) {
|
|
120
121
|
return false;
|
|
121
122
|
}
|
|
122
|
-
if (!validRuleValue(rule,
|
|
123
|
+
if (!validRuleValue(rule, currVal, required)) {
|
|
123
124
|
return false;
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
else {
|
|
127
128
|
if (!isEmptyVal) {
|
|
128
|
-
if (!validRuleValue(rule,
|
|
129
|
+
if (!validRuleValue(rule, currVal, required)) {
|
|
129
130
|
return false;
|
|
130
131
|
}
|
|
131
132
|
}
|
|
@@ -493,7 +494,7 @@ hooks.add('tableValidatorModule', {
|
|
|
493
494
|
}
|
|
494
495
|
}
|
|
495
496
|
else {
|
|
496
|
-
if (!checkRuleStatus(rule, cellValue)) {
|
|
497
|
+
if (!checkRuleStatus(rule, row, cellValue)) {
|
|
497
498
|
internalData.validRuleErr = true;
|
|
498
499
|
errorRules.push(new Rule(rule));
|
|
499
500
|
}
|
package/es/table/render/index.js
CHANGED
|
@@ -647,6 +647,9 @@ function handleNumberCell(renderOpts, params) {
|
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
649
|
else {
|
|
650
|
+
if (type === 'integer') {
|
|
651
|
+
cellValue = XEUtils.toInteger(cellValue);
|
|
652
|
+
}
|
|
650
653
|
if (showNegativeStatus) {
|
|
651
654
|
if (XEUtils.toNumber(cellValue) < 0) {
|
|
652
655
|
isNegative = true;
|
|
@@ -660,6 +663,16 @@ function handleNumberCell(renderOpts, params) {
|
|
|
660
663
|
}
|
|
661
664
|
: {});
|
|
662
665
|
}
|
|
666
|
+
function handleFormatDatePicker(renderOpts, params) {
|
|
667
|
+
const { props = {} } = renderOpts;
|
|
668
|
+
const { cellValue } = params;
|
|
669
|
+
if (cellValue) {
|
|
670
|
+
if (props.type !== 'time') {
|
|
671
|
+
return getLabelFormatDate(cellValue, props);
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
return cellValue;
|
|
675
|
+
}
|
|
663
676
|
function handleFormatSelect(renderOpts, params) {
|
|
664
677
|
const { cellValue } = params;
|
|
665
678
|
return handleSelectCellValue(cellValue, renderOpts);
|
|
@@ -886,6 +899,7 @@ renderer.mixin({
|
|
|
886
899
|
}
|
|
887
900
|
return getCellLabelVNs(renderOpts, params, cellValue);
|
|
888
901
|
},
|
|
902
|
+
tableCellFormatter: handleFormatDatePicker,
|
|
889
903
|
renderTableDefault: defaultEditRender,
|
|
890
904
|
createTableFilterOptions: defaultFilterOptions,
|
|
891
905
|
renderTableFilter: defaultFilterRender,
|
package/es/table/src/body.js
CHANGED
|
@@ -98,7 +98,7 @@ export default defineVxeComponent({
|
|
|
98
98
|
const $xeGantt = $xeTable.xeGantt;
|
|
99
99
|
const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, treeConfig, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps;
|
|
100
100
|
const { tableData, tableColumn, dragRow, overflowX, overflowY, currentColumn, scrollXLoad, scrollYLoad, mergeBodyFlag, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, editStore, isAllOverflow, validErrorMaps } = tableReactData;
|
|
101
|
-
const { fullAllDataRowIdData, fullColumnIdData, mergeBodyCellMaps, visibleColumn, afterFullData, mergeBodyList, scrollXStore, scrollYStore } = tableInternalData;
|
|
101
|
+
const { fullAllDataRowIdData, fullColumnIdData, mergeBodyCellMaps, visibleColumn, afterFullData, mergeBodyList, scrollXStore, scrollYStore, keepUpdateFieldMaps } = tableInternalData;
|
|
102
102
|
const cellOpts = computeCellOpts.value;
|
|
103
103
|
const validOpts = computeValidOpts.value;
|
|
104
104
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
@@ -118,7 +118,7 @@ export default defineVxeComponent({
|
|
|
118
118
|
const areaOpts = computeAreaOpts.value;
|
|
119
119
|
const cellOffsetWidth = computeCellOffsetWidth.value;
|
|
120
120
|
const { selectCellToRow } = areaOpts;
|
|
121
|
-
const { type, cellRender, editRender, align, showOverflow, className, treeNode, rowResize, padding, verticalAlign, slots } = column;
|
|
121
|
+
const { field, type, cellRender, editRender, align, showOverflow, className, treeNode, rowResize, padding, verticalAlign, slots } = column;
|
|
122
122
|
const { verticalAlign: allVerticalAlign } = cellOpts;
|
|
123
123
|
const { actived } = editStore;
|
|
124
124
|
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
@@ -273,8 +273,8 @@ export default defineVxeComponent({
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
// 如果编辑列开启显示状态
|
|
276
|
-
if (!fixedHiddenColumn && editConfig && (
|
|
277
|
-
isDirty = $xeTable.isUpdateByRow(row,
|
|
276
|
+
if (!fixedHiddenColumn && editConfig && (editOpts.showStatus || editOpts.showUpdateStatus) && keepUpdateFieldMaps[field]) {
|
|
277
|
+
isDirty = $xeTable.isUpdateByRow(row, field);
|
|
278
278
|
}
|
|
279
279
|
const isVNAutoHeight = !hasEllipsis && (scrollYLoad || scrollXLoad);
|
|
280
280
|
let cellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
@@ -544,6 +544,13 @@ export default defineVxeComponent({
|
|
|
544
544
|
const expandOpts = computeExpandOpts.value;
|
|
545
545
|
const { height: expandHeight, padding, mode: expandMode } = expandOpts;
|
|
546
546
|
if (expandMode === 'fixed') {
|
|
547
|
+
const currExpHeight = rowRest.expandHeight;
|
|
548
|
+
let expHeight = 0;
|
|
549
|
+
if (rowExpandHeightFlag) {
|
|
550
|
+
if (currExpHeight || expandHeight) {
|
|
551
|
+
expHeight = (currExpHeight || expandHeight || 0) + 1;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
547
554
|
rows.push(h('tr', {
|
|
548
555
|
class: 'vxe-body--row-expanded-place',
|
|
549
556
|
key: `expand_${rowid}`,
|
|
@@ -553,7 +560,7 @@ export default defineVxeComponent({
|
|
|
553
560
|
class: 'vxe-body--row-expanded-place-column',
|
|
554
561
|
colspan: tableColumn.length,
|
|
555
562
|
style: {
|
|
556
|
-
height: `${
|
|
563
|
+
height: `${expHeight}px`
|
|
557
564
|
}
|
|
558
565
|
})
|
|
559
566
|
]));
|
package/es/table/src/emits.js
CHANGED