vxe-table 3.18.10 → 3.18.12
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/style.css +4 -0
- package/es/grid/style.min.css +1 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/body.js +2 -2
- package/es/table/src/cell.js +40 -22
- package/es/table/src/footer.js +2 -2
- package/es/table/src/methods.js +27 -9
- package/es/table/src/props.js +4 -0
- package/es/table/src/table.js +10 -0
- package/es/ui/index.js +12 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-grid/style.css +4 -0
- package/es/vxe-grid/style.min.css +1 -1
- package/lib/grid/style/style.css +4 -0
- package/lib/grid/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +115 -44
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +2 -2
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +55 -29
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/footer.js +2 -2
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/methods.js +29 -9
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +4 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +10 -0
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +12 -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-grid/style/style.css +4 -0
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/src/body.ts +2 -2
- package/packages/table/src/cell.ts +38 -22
- package/packages/table/src/footer.ts +2 -2
- package/packages/table/src/methods.ts +24 -9
- package/packages/table/src/props.ts +4 -0
- package/packages/table/src/table.ts +12 -0
- package/packages/ui/index.ts +11 -0
- package/styles/components/grid.scss +3 -0
- package/styles/theme/base.scss +3 -3
- /package/es/{iconfont.1757464750041.ttf → iconfont.1757987563312.ttf} +0 -0
- /package/es/{iconfont.1757464750041.woff → iconfont.1757987563312.woff} +0 -0
- /package/es/{iconfont.1757464750041.woff2 → iconfont.1757987563312.woff2} +0 -0
- /package/lib/{iconfont.1757464750041.ttf → iconfont.1757987563312.ttf} +0 -0
- /package/lib/{iconfont.1757464750041.woff → iconfont.1757987563312.woff} +0 -0
- /package/lib/{iconfont.1757464750041.woff2 → iconfont.1757987563312.woff2} +0 -0
|
@@ -2806,7 +2806,7 @@ function clearRowDragData ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
2806
2806
|
* @param {Event} evnt 事件
|
|
2807
2807
|
* @param {Row} row 行对象
|
|
2808
2808
|
*/
|
|
2809
|
-
function handleTooltip ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, evnt: MouseEvent, type: 'header' | 'body' | 'footer', tdEl: HTMLTableCellElement, overflowElem: HTMLElement | null, tipElem: HTMLElement | null, params: any) {
|
|
2809
|
+
function handleTooltip ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, evnt: MouseEvent, tipOpts: VxeTablePropTypes.TooltipConfig | VxeTablePropTypes.HeaderTooltipConfig | VxeTablePropTypes.FooterTooltipConfig, type: 'header' | 'body' | 'footer', tdEl: HTMLTableCellElement, overflowElem: HTMLElement | null, tipElem: HTMLElement | null, params: any) {
|
|
2810
2810
|
const reactData = $xeTable as unknown as TableReactData
|
|
2811
2811
|
|
|
2812
2812
|
const tipOverEl = overflowElem || tdEl
|
|
@@ -2815,9 +2815,8 @@ function handleTooltip ($xeTable: VxeTableConstructor & VxeTablePrivateMethods,
|
|
|
2815
2815
|
}
|
|
2816
2816
|
params.cell = tdEl
|
|
2817
2817
|
const { tooltipStore } = reactData
|
|
2818
|
-
const tooltipOpts = $xeTable.computeTooltipOpts
|
|
2819
2818
|
const { column, row } = params
|
|
2820
|
-
const { showAll, contentMethod } =
|
|
2819
|
+
const { showAll, contentMethod } = tipOpts
|
|
2821
2820
|
const customContent = contentMethod ? contentMethod(params) : null
|
|
2822
2821
|
const useCustom = contentMethod && !XEUtils.eqNull(customContent)
|
|
2823
2822
|
const content = useCustom ? customContent : XEUtils.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim()
|
|
@@ -2830,7 +2829,7 @@ function handleTooltip ($xeTable: VxeTableConstructor & VxeTablePrivateMethods,
|
|
|
2830
2829
|
visible: true,
|
|
2831
2830
|
content: tipContent,
|
|
2832
2831
|
type,
|
|
2833
|
-
currOpts:
|
|
2832
|
+
currOpts: tipOpts
|
|
2834
2833
|
})
|
|
2835
2834
|
$xeTable.$nextTick(() => {
|
|
2836
2835
|
const $tooltip = $xeTable.$refs.refTooltip as VxeTooltipInstance
|
|
@@ -7112,6 +7111,7 @@ const Methods = {
|
|
|
7112
7111
|
const reactData = $xeTable as unknown as TableReactData
|
|
7113
7112
|
|
|
7114
7113
|
const { tooltipStore } = reactData
|
|
7114
|
+
const headerTooltipOpts = $xeTable.computeHeaderTooltipOpts
|
|
7115
7115
|
const { column } = params
|
|
7116
7116
|
handleTargetEnterEvent($xeTable, true)
|
|
7117
7117
|
const titleElem = evnt.currentTarget as HTMLDivElement
|
|
@@ -7132,7 +7132,7 @@ const Methods = {
|
|
|
7132
7132
|
}
|
|
7133
7133
|
if (tooltipStore.column !== column || !tooltipStore.visible) {
|
|
7134
7134
|
const ctEl = thEl.querySelector<HTMLElement>('.vxe-cell--title')
|
|
7135
|
-
handleTooltip($xeTable, evnt, 'header', thEl, (hasClass(thEl, 'col--ellipsis') ? ctEl : cWrapperEl) || cWrapperEl, ctEl || cellEl, params)
|
|
7135
|
+
handleTooltip($xeTable, evnt, headerTooltipOpts, 'header', thEl, (hasClass(thEl, 'col--ellipsis') ? ctEl : cWrapperEl) || cWrapperEl, ctEl || cellEl, params)
|
|
7136
7136
|
}
|
|
7137
7137
|
},
|
|
7138
7138
|
/**
|
|
@@ -7146,6 +7146,7 @@ const Methods = {
|
|
|
7146
7146
|
const { editConfig } = props
|
|
7147
7147
|
const { editStore } = reactData
|
|
7148
7148
|
const { tooltipStore } = reactData
|
|
7149
|
+
const tooltipOpts = $xeTable.computeTooltipOpts
|
|
7149
7150
|
const editOpts = $xeTable.computeEditOpts
|
|
7150
7151
|
const { actived } = editStore
|
|
7151
7152
|
const { row, column } = params
|
|
@@ -7172,7 +7173,7 @@ const Methods = {
|
|
|
7172
7173
|
if (!tipEl) {
|
|
7173
7174
|
tipEl = ctEl
|
|
7174
7175
|
}
|
|
7175
|
-
handleTooltip($xeTable, evnt, 'body', tdEl, ovEl || ctEl, tipEl, params)
|
|
7176
|
+
handleTooltip($xeTable, evnt, tooltipOpts, 'body', tdEl, ovEl || ctEl, tipEl, params)
|
|
7176
7177
|
}
|
|
7177
7178
|
},
|
|
7178
7179
|
/**
|
|
@@ -7184,6 +7185,7 @@ const Methods = {
|
|
|
7184
7185
|
|
|
7185
7186
|
const { column } = params
|
|
7186
7187
|
const { tooltipStore } = reactData
|
|
7188
|
+
const footerTooltipOpts = $xeTable.computeFooterTooltipOpts
|
|
7187
7189
|
const tdEl = evnt.currentTarget as HTMLTableCellElement
|
|
7188
7190
|
handleTargetEnterEvent($xeTable, tooltipStore.column !== column || !!tooltipStore.row)
|
|
7189
7191
|
if (tooltipStore.column !== column || !tooltipStore.visible) {
|
|
@@ -7196,7 +7198,7 @@ const Methods = {
|
|
|
7196
7198
|
if (!tipEl) {
|
|
7197
7199
|
tipEl = ctEl
|
|
7198
7200
|
}
|
|
7199
|
-
handleTooltip($xeTable, evnt, 'footer', tdEl, ovEl || ctEl, tipEl, params)
|
|
7201
|
+
handleTooltip($xeTable, evnt, footerTooltipOpts, 'footer', tdEl, ovEl || ctEl, tipEl, params)
|
|
7200
7202
|
}
|
|
7201
7203
|
},
|
|
7202
7204
|
openTooltip (target: HTMLElement, content: string | number) {
|
|
@@ -7532,7 +7534,7 @@ const Methods = {
|
|
|
7532
7534
|
}
|
|
7533
7535
|
}
|
|
7534
7536
|
}
|
|
7535
|
-
if (!checkMethod || checkMethod({ $table: $xeTable, row })) {
|
|
7537
|
+
if (isRowGroupStatus || !checkMethod || checkMethod({ $table: $xeTable, row })) {
|
|
7536
7538
|
$xeTable.handleBatchSelectRows([row], checked)
|
|
7537
7539
|
$xeTable.checkSelectionStatus()
|
|
7538
7540
|
$xeTable.dispatchEvent('checkbox-change', Object.assign({
|
|
@@ -7719,6 +7721,8 @@ const Methods = {
|
|
|
7719
7721
|
const { treeConfig } = props
|
|
7720
7722
|
const { isRowGroupStatus } = reactData
|
|
7721
7723
|
const { afterFullData, afterTreeFullData, afterGroupFullData, checkboxReserveRowMap, selectCheckboxMaps, treeIndeterminateRowMaps } = internalData
|
|
7724
|
+
const aggregateOpts = $xeTable.computeAggregateOpts
|
|
7725
|
+
const { mapChildrenField } = aggregateOpts
|
|
7722
7726
|
const checkboxOpts = $xeTable.computeCheckboxOpts
|
|
7723
7727
|
const { checkField, checkMethod, showReserveStatus } = checkboxOpts
|
|
7724
7728
|
const { handleGetRowId } = createHandleGetRowId($xeTable)
|
|
@@ -7734,7 +7738,18 @@ const Methods = {
|
|
|
7734
7738
|
? row => {
|
|
7735
7739
|
const childRowid = handleGetRowId(row)
|
|
7736
7740
|
const selected = checkField ? XEUtils.get(row, checkField) : selectCheckboxMaps[childRowid]
|
|
7737
|
-
if (
|
|
7741
|
+
if (isRowGroupStatus && $xeTable.isAggregateRecord(row)) {
|
|
7742
|
+
const childList: any[] = row[mapChildrenField || '']
|
|
7743
|
+
if (selected) {
|
|
7744
|
+
vLen++
|
|
7745
|
+
sLen++
|
|
7746
|
+
} else if (treeIndeterminateRowMaps[childRowid]) {
|
|
7747
|
+
vLen++
|
|
7748
|
+
hLen++
|
|
7749
|
+
} else if (childList && childList.length && childList.some(item => checkMethod({ $table: $xeTable, row: item }))) {
|
|
7750
|
+
vLen++
|
|
7751
|
+
}
|
|
7752
|
+
} else if (checkMethod({ $table: $xeTable, row })) {
|
|
7738
7753
|
if (selected) {
|
|
7739
7754
|
sLen++
|
|
7740
7755
|
} else if (treeIndeterminateRowMaps[childRowid]) {
|
|
@@ -235,6 +235,10 @@ export const tableProps = {
|
|
|
235
235
|
checkboxConfig: Object as PropType<VxeTablePropTypes.CheckboxConfig>,
|
|
236
236
|
// tooltip 配置项
|
|
237
237
|
tooltipConfig: Object as PropType<VxeTablePropTypes.TooltipConfig>,
|
|
238
|
+
// 表头 tooltip 配置项
|
|
239
|
+
headerTooltipConfig: Object as PropType<VxeTablePropTypes.HeaderTooltipConfig>,
|
|
240
|
+
// 表尾 tooltip 配置项
|
|
241
|
+
footerTooltipConfig: Object as PropType<VxeTablePropTypes.FooterTooltipConfig>,
|
|
238
242
|
// 导出配置项
|
|
239
243
|
exportConfig: [Boolean, Object],
|
|
240
244
|
// 导入配置项
|
|
@@ -1079,6 +1079,18 @@ export default {
|
|
|
1079
1079
|
tipConfig () {
|
|
1080
1080
|
return { ...this.tooltipOpts }
|
|
1081
1081
|
},
|
|
1082
|
+
computeHeaderTooltipOpts () {
|
|
1083
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
1084
|
+
const props = $xeTable
|
|
1085
|
+
|
|
1086
|
+
return Object.assign({}, getConfig().tooltip, getConfig().table.headerTooltipConfig, props.headerTooltipConfig)
|
|
1087
|
+
},
|
|
1088
|
+
computeFooterTooltipOpts () {
|
|
1089
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
1090
|
+
const props = $xeTable
|
|
1091
|
+
|
|
1092
|
+
return Object.assign({}, getConfig().tooltip, getConfig().table.footerTooltipConfig, props.footerTooltipConfig)
|
|
1093
|
+
},
|
|
1082
1094
|
computeTableTipConfig () {
|
|
1083
1095
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
1084
1096
|
const reactData = $xeTable as unknown as TableReactData
|
package/packages/ui/index.ts
CHANGED
|
@@ -69,6 +69,12 @@ VxeUI.setConfig({
|
|
|
69
69
|
tooltipConfig: {
|
|
70
70
|
enterable: true
|
|
71
71
|
},
|
|
72
|
+
headerTooltipConfig: {
|
|
73
|
+
enterable: true
|
|
74
|
+
},
|
|
75
|
+
footerTooltipConfig: {
|
|
76
|
+
enterable: true
|
|
77
|
+
},
|
|
72
78
|
validConfig: {
|
|
73
79
|
showMessage: true,
|
|
74
80
|
autoClear: true,
|
|
@@ -78,6 +84,11 @@ VxeUI.setConfig({
|
|
|
78
84
|
theme: 'beautify'
|
|
79
85
|
},
|
|
80
86
|
columnConfig: {
|
|
87
|
+
autoOptions: {
|
|
88
|
+
isCalcHeader: true,
|
|
89
|
+
isCalcBody: true,
|
|
90
|
+
isCalcFooter: true
|
|
91
|
+
},
|
|
81
92
|
maxFixedSize: 4
|
|
82
93
|
},
|
|
83
94
|
cellConfig: {
|
package/styles/theme/base.scss
CHANGED
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
--vxe-ui-table-column-icon-border-color: #c0c4cc;
|
|
40
40
|
--vxe-ui-table-column-icon-border-hover-color: #515A6E;
|
|
41
41
|
|
|
42
|
-
--vxe-ui-table-cell-padding-default:
|
|
43
|
-
--vxe-ui-table-cell-padding-medium:
|
|
42
|
+
--vxe-ui-table-cell-padding-default: 8px;
|
|
43
|
+
--vxe-ui-table-cell-padding-medium: 7px;
|
|
44
44
|
--vxe-ui-table-cell-padding-small: 6px;
|
|
45
|
-
--vxe-ui-table-cell-padding-mini:
|
|
45
|
+
--vxe-ui-table-cell-padding-mini: 5px;
|
|
46
46
|
--vxe-ui-table-cell-placeholder-color: #C0C4CC;
|
|
47
47
|
--vxe-ui-table-cell-negative-color: #f56c6c;
|
|
48
48
|
--vxe-ui-table-cell-input-height-default: var(--vxe-ui-table-row-height-default) - 6;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|