# vxe-table-plugin-iview
**Repository Path**: x-extends/vxe-table-plugin-iview
## Basic Information
- **Project Name**: vxe-table-plugin-iview
- **Description**: 基于 vxe-table 表格的适配插件,用于兼容 iview、view-design 组件库
- **Primary Language**: JavaScript
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 10
- **Forks**: 5
- **Created**: 2019-06-05
- **Last Updated**: 2024-12-03
## Categories & Tags
**Categories**: webui
**Tags**: None
## README
# vxe-table-plugin-iview
[](https://gitee.com/x-extends/vxe-table-plugin-iview/stargazers)
[](https://www.npmjs.com/package/vxe-table-plugin-iview)
[](http://npm-stat.com/charts.html?package=vxe-table-plugin-iview)
[](LICENSE)
基于 [vxe-table](https://www.npmjs.com/package/vxe-table) 表格的适配插件,用于兼容 [view-ui-plus](https://www.npmjs.com/package/view-ui-plus) 组件库
## Compatibility
对应 vxe-table v4 版本
## Installing
```shell
npm install xe-utils vxe-table@next vxe-table-plugin-iview@next view-ui-plus
```
```javascript
// ...
import VXETable from 'vxe-table'
import VXETablePluginIView from 'vxe-table-plugin-iview'
import 'vxe-table-plugin-iview/dist/style.css'
// ...
VXETable.use(VXETablePluginIView)
```
## API
### cell-render 默认的渲染器配置项说明
| 属性 | 描述 | 类型 | 可选值 | 默认值 |
|------|------|-----|-----|-----|
| name | 支持的渲染组件 | String | Input, AutoComplete, InputNumber, Rate, iSwitch, Button, Buttons | — |
| props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
| options | 只对 name=Select 有效,下拉组件选项列表 | Array | — | [] |
| optionProps | 只对 name=Select 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
| optionGroups | 只对 name=ElSelect 有效,下拉组件分组选项列表 | Array | — | [] |
| optionGroupProps | 只对 name=ElSelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
| events | 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) | Object | — | — |
| nativeEvents | 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) | Object | — | — |
### edit-render 可编辑渲染器配置项说明
| 属性 | 描述 | 类型 | 可选值 | 默认值 |
|------|------|-----|-----|-----|
| name | 支持的渲染组件 | String | Input, AutoComplete, InputNumber, Select, Cascader, DatePicker, TimePicker, Rate, iSwitch, Button, Buttons | — |
| props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
| options | 只对 name=Select 有效,下拉组件选项列表 | Array | — | [] |
| optionProps | 只对 name=Select 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
| optionGroups | 只对 name=ElSelect 有效,下拉组件分组选项列表 | Array | — | [] |
| optionGroupProps | 只对 name=ElSelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
| events | 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) | Object | — | — |
| nativeEvents | 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) | Object | — | — |
### filter-render 筛选渲染器配置项说明
| 属性 | 描述 | 类型 | 可选值 | 默认值 |
|------|------|-----|-----|-----|
| name | 支持的渲染组件 | String | Input, AutoComplete, InputNumber, Select, Rate, iSwitch | — |
| props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
| options | 只对 name=Select 有效,下拉组件选项列表 | Array | — | [] |
| optionProps | 只对 name=Select 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
| optionGroups | 只对 name=ElSelect 有效,下拉组件分组选项列表 | Array | — | [] |
| optionGroupProps | 只对 name=ElSelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
| events | 渲染组件附加事件,参数为 ( {}, ...Component arguments ) | Object | — | — |
| nativeEvents | 渲染组件附加事件,参数为 ( {}, ...Component arguments ) | Object | — | — |
### item-render 表单-项渲染器配置项说明
| 属性 | 描述 | 类型 | 可选值 | 默认值 |
|------|------|-----|-----|-----|
| name | 支持的渲染组件 | String | Input, AutoComplete, InputNumber, Select, Rate, iSwitch, Radio, Checkbox, Button, Buttons | — |
| props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
| options | 只对 name=Select 有效,下拉组件选项列表 | Array | — | [] |
| optionProps | 只对 name=Select 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
| optionGroups | 只对 name=ElSelect 有效,下拉组件分组选项列表 | Array | — | [] |
| optionGroupProps | 只对 name=ElSelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
| events | 渲染组件附加事件,参数为 ( {}, ...Component arguments ) | Object | — | — |
| nativeEvents | 渲染组件附加事件,参数为 ( {}, ...Component arguments ) | Object | — | — |
## Cell demo
```html
```
```javascript
export default {
data () {
return {
tableData: [
{ id: 100, name: 'test0', age: 28, sex: '1', date: null },
{ id: 101, name: 'test1', age: 32, sex: '0', date: null },
{ id: 102, name: 'test2', age: 36, sex: '1', date: null }
]
}
}
}
```
## Filter demo
```html
```
```javascript
export default {
data () {
return {
tableData: [
{ id: 100, name: 'test0', age: 28, date: null },
{ id: 101, name: 'test1', age: 32, date: null },
{ id: 102, name: 'test2', age: 36, date: null }
]
}
}
}
```
## License
[MIT](LICENSE) © 2019-present, Xu Liangzhan