Skip to content

Commit 1dc4003

Browse files
committed
releases 4.13.15
1 parent 3ba08e9 commit 1dc4003

File tree

5 files changed

+13
-15
lines changed

5 files changed

+13
-15
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vxe-table",
3-
"version": "4.13.14",
3+
"version": "4.13.15",
44
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
55
"scripts": {
66
"update": "npm install --legacy-peer-deps",
@@ -28,7 +28,7 @@
2828
"style": "lib/style.css",
2929
"typings": "types/index.d.ts",
3030
"dependencies": {
31-
"vxe-pc-ui": "^4.5.32"
31+
"vxe-pc-ui": "^4.5.33"
3232
},
3333
"devDependencies": {
3434
"@types/resize-observer-browser": "^0.1.11",

packages/table/src/footer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default defineComponent({
5858
const defaultRowHeight = computeDefaultRowHeight.value
5959
const cellOpts = computeCellOpts.value
6060
const footerCellOpts = computeFooterCellOpts.value
61-
const currCellHeight = getCellHeight(footerCellOpts.height || cellOpts.height) || defaultRowHeight
61+
const currCellHeight = getCellHeight(footerCellOpts.height) || defaultRowHeight
6262

6363
return tableColumn.map((column, $columnIndex) => {
6464
const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column

packages/table/src/header.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default defineComponent({
5555
const cellOpts = computeCellOpts.value
5656
const defaultRowHeight = computeDefaultRowHeight.value
5757
const headerCellOpts = computeHeaderCellOpts.value
58-
const currCellHeight = getCellHeight(headerCellOpts.height || cellOpts.height) || defaultRowHeight
58+
const currCellHeight = getCellHeight(headerCellOpts.height) || defaultRowHeight
5959
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts
6060

6161
return cols.map((column, $columnIndex) => {

packages/table/src/table.ts

+8-10
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import TableHeaderComponent from './header'
99
import TableFooterComponent from './footer'
1010
import tableProps from './props'
1111
import tableEmits from './emits'
12-
import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId } from './util'
12+
import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getCellHeight } from './util'
1313
import { getSlotVNs } from '../../ui/src/vn'
1414
import { warnLog, errLog } from '../../ui/src/log'
1515
import TableCustomPanelComponent from '../module/custom/panel'
@@ -559,17 +559,15 @@ export default defineComponent({
559559

560560
const computeHeaderCellOpts = computed(() => {
561561
const headerCellOpts = Object.assign({}, getConfig().table.headerCellConfig, props.headerCellConfig)
562-
if (headerCellOpts.height) {
563-
headerCellOpts.height = XEUtils.toNumber(headerCellOpts.height)
564-
}
562+
const cellOpts = computeCellOpts.value
563+
headerCellOpts.height = XEUtils.toNumber(getCellHeight(headerCellOpts.height || cellOpts.height))
565564
return headerCellOpts
566565
})
567566

568567
const computeFooterCellOpts = computed(() => {
569568
const footerCellOpts = Object.assign({}, getConfig().table.footerCellConfig, props.footerCellConfig)
570-
if (footerCellOpts.height) {
571-
footerCellOpts.height = XEUtils.toNumber(footerCellOpts.height)
572-
}
569+
const cellOpts = computeCellOpts.value
570+
footerCellOpts.height = XEUtils.toNumber(getCellHeight(footerCellOpts.height || cellOpts.height))
573571
return footerCellOpts
574572
})
575573

@@ -2292,7 +2290,7 @@ export default defineComponent({
22922290
if (tableElem) {
22932291
tableElem.style.width = tWidth ? `${tWidth}px` : ''
22942292
// 兼容性处理
2295-
tableElem.style.paddingRight = osbWidth && fixedType && (browseObj['-moz'] || browseObj.safari) ? `${osbWidth}px` : ''
2293+
tableElem.style.paddingRight = osbWidth && fixedType && (browseObj.firefox || browseObj.safari) ? `${osbWidth}px` : ''
22962294
}
22972295
const emptyBlockElem = getRefElem(elemStore[`${name}-${layout}-emptyBlock`])
22982296
if (emptyBlockElem) {
@@ -9877,7 +9875,7 @@ export default defineComponent({
98779875
if (isRollX) {
98789876
evnt.preventDefault()
98799877
internalData.inWheelScroll = true
9880-
if (browseObj['-moz'] || browseObj.safari) {
9878+
if (browseObj.firefox || browseObj.safari) {
98819879
const currLeftNum = scrollLeft
98829880
setScrollLeft(xHandleEl, currLeftNum)
98839881
setScrollLeft(bodyScrollElem, currLeftNum)
@@ -9911,7 +9909,7 @@ export default defineComponent({
99119909
if (isRollY) {
99129910
evnt.preventDefault()
99139911
internalData.inWheelScroll = true
9914-
if (browseObj['-moz'] || browseObj.safari) {
9912+
if (browseObj.firefox || browseObj.safari) {
99159913
const currTopNum = scrollTop
99169914
setScrollTop(yHandleEl, currTopNum)
99179915
setScrollTop(bodyScrollElem, currTopNum)

packages/ui/src/dom.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function isScale (val: any) {
5555
}
5656

5757
export function hasClass (elem: any, cls: any) {
58-
return elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls))
58+
return !!(elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls)))
5959
}
6060

6161
export function removeClass (elem: any, cls: any) {

0 commit comments

Comments
 (0)