0.0.19 • Published 3 years ago
@tamp/commonlist v0.0.19
通用列表组件
对Element-ui的table组件的一层封装 目的:统一对业务组件中使用table组件时的变量进行管理。如loading,分页相关等。
使用:
<CommonList api="" :filter="" ref="commonlist">
<el-table-column />
<el-table-column />
</CommonList>
api: 必传参数,值为一个Promise化的函数
事件:
- loaded: api请求完成
- currentChange 分页相关
- sizeChange 分页相关
- selection-change 分页相关
- sort-change 分页相关
主动请求数据:
this.$refs.commonlist.reload(filter)