vxe-table 4.21.7 → 4.21.9
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 +52 -15
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/en-US.js +2 -2
- package/es/locale/lang/zh-CHT.js +2 -2
- package/es/locale/lang/zh-CN.js +2 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/cell.js +39 -5
- package/es/table/src/table.js +3 -0
- package/es/toolbar/style.css +2 -0
- package/es/toolbar/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-toolbar/style.css +2 -0
- package/es/vxe-toolbar/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +42 -8
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -2
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -2
- package/lib/locale/lang/zh-CHT.js +2 -2
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -2
- package/lib/locale/lang/zh-CN.js +2 -2
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -2
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/cell.js +37 -3
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/table.js +1 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/toolbar/style/style.css +2 -0
- package/lib/toolbar/style/style.min.css +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/vxe-toolbar/style/style.css +2 -0
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/en-US.ts +2 -2
- package/packages/locale/lang/zh-CHT.ts +2 -2
- package/packages/locale/lang/zh-CN.ts +2 -2
- package/packages/table/src/cell.ts +51 -5
- package/packages/table/src/table.ts +3 -0
- package/styles/components/toolbar.scss +2 -0
- /package/es/{iconfont.1788696081971.ttf → iconfont.1788956877759.ttf} +0 -0
- /package/es/{iconfont.1788696081971.woff → iconfont.1788956877759.woff} +0 -0
- /package/es/{iconfont.1788696081971.woff2 → iconfont.1788956877759.woff2} +0 -0
- /package/lib/{iconfont.1788696081971.ttf → iconfont.1788956877759.ttf} +0 -0
- /package/lib/{iconfont.1788696081971.woff → iconfont.1788956877759.woff} +0 -0
- /package/lib/{iconfont.1788696081971.woff2 → iconfont.1788956877759.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import XEUtils from 'xe-utils';
|
|
|
4
4
|
import DomZIndex from 'dom-zindex';
|
|
5
5
|
import { defineComponent, watch, reactive, h, ref, inject, createCommentVNode, onMounted, onUnmounted, provide, nextTick, TransitionGroup, computed, Teleport, resolveComponent, onActivated, onDeactivated, onBeforeUnmount } from 'vue';
|
|
6
6
|
|
|
7
|
-
const { getConfig: getConfig$
|
|
7
|
+
const { getConfig: getConfig$a } = VxeUI;
|
|
8
8
|
function isEnableConf(conf) {
|
|
9
9
|
return conf && conf.enabled !== false;
|
|
10
10
|
}
|
|
@@ -31,11 +31,11 @@ function getFuncText(content, args) {
|
|
|
31
31
|
if (XEUtils.eqNull(content)) {
|
|
32
32
|
return '';
|
|
33
33
|
}
|
|
34
|
-
const translate = getConfig$
|
|
34
|
+
const translate = getConfig$a().translate;
|
|
35
35
|
return `${translate ? translate('' + content, args) : content}`;
|
|
36
36
|
}
|
|
37
37
|
function formatText(value, placeholder) {
|
|
38
|
-
return '' + (isEmptyValue(value) ? (placeholder ? getConfig$
|
|
38
|
+
return '' + (isEmptyValue(value) ? (placeholder ? getConfig$a().emptyCell : '') : value);
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* 判断值为:'' | null | undefined 时都属于空值
|
|
@@ -47,7 +47,7 @@ function getDefaultConfig(val1, def1) {
|
|
|
47
47
|
return XEUtils.eqNull(val1) ? def1 : val1;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
const version = "4.21.
|
|
50
|
+
const version = "4.21.9";
|
|
51
51
|
VxeUI.version = version;
|
|
52
52
|
VxeUI.tableVersion = version;
|
|
53
53
|
VxeUI.setConfig({
|
|
@@ -441,7 +441,7 @@ VxeUI.setIcon({
|
|
|
441
441
|
const setTheme = VxeUI.setTheme;
|
|
442
442
|
const getTheme = VxeUI.getTheme;
|
|
443
443
|
const setConfig = VxeUI.setConfig;
|
|
444
|
-
const getConfig$
|
|
444
|
+
const getConfig$9 = VxeUI.getConfig;
|
|
445
445
|
const setIcon = VxeUI.setIcon;
|
|
446
446
|
const getIcon$8 = VxeUI.getIcon;
|
|
447
447
|
const setLanguage = VxeUI.setLanguage;
|
|
@@ -931,7 +931,7 @@ function getPopupWrapperElement(panelElem) {
|
|
|
931
931
|
}
|
|
932
932
|
|
|
933
933
|
const { log } = VxeUI;
|
|
934
|
-
const tableVersion = `table v${"4.21.
|
|
934
|
+
const tableVersion = `table v${"4.21.9"}`;
|
|
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}` : '';
|
|
@@ -2253,7 +2253,7 @@ function getSlotVNs(vns) {
|
|
|
2253
2253
|
return [vns];
|
|
2254
2254
|
}
|
|
2255
2255
|
|
|
2256
|
-
const { getI18n: getI18n$c, getIcon: getIcon$7, renderer: renderer$a, renderEmptyElement: renderEmptyElement$a } = VxeUI;
|
|
2256
|
+
const { getConfig: getConfig$8, getI18n: getI18n$c, getIcon: getIcon$7, renderer: renderer$a, renderEmptyElement: renderEmptyElement$a } = VxeUI;
|
|
2257
2257
|
function renderTitlePrefixIcon(params) {
|
|
2258
2258
|
const { $table, column } = params;
|
|
2259
2259
|
const titlePrefix = column.titlePrefix || column.titleHelp;
|
|
@@ -2528,9 +2528,12 @@ function renderHeaderHandle(params) {
|
|
|
2528
2528
|
const tableProps = $table.props;
|
|
2529
2529
|
const { editConfig } = tableProps;
|
|
2530
2530
|
const { type, filters, sortable, editRender, slots } = column;
|
|
2531
|
-
|
|
2532
|
-
if (
|
|
2533
|
-
|
|
2531
|
+
// 兼容已废弃方式
|
|
2532
|
+
if (getConfig$8().tableHeadeSlotToTitleSlot !== 'obsolete') {
|
|
2533
|
+
const headerSlot = slots ? slots.header : null;
|
|
2534
|
+
if (headerSlot) {
|
|
2535
|
+
return renderTitleContent(params, $table.callSlot(headerSlot, params));
|
|
2536
|
+
}
|
|
2534
2537
|
}
|
|
2535
2538
|
switch (type) {
|
|
2536
2539
|
case 'seq':
|
|
@@ -2590,11 +2593,18 @@ const Cell = {
|
|
|
2590
2593
|
const { $table, column } = params;
|
|
2591
2594
|
const tableProps = $table.props;
|
|
2592
2595
|
const { editConfig } = tableProps;
|
|
2593
|
-
const { editRender, cellRender } = column;
|
|
2596
|
+
const { slots, editRender, cellRender } = column;
|
|
2594
2597
|
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
2595
2598
|
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
2596
2599
|
const cellRenderOpts = isEnableConf(cellRender) ? cellRender : null;
|
|
2597
2600
|
const renderOpts = editRenderOpts || cellRenderOpts;
|
|
2601
|
+
// 兼容已废弃方式
|
|
2602
|
+
if (getConfig$8().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
2603
|
+
const headerSlot = slots ? slots.header : null;
|
|
2604
|
+
if (headerSlot) {
|
|
2605
|
+
return renderTitleContent(params, $table.callSlot(headerSlot, params));
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2598
2608
|
if (renderOpts) {
|
|
2599
2609
|
const compConf = renderer$a.get(renderOpts.name);
|
|
2600
2610
|
if (compConf) {
|
|
@@ -2863,6 +2873,12 @@ const Cell = {
|
|
|
2863
2873
|
*/
|
|
2864
2874
|
renderSeqHeader(params) {
|
|
2865
2875
|
const { $table, column } = params;
|
|
2876
|
+
// 兼容已废弃方式
|
|
2877
|
+
if (getConfig$8().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
2878
|
+
const { slots } = column;
|
|
2879
|
+
const headerSlot = slots ? slots.header : null;
|
|
2880
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : $table.getHeaderCellLabel(column)));
|
|
2881
|
+
}
|
|
2866
2882
|
return renderHeaderCellBaseVNs(params, renderTitleContent(params, $table.getHeaderCellLabel(column)));
|
|
2867
2883
|
},
|
|
2868
2884
|
renderSeqCell(params) {
|
|
@@ -2892,6 +2908,17 @@ const Cell = {
|
|
|
2892
2908
|
const { $table, column } = params;
|
|
2893
2909
|
const { slots } = column;
|
|
2894
2910
|
const titleSlot = slots ? slots.title : null;
|
|
2911
|
+
// 兼容已废弃方式
|
|
2912
|
+
if (getConfig$8().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
2913
|
+
const headerSlot = slots ? slots.header : null;
|
|
2914
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot
|
|
2915
|
+
? $table.callSlot(headerSlot, params)
|
|
2916
|
+
: [
|
|
2917
|
+
h('span', {
|
|
2918
|
+
class: 'vxe-radio--label'
|
|
2919
|
+
}, titleSlot ? $table.callSlot(titleSlot, params) : $table.getHeaderCellLabel(column))
|
|
2920
|
+
]));
|
|
2921
|
+
}
|
|
2895
2922
|
return renderHeaderCellBaseVNs(params, renderTitleContent(params, [
|
|
2896
2923
|
h('span', {
|
|
2897
2924
|
class: 'vxe-radio--label'
|
|
@@ -2973,6 +3000,13 @@ const Cell = {
|
|
|
2973
3000
|
};
|
|
2974
3001
|
}
|
|
2975
3002
|
const checkboxParams = Object.assign(Object.assign({}, params), { checked: isAllCheckboxSelected, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate });
|
|
3003
|
+
// 兼容已废弃方式
|
|
3004
|
+
if (getConfig$8().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
3005
|
+
const headerSlot = slots ? slots.header : null;
|
|
3006
|
+
if (headerSlot) {
|
|
3007
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, $table.callSlot(headerSlot, checkboxParams)));
|
|
3008
|
+
}
|
|
3009
|
+
}
|
|
2976
3010
|
if (checkStrictly ? !showHeader : showHeader === false) {
|
|
2977
3011
|
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [
|
|
2978
3012
|
h('span', {
|
|
@@ -30386,6 +30420,9 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30386
30420
|
if (mouseOpts.area && areaOpts.selectCellByHeader && columnOpts.drag && columnDragOpts.trigger === 'cell') {
|
|
30387
30421
|
errLog$2('vxe.error.notSupportProp', ['area-config.selectCellByHeader & column-config.drag', 'column-drag-config.trigger=cell', 'column-drag-config.trigger=default | area-config.selectCellByHeader=false']);
|
|
30388
30422
|
}
|
|
30423
|
+
if (mouseOpts.area && props.spanMethod) {
|
|
30424
|
+
errLog$2('vxe.error.notSupportProp', ['mouse-config.area', 'span-method', 'merge-cells']);
|
|
30425
|
+
}
|
|
30389
30426
|
}
|
|
30390
30427
|
if (!$xeTable.handlePivotTableAggData) {
|
|
30391
30428
|
if (customOpts.allowGroup) {
|
|
@@ -33724,7 +33761,7 @@ var zhCN = {
|
|
|
33724
33761
|
mergeErr: '无法对合并单元格进行该操作',
|
|
33725
33762
|
multiErr: '无法对多重选择区域进行该操作',
|
|
33726
33763
|
selectErr: '无法操作指定区域的单元格',
|
|
33727
|
-
extendErr: '
|
|
33764
|
+
extendErr: '若要执行此操作,所有合并的单元格需大小相同',
|
|
33728
33765
|
pasteMultiErr: '无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作',
|
|
33729
33766
|
cpInvalidErr: '该操作无法进行,您选择的区域中存在被禁止的列({0})'
|
|
33730
33767
|
},
|
|
@@ -33876,7 +33913,7 @@ var zhCN = {
|
|
|
33876
33913
|
area: {
|
|
33877
33914
|
mergeErr: '无法对合并单元格进行该操作',
|
|
33878
33915
|
multiErr: '无法对多重选择区域进行该操作',
|
|
33879
|
-
extendErr: '
|
|
33916
|
+
extendErr: '若要执行此操作,所有合并的单元格需大小相同',
|
|
33880
33917
|
pasteMultiErr: '无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作'
|
|
33881
33918
|
},
|
|
33882
33919
|
fnr: {
|
|
@@ -34007,7 +34044,7 @@ var VxeUITableExport = /*#__PURE__*/Object.freeze({
|
|
|
34007
34044
|
commands: commands$2,
|
|
34008
34045
|
config: config,
|
|
34009
34046
|
formats: formats$2,
|
|
34010
|
-
getConfig: getConfig$
|
|
34047
|
+
getConfig: getConfig$9,
|
|
34011
34048
|
getI18n: getI18n$e,
|
|
34012
34049
|
getIcon: getIcon$8,
|
|
34013
34050
|
getTheme: getTheme,
|
|
@@ -34035,4 +34072,4 @@ var VxeUITableExport = /*#__PURE__*/Object.freeze({
|
|
|
34035
34072
|
version: version
|
|
34036
34073
|
});
|
|
34037
34074
|
|
|
34038
|
-
export { Colgroup, Column, Grid, Table, Toolbar, VXETable, VxeColgroup, VxeColumn, VxeGrid, VxeTable, VxeToolbar, _t, clipboard, commands$2 as commands, config, VxeUITableExport as default, formats$2 as formats, getConfig$
|
|
34075
|
+
export { Colgroup, Column, Grid, Table, Toolbar, VXETable, VxeColgroup, VxeColumn, VxeGrid, VxeTable, VxeToolbar, _t, clipboard, commands$2 as commands, config, VxeUITableExport as default, formats$2 as formats, getConfig$9 as getConfig, getI18n$e as getI18n, getIcon$8 as getIcon, getTheme, globalEvents$3 as globalEvents, globalResize$1 as globalResize, hooks$8 as hooks, install, interceptor$1 as interceptor, log$1 as log, menus$1 as menus, modal, print, readFile, renderer$c as renderer, saveFile, setConfig, setI18n, setIcon, setLanguage, setTheme, setup, t, use, validators$1 as validators, version };
|