Skip to content

Commit

Permalink
releases 4.9.31
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Dec 19, 2024
1 parent 5e1cb49 commit b4e2141
Show file tree
Hide file tree
Showing 4 changed files with 24 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.9.30",
"version": "4.9.31",
"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.3.36"
"vxe-pc-ui": "^4.3.37"
},
"devDependencies": {
"@types/resize-observer-browser": "^0.1.11",
Expand Down
10 changes: 6 additions & 4 deletions packages/table/module/filter/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,24 +198,26 @@ export default defineComponent({
const renderVN = () => {
const { filterStore } = props
const { initStore } = tableReactData
const { column } = filterStore
const { visible, multiple, column } = filterStore
const filterRender = column ? column.filterRender : 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 })
const filterOpts = computeFilterOpts.value
const { destroyOnClose } = filterOpts
return h('div', {
class: [
'vxe-table--filter-wrapper',
'filter--prevent-default',
getPropClass(filterClassName, params),
{
'is--animat': $xeTable.props.animat,
'is--multiple': filterStore.multiple,
'is--active': filterStore.visible
'is--multiple': multiple,
'is--active': visible
}
],
style: filterStore.style
}, initStore.filter && column ? renderOptions(filterRender, compConf).concat(renderFooters()) : [])
}, initStore.filter && (destroyOnClose ? visible : true) && column ? renderOptions(filterRender, compConf).concat(renderFooters()) : [])
}

return renderVN
Expand Down
23 changes: 15 additions & 8 deletions packages/table/src/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4924,18 +4924,25 @@ export default defineComponent({
const rowRest = fullAllDataRowIdData[getRowid($xeTable, row)]
return rowRest && !!rowRest.treeLoaded
},
clearTreeExpandLoaded (row) {
clearTreeExpandLoaded (rows: any) {
const { treeExpandedMaps } = reactData
const { fullAllDataRowIdData } = internalData
const treeOpts = computeTreeOpts.value
const { transform, lazy } = treeOpts
const rowid = getRowid($xeTable, row)
const rowRest = fullAllDataRowIdData[rowid]
if (lazy && rowRest) {
rowRest.treeLoaded = false
if (treeExpandedMaps[rowid]) {
delete treeExpandedMaps[rowid]
const { transform } = treeOpts
if (rows) {
if (!XEUtils.isArray(rows)) {
rows = [rows]
}
rows.forEach((row: any) => {
const rowid = getRowid($xeTable, row)
const rowRest = fullAllDataRowIdData[rowid]
if (rowRest) {
rowRest.treeLoaded = false
if (treeExpandedMaps[rowid]) {
delete treeExpandedMaps[rowid]
}
}
})
}
if (transform) {
handleVirtualTreeToList()
Expand Down
1 change: 1 addition & 0 deletions packages/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ VxeUI.setConfig({
filterConfig: {
// remote: false,
// filterMethod: null,
// destroyOnClose: false,
showIcon: true
},
treeConfig: {
Expand Down

0 comments on commit b4e2141

Please sign in to comment.