Skip to content

Commit

Permalink
releases 4.7.41
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Jul 3, 2024
1 parent 136c68a commit 3896483
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 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.40",
"version": "4.7.41",
"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.0.42"
"vxe-pc-ui": "^4.0.45"
},
"devDependencies": {
"@types/resize-observer-browser": "^0.1.11",
Expand Down
8 changes: 4 additions & 4 deletions packages/locale/lang/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ export default {
},
import: {
modes: {
covering: 'Overwrite mode (directly overwrite table data)',
insert: 'Bottom append (appends new data to the bottom of the table)',
insertTop: 'Top append (appends new data to the top of the table)',
insertBottom: 'Bottom append (appends new data to the bottom of the table)'
covering: '覆盖方式(直接覆盖表格数据)',
insert: '底部追加(在表格的底部追加新数据)',
insertTop: '顶部追加(在表格的顶部追加新数据)',
insertBottom: '底部追加(在表格的底部追加新数据)'
},
impTitle: '导入数据',
impFile: '文件名',
Expand Down
2 changes: 1 addition & 1 deletion packages/table/module/export/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ function checkImportData (columns: any[], fields: string[]) {
return fields.some(field => tableFields.indexOf(field) > -1)
}

const tableExportMethodKeys: (keyof TableExportMethods)[] = ['exportData', 'importByFile', 'importData', 'saveFile', 'readFile', 'print', 'openImport', 'openExport', 'openPrint']
const tableExportMethodKeys: (keyof TableExportMethods)[] = ['exportData', 'importByFile', 'importData', 'saveFile', 'readFile', 'print', 'getPrintHtml', 'openImport', 'openExport', 'openPrint']

hooks.add('tableExportModule', {
setupTable ($xeTable) {
Expand Down
5 changes: 3 additions & 2 deletions packages/table/module/filter/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import XEUtils from 'xe-utils'
import { VxeUI } from '../../../ui'
import { toFilters, handleFieldOrColumn } from '../../src/util'
import { getDomNode, triggerEvent } from '../../../ui/src/dom'
import { isEnableConf } from '../../../ui/src/utils'

import type { TableFilterMethods, TableFilterPrivateMethods } from '../../../../types'

Expand Down Expand Up @@ -39,7 +40,7 @@ hooks.add('tableFilterModule', {
const { target: targetElem, pageX } = evnt
const { visibleWidth } = getDomNode()
const { filters, filterMultiple, filterRender } = column
const compConf = filterRender ? renderer.get(filterRender.name) : null
const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
const frMethod = column.filterRecoverMethod || (compConf ? (compConf.tableFilterRecoverMethod || compConf.filterRecoverMethod) : null)
internalData._currFilterParams = params
Object.assign(filterStore, {
Expand Down Expand Up @@ -118,7 +119,7 @@ hooks.add('tableFilterModule', {
if (column) {
const { filters, filterRender } = column
if (filters) {
const compConf = filterRender ? renderer.get(filterRender.name) : null
const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
const frMethod = column.filterResetMethod || (compConf ? (compConf.tableFilterResetMethod || compConf.filterResetMethod) : null)
filters.forEach((item: any) => {
item._checked = false
Expand Down
8 changes: 4 additions & 4 deletions packages/table/module/filter/panel.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineComponent, h, computed, inject } from 'vue'
import { VxeUI } from '../../../ui'
import { formatText } from '../../../ui/src/utils'
import { formatText, isEnableConf } from '../../../ui/src/utils'
import { getPropClass } from '../../../ui/src/dom'
import { getSlotVNs } from '../../../ui/src/vn'

Expand Down Expand Up @@ -190,8 +190,8 @@ export default defineComponent({
const { column, multiple } = filterStore
const filterOpts = computeFilterOpts.value
const hasCheckOption = computeHasCheckOption.value
const filterRender = column.filterRender
const compConf = filterRender ? renderer.get(filterRender.name) : null
const { filterRender } = column
const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
const isDisabled = !hasCheckOption && !filterStore.isAllSelected && !filterStore.isIndeterminate
return multiple && (compConf ? !(compConf.showTableFilterFooter === false || compConf.showFilterFooter === false) : true)
? [
Expand All @@ -218,7 +218,7 @@ export default defineComponent({
const { initStore } = tableReactData
const { column } = filterStore
const filterRender = column ? column.filterRender : null
const compConf = filterRender ? renderer.get(filterRender.name) : null
const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
const filterClassName = compConf ? (compConf.tableFilterClassName || compConf.filterClassName) : ''
const params = Object.assign({}, tableInternalData._currFilterParams, { $panel, $table: $xeTable })
return h('div', {
Expand Down
1 change: 1 addition & 0 deletions packages/table/src/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export default defineComponent({
$xeTable.saveCustomStore('update:visible')
$xeTable.updateCellAreas()
$xeTable.dispatchEvent('resizable-change', { ...params, resizeWidth }, evnt)
setTimeout(() => $xeTable.recalculate(true), 300)
})
removeClass(tableEl, 'drag--resize')
}
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ export default defineComponent({
const handleFilter = (row: any) => {
return filterColumns.every(({ column, valueList, itemList }) => {
const { filterMethod, filterRender } = column
const compConf = filterRender ? renderer.get(filterRender.name) : null
const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
const compFilterMethod = compConf ? (compConf.tableFilterMethod || compConf.filterMethod) : null
const tdFilterMethod = compConf ? (compConf.defaultTableFilterMethod || compConf.defaultFilterMethod) : null
const cellValue = getCellValue(row, column)
Expand Down

0 comments on commit 3896483

Please sign in to comment.