mirror of
https://gitee.com/xuliangzhan_admin/vxe-table.git
synced 2026-01-21 05:27:57 +08:00
优化筛选渲染
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vxe-table",
|
||||
"version": "3.3.14",
|
||||
"version": "3.3.15",
|
||||
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟滚动、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、虚拟列表、弹窗、自定义模板、渲染器、贼灵活的配置项、扩展接口等...",
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
@@ -76,12 +76,12 @@
|
||||
"vue-router": "^3.2.0",
|
||||
"vue-template-compiler": "^2.6.14",
|
||||
"vuex": "^3.4.0",
|
||||
"vxe-table-plugin-antd": "^1.11.2",
|
||||
"vxe-table-plugin-antd": "^1.11.3",
|
||||
"vxe-table-plugin-charts": "^1.7.1",
|
||||
"vxe-table-plugin-element": "^1.11.2",
|
||||
"vxe-table-plugin-element": "^1.11.3",
|
||||
"vxe-table-plugin-export-pdf": "^1.9.2",
|
||||
"vxe-table-plugin-export-xlsx": "^2.2.1",
|
||||
"vxe-table-plugin-iview": "^1.11.3",
|
||||
"vxe-table-plugin-iview": "^1.11.4",
|
||||
"vxe-table-plugin-menus": "^2.0.1",
|
||||
"vxe-table-plugin-renderer": "^1.3.5",
|
||||
"vxe-table-plugin-shortcut-key": "^1.5.1",
|
||||
|
||||
@@ -1060,6 +1060,7 @@ const Methods = {
|
||||
const { filterMethod, filterRender } = column
|
||||
const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
|
||||
const compFilterMethod = compConf && compConf.renderFilter ? compConf.filterMethod : null
|
||||
const defaultFilterMethod = compConf ? compConf.defaultFilterMethod : null
|
||||
const cellValue = UtilTools.getCellValue(row, column)
|
||||
if (filterMethod) {
|
||||
return itemList.some((item) => filterMethod({ value: item.value, option: item, cellValue, row, column, $table: this }))
|
||||
@@ -1067,6 +1068,8 @@ const Methods = {
|
||||
return itemList.some((item) => compFilterMethod({ value: item.value, option: item, cellValue, row, column, $table: this }))
|
||||
} else if (allFilterMethod) {
|
||||
return allFilterMethod({ options: itemList, values: valueList, cellValue, row, column })
|
||||
} else if (defaultFilterMethod) {
|
||||
return itemList.some((item) => defaultFilterMethod({ value: item.value, option: item, cellValue, row, column, $table: this }))
|
||||
}
|
||||
return valueList.indexOf(XEUtils.get(row, column.property)) > -1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user