Skip to content

Commit

Permalink
releases 3.11.35
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Dec 18, 2024
1 parent bb6a095 commit a20742a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 18 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": "3.11.34",
"version": "3.11.35",
"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": "^3.3.39"
"vxe-pc-ui": "^3.3.40"
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.25.7",
Expand Down
18 changes: 11 additions & 7 deletions packages/table/module/filter/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,29 @@ export default {
}
} as any,
render (this: any, h: CreateElement) {
const { $parent: $xetable, filterStore } = this
const { args, column } = filterStore
const $xeTable = this.$parent

const { filterStore } = this
const { args, 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 filterOpts = $xeTable.computeFilterOpts
const { destroyOnClose } = filterOpts
return h('div', {
class: [
'vxe-table--filter-wrapper',
'filter--prevent-default',
compConf && compConf.className ? compConf.className : '',
getClass(filterClassName, Object.assign({ $panel: this, $table: $xetable }, args)),
getClass(filterClassName, Object.assign({ $panel: this, $table: $xeTable }, args)),
{
'is--animat': $xetable.animat,
'is--multiple': filterStore.multiple,
'is--active': filterStore.visible
'is--animat': $xeTable.animat,
'is--multiple': multiple,
'is--active': visible
}
],
style: filterStore.style
}, filterStore.visible && column ? this.renderOptions(h, filterRender, compConf).concat(this.renderFooter(h)) : [])
}, filterStore.visible && (destroyOnClose ? visible : true) && column ? this.renderOptions(h, filterRender, compConf).concat(this.renderFooter(h)) : [])
},
methods: {
renderOptions (h: CreateElement, filterRender: any, compConf: any) {
Expand Down
25 changes: 16 additions & 9 deletions packages/table/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2685,7 +2685,7 @@ const Methods = {

const { rceTimeout } = internalData
const el = $xeTable.$refs.refElem
if (!el || !el.clientWidth) {
if (el && el.clientWidth) {
$xeTable.autoCellWidth()
}
if (rceTimeout) {
Expand Down Expand Up @@ -6288,18 +6288,25 @@ const Methods = {
const rowRest = fullAllDataRowIdData[getRowid($xeTable, row)]
return rowRest && !!rowRest.treeLoaded
},
clearTreeExpandLoaded (row: any) {
clearTreeExpandLoaded (rows: any) {
const $xeTable = this

const { treeOpts, treeExpandedMaps, fullAllDataRowIdData } = this
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) {
this.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 a20742a

Please sign in to comment.