Skip to content

expose

名称说明类型
elTableRef组件内部el-table的ref
getSearchData获取搜索数据,已被transform
mosoweTableSearchRef组件内部mosowe-form的ref
paginationRef组件内部el-pagination的ref
tableTotal表格数据总数number
tableList当前表格数据array
tableHeight当前表格区域高度number
isEdit当前表格编辑状态boolean
refresh刷新当前表格数据,params查询参数,默认null,一般不需要传,type自定义查询类型,在requestMethod方法第二个参数会返回。(params?:any,type?:string)=>void
selfSearch当使用插槽searchBar设置自定义搜索时,点击查询时调用该方法(params:object)=>void
selfReset当使用插槽searchBar设置自定义搜索时,点击重置时调用该方法(params:object)=>void
resetTableData更新当前表格数据,newList:新的表格数据(newList:any[])=>void
setDefaultSearch设置默认值(重置时的值),当搜索区设置完默认值后,需要调用一次,当点击重置时则会恢复至调用时设置的值()=>void
editDataRow获取编辑前数据,用于重置,点击编辑时调一下本方法,index必传(index:number)=>void
getEditData获取编辑后的表格数据,index可传,返回指定索引数据,不传返回当前页表格编辑状态数据(index?:number)=>void
cancelEditData重置并取消表格编辑,index可传,行索引,不传关闭所有,返回表格的编辑状态boolean(index?:number)=>boolean
resetEditData重置表格数据,index可传,行索引,不传重置所有(index?:number)=>void
editDataSuccess编辑保存成功后调用,index可传,行索引,不传关闭所有编辑状态,返回表格的编辑状态boolean(index?:number)=>boolean
checkIsEditAsync检查是否在编辑中且数据有变化,会有messageBox提示,return promise.resolve(boolean),建议async/await请求。()=>promise<boolean>
clearSelection用于多选表格,清空用户的选择,原el-table expose方法Function
getSelectionRows返回当前选中的行,原el-table expose方法Function
toggleRowSelection用于多选表格,切换某一行的选中状态, 如果使用了第二个参数,则可直接设置这一行选中与否,原el-table expose方法Function
toggleAllSelection用于多选表格,切换全选和全不选,原el-table expose方法Function
toggleRowExpansion用于可扩展的表格或树表格,如果某行被扩展,则切换。 使用第二个参数,您可以直接设置该行应该被扩展或折叠,原el-table expose方法Function
setCurrentRow用于单选表格,设定某一行为选中行, 如果调用时不加参数,则会取消目前高亮行的选中状态,原el-table expose方法Function
clearFilter传入由columnKey 组成的数组以清除指定列的过滤条件。 如果没有参数,清除所有过滤器,原el-table expose方法Function
doLayout对 Table 进行重新布局。 当表格可见性变化时,您可能需要调用此方法以获得正确的布局,原el-table expose方法Function
sort手动排序表格。 参数 prop 属性指定排序列,order 指定排序顺序,原el-table expose方法Function
scrollTo滚动到一组特定坐标,原el-table expose方法Function
setScrollTop设置垂直滚动位置,原el-table expose方法Function
setScrollLeft设置水平滚动位置,原el-table expose方法Function

贡献者

mosowe

文档版本 v1.0.1