vxe-table 4.7.49 → 4.7.50
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/src/grid.js +3 -3
- package/es/style.css +1 -1
- package/es/table/src/cell.js +39 -4
- package/es/table/src/column.js +2 -0
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/table.js +1 -1
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +3 -3
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +43 -11
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/cell.js +33 -4
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +2 -0
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +1 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +2 -2
- 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 +3 -3
- package/packages/table/src/cell.ts +47 -5
- package/packages/table/src/column.ts +2 -0
- package/packages/table/src/columnInfo.ts +1 -0
- package/packages/table/src/table.ts +1 -1
- /package/es/{iconfont.1720780228287.ttf → iconfont.1720872721039.ttf} +0 -0
- /package/es/{iconfont.1720780228287.woff → iconfont.1720872721039.woff} +0 -0
- /package/es/{iconfont.1720780228287.woff2 → iconfont.1720872721039.woff2} +0 -0
- /package/lib/{iconfont.1720780228287.ttf → iconfont.1720872721039.ttf} +0 -0
- /package/lib/{iconfont.1720780228287.woff → iconfont.1720872721039.woff} +0 -0
- /package/lib/{iconfont.1720780228287.woff2 → iconfont.1720872721039.woff2} +0 -0
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const log=_core.VxeUI["log"],version="table v4.7.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const log=_core.VxeUI["log"],version="table v4.7.50",warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.50",
|
|
4
4
|
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"style": "lib/style.css",
|
|
29
29
|
"typings": "types/index.d.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"vxe-pc-ui": "^4.0.
|
|
31
|
+
"vxe-pc-ui": "^4.0.67"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/resize-observer-browser": "^0.1.11",
|
|
@@ -184,9 +184,9 @@ export default defineComponent({
|
|
|
184
184
|
const tableProps = Object.assign({}, tableExtendProps)
|
|
185
185
|
if (isZMax) {
|
|
186
186
|
if (tableExtendProps.maxHeight) {
|
|
187
|
-
tableProps.maxHeight = '
|
|
187
|
+
tableProps.maxHeight = '100%'
|
|
188
188
|
} else {
|
|
189
|
-
tableProps.height = '
|
|
189
|
+
tableProps.height = '100%'
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
@@ -1125,7 +1125,7 @@ export default defineComponent({
|
|
|
1125
1125
|
const topWrapper = refTopWrapper.value
|
|
1126
1126
|
const bottomWrapper = refBottomWrapper.value
|
|
1127
1127
|
const pagerWrapper = refPagerWrapper.value
|
|
1128
|
-
const parentPaddingSize = isZMax || !(height === 'auto' || height === '
|
|
1128
|
+
const parentPaddingSize = isZMax || !(height === 'auto' || height === '100%') ? 0 : getPaddingTopBottomSize(el.parentNode as HTMLElement)
|
|
1129
1129
|
return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper)
|
|
1130
1130
|
},
|
|
1131
1131
|
getParentHeight () {
|
|
@@ -6,9 +6,9 @@ import { updateCellTitle } from '../../ui/src/dom'
|
|
|
6
6
|
import { createColumn, getRowid } from './util'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
|
|
9
|
-
import type { VxeTableConstructor, VxeTableDefines, VxeTablePrivateMethods, VxeComponentSlotType } from '../../../types'
|
|
9
|
+
import type { VxeTableConstructor, VxeTableDefines, VxeColumnPropTypes, VxeTablePrivateMethods, VxeComponentSlotType } from '../../../types'
|
|
10
10
|
|
|
11
|
-
const { getI18n, getIcon, renderer } = VxeUI
|
|
11
|
+
const { getI18n, getIcon, renderer, formats } = VxeUI
|
|
12
12
|
|
|
13
13
|
function renderTitlePrefixIcon (params: VxeTableDefines.CellRenderHeaderParams) {
|
|
14
14
|
const { $table, column } = params
|
|
@@ -94,9 +94,28 @@ function renderTitleContent (params: VxeTableDefines.CellRenderHeaderParams, con
|
|
|
94
94
|
]
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
function formatFooterLabel (footerFormatter: VxeColumnPropTypes.FooterFormatter, params: {
|
|
98
|
+
itemValue: any
|
|
99
|
+
column: VxeTableDefines.ColumnInfo
|
|
100
|
+
row: any
|
|
101
|
+
items: any[]
|
|
102
|
+
_columnIndex: number
|
|
103
|
+
}) {
|
|
104
|
+
if (XEUtils.isFunction(footerFormatter)) {
|
|
105
|
+
return footerFormatter(params)
|
|
106
|
+
}
|
|
107
|
+
const isArr = XEUtils.isArray(footerFormatter)
|
|
108
|
+
const gFormatOpts = isArr ? formats.get(footerFormatter[0]) : formats.get(footerFormatter)
|
|
109
|
+
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null
|
|
110
|
+
if (footerFormatMethod) {
|
|
111
|
+
return isArr ? footerFormatMethod(params, ...footerFormatter.slice(1)) : footerFormatMethod(params)
|
|
112
|
+
}
|
|
113
|
+
return ''
|
|
114
|
+
}
|
|
115
|
+
|
|
97
116
|
function getFooterContent (params: VxeTableDefines.CellRenderFooterParams) {
|
|
98
117
|
const { $table, column, _columnIndex, items, row } = params
|
|
99
|
-
const { slots, editRender, cellRender } = column
|
|
118
|
+
const { slots, editRender, cellRender, footerFormatter } = column
|
|
100
119
|
const renderOpts = editRender || cellRender
|
|
101
120
|
const footerSlot = slots ? slots.footer : null
|
|
102
121
|
if (footerSlot) {
|
|
@@ -111,11 +130,34 @@ function getFooterContent (params: VxeTableDefines.CellRenderFooterParams) {
|
|
|
111
130
|
}
|
|
112
131
|
}
|
|
113
132
|
}
|
|
133
|
+
let itemValue = ''
|
|
114
134
|
// 兼容老模式
|
|
115
135
|
if (XEUtils.isArray(items)) {
|
|
116
|
-
|
|
136
|
+
itemValue = items[_columnIndex]
|
|
137
|
+
return [
|
|
138
|
+
footerFormatter
|
|
139
|
+
? formatFooterLabel(footerFormatter, {
|
|
140
|
+
itemValue,
|
|
141
|
+
column,
|
|
142
|
+
row,
|
|
143
|
+
items,
|
|
144
|
+
_columnIndex
|
|
145
|
+
})
|
|
146
|
+
: formatText(itemValue, 1)
|
|
147
|
+
]
|
|
117
148
|
}
|
|
118
|
-
|
|
149
|
+
itemValue = XEUtils.get(row, column.field)
|
|
150
|
+
return [
|
|
151
|
+
footerFormatter
|
|
152
|
+
? formatFooterLabel(footerFormatter, {
|
|
153
|
+
itemValue,
|
|
154
|
+
column,
|
|
155
|
+
row,
|
|
156
|
+
items,
|
|
157
|
+
_columnIndex
|
|
158
|
+
})
|
|
159
|
+
: formatText(itemValue, 1)
|
|
160
|
+
]
|
|
119
161
|
}
|
|
120
162
|
|
|
121
163
|
function getDefaultCellLabel (params: VxeTableDefines.CellRenderBodyParams) {
|
|
@@ -43,6 +43,8 @@ export const columnProps = {
|
|
|
43
43
|
footerClassName: [String, Function] as PropType<VxeColumnPropTypes.FooterClassName>,
|
|
44
44
|
// 格式化显示内容
|
|
45
45
|
formatter: [Function, Array, String] as PropType<VxeColumnPropTypes.Formatter<any>>,
|
|
46
|
+
// 格式化表尾显示内容
|
|
47
|
+
footerFormatter: [Function, Array, String] as PropType<VxeColumnPropTypes.FooterFormatter>,
|
|
46
48
|
// 是否允许排序
|
|
47
49
|
sortable: Boolean as PropType<VxeColumnPropTypes.Sortable>,
|
|
48
50
|
// 自定义排序的属性
|
|
@@ -890,7 +890,7 @@ export default defineComponent({
|
|
|
890
890
|
const val = props[key]
|
|
891
891
|
let num = 0
|
|
892
892
|
if (val) {
|
|
893
|
-
if (val === '
|
|
893
|
+
if (val === '100%' || val === 'auto') {
|
|
894
894
|
num = parentHeight
|
|
895
895
|
} else {
|
|
896
896
|
const excludeHeight = $xeTable.getExcludeHeight()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|