Skip to content

Commit

Permalink
releases 4.7.93
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Oct 21, 2024
1 parent a595c15 commit 81cac95
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-table",
"version": "4.7.92",
"version": "4.7.93",
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down Expand Up @@ -28,7 +28,7 @@
"style": "lib/style.css",
"typings": "types/index.d.ts",
"dependencies": {
"vxe-pc-ui": "^4.2.24"
"vxe-pc-ui": "^4.2.26"
},
"devDependencies": {
"@types/resize-observer-browser": "^0.1.11",
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default defineComponent({
let hasEllipsis = showTitle || showTooltip || showEllipsis
let isDirty
const tdOns: any = {}
const cellAlign = align || allAlign
const cellAlign = align || (compConf ? compConf.tableCellAlign : '') || allAlign
const errorValidItem = validErrorMaps[`${rowid}:${colid}`]
const showValidTip = editRules && validOpts.showMessage && (validOpts.message === 'default' ? (height || tableData.length > 1) : validOpts.message === 'inline')
const attrs: any = { colid }
Expand Down
9 changes: 7 additions & 2 deletions packages/table/src/footer.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { createCommentVNode, defineComponent, h, ref, Ref, PropType, inject, nextTick, onMounted, onUnmounted } from 'vue'
import XEUtils from 'xe-utils'
import { VxeUI } from '../../ui'
import { updateCellTitle, getPropClass } from '../../ui/src/dom'

import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeColumnPropTypes, VxeTableDefines } from '../../../types'

const { renderer } = VxeUI

const renderType = 'footer'

function mergeFooterMethod (mergeFooterList: VxeTableDefines.MergeItem[], _rowIndex: number, _columnIndex: number) {
Expand Down Expand Up @@ -180,12 +183,14 @@ export default defineComponent({
class: ['vxe-footer--row', footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''],
style: footerRowStyle ? (XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle) : null
}, tableColumn.map((column, $columnIndex) => {
const { type, showFooterOverflow, footerAlign, align, footerClassName } = column
const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column
const renderOpts = editRender || cellRender
const compConf = renderOpts ? renderer.get(renderOpts.name) : null
const showAllTip = tooltipOpts.showAll
const isColGroup = column.children && column.children.length
const fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX
const footOverflow = XEUtils.eqNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow
const footAlign = footerAlign || align || allFooterAlign || allAlign
const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign
let showEllipsis = footOverflow === 'ellipsis'
const showTitle = footOverflow === 'title'
const showTooltip = footOverflow === true || footOverflow === 'tooltip'
Expand Down
9 changes: 7 additions & 2 deletions packages/table/src/header.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { createCommentVNode, defineComponent, h, ref, Ref, PropType, inject, nextTick, watch, onMounted, onUnmounted } from 'vue'
import XEUtils from 'xe-utils'
import { VxeUI } from '../../ui'
import { convertHeaderColumnToRows, getColReMinWidth } from './util'
import { hasClass, getOffsetPos, addClass, removeClass } from '../../ui/src/dom'

import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeTableDefines, VxeColumnPropTypes } from '../../../types'

const { renderer } = VxeUI

const renderType = 'header'

export default defineComponent({
Expand Down Expand Up @@ -228,12 +231,14 @@ export default defineComponent({
class: ['vxe-header--row', headerRowClassName ? (XEUtils.isFunction(headerRowClassName) ? headerRowClassName({ $table: $xeTable, $rowIndex, fixed: fixedType, type: renderType }) : headerRowClassName) : ''],
style: headerRowStyle ? (XEUtils.isFunction(headerRowStyle) ? headerRowStyle({ $table: $xeTable, $rowIndex, fixed: fixedType, type: renderType }) : headerRowStyle) : null
}, cols.map((column, $columnIndex) => {
const { type, showHeaderOverflow, headerAlign, align, headerClassName } = column
const { type, showHeaderOverflow, headerAlign, align, headerClassName, editRender, cellRender } = column
const colid = column.id
const renderOpts = editRender || cellRender
const compConf = renderOpts ? renderer.get(renderOpts.name) : null
const isColGroup = column.children && column.children.length
const fixedHiddenColumn = fixedType ? (column.fixed !== fixedType && !isColGroup) : !!column.fixed && overflowX
const headOverflow = XEUtils.eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow
const headAlign = headerAlign || align || allHeaderAlign || allAlign
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign
let showEllipsis = headOverflow === 'ellipsis'
const showTitle = headOverflow === 'title'
const showTooltip = headOverflow === true || headOverflow === 'tooltip'
Expand Down

0 comments on commit 81cac95

Please sign in to comment.