3.3.0 • Published 8 months ago

vxe-table-plugin-iview v3.3.0

Weekly downloads
45
License
MIT
Repository
github
Last release
8 months ago

vxe-table-plugin-iview

gitee star npm version npm downloads npm license

基于 vxe-table 表格的适配插件,用于兼容 iviewview-design 组件库

Compatibility

对应 vxe-table v3 版本

Installing

npm install xe-utils vxe-table@3 vxe-table-plugin-iview@1 view-design
// ...
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支持的渲染组件StringInput, AutoComplete, InputNumber, Rate, iSwitch, Button, Buttons
props渲染组件附加属性,参数请查看被渲染的 Component propsObject{}
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支持的渲染组件StringInput, AutoComplete, InputNumber, Select, Cascader, DatePicker, TimePicker, Rate, iSwitch, Button, Buttons
props渲染组件附加属性,参数请查看被渲染的 Component propsObject{}
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支持的渲染组件StringInput, AutoComplete, InputNumber, Select, Rate, iSwitch
props渲染组件附加属性,参数请查看被渲染的 Component propsObject{}
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支持的渲染组件StringInput, AutoComplete, InputNumber, Select, Rate, iSwitch, Radio, Checkbox, Button, Buttons
props渲染组件附加属性,参数请查看被渲染的 Component propsObject{}
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

<vxe-table
  height="600"
  :data="tableData"
  :edit-config="{trigger: 'click', mode: 'cell'}">
  <vxe-column field="name" title="Name" :edit-render="{}">
    <template #edit="{ row }">
      <i-input v-model="row.name"></i-input>
    </template>
  </vxe-column>
  <vxe-column field="age" title="Age" :edit-render="{}">
    <template #edit="{ row }">
      <i-input-number v-model="row.age"></i-input-number>
    </template>
  </vxe-column>
  <vxe-column field="date" title="Date" width="200" :edit-render="{}">
    <template #edit="{ row }">
      <i-date-picker v-model="row.date" type="date"></i-date-picker>
    </template>
  </vxe-column>
</vxe-table>
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

<vxe-table
  height="600"
  :data="tableData">
  <vxe-column field="name" title="Name"></vxe-column>
  <vxe-column field="age" title="Age"></vxe-column>
  <vxe-column field="date" title="Date" :filters="[{data: []}]" :filter-render="{}">
    <template #filter="{ $panel, column }">
      <i-input type="type" v-for="(option, index) in column.filters" :key="index" v-model="option.data" @input="$panel.changeOption($event, !!option.data, option)"></i-input>
    </template>
  </vxe-column>
</vxe-table>
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 © 2019-present, Xu Liangzhan

3.3.3

8 months ago

3.3.2

9 months ago

3.3.1

1 year ago

3.3.0

1 year ago

1.12.0

2 years ago

1.13.0

2 years ago

1.11.4

4 years ago

1.11.3

4 years ago

1.11.2

4 years ago

1.11.1

4 years ago

1.11.0

4 years ago

1.10.2

4 years ago

1.10.1

4 years ago

1.10.0

5 years ago

1.9.4

5 years ago

1.9.3

5 years ago

1.9.2

5 years ago

1.9.1

5 years ago

1.9.0

5 years ago

1.8.8

5 years ago

1.8.7

5 years ago

1.8.6

5 years ago

1.8.5

5 years ago

1.8.4

5 years ago

1.8.3

5 years ago

1.8.2

5 years ago

1.8.1

5 years ago

1.8.0

5 years ago

1.8.0-alpha.0

5 years ago

1.7.3

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.5

5 years ago

1.6.4

5 years ago

1.6.3

5 years ago

1.6.2

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.6.0-alpha.0

5 years ago

1.5.10

5 years ago

1.5.9

6 years ago

1.5.8

6 years ago

1.5.7

6 years ago

1.5.6

6 years ago

1.5.5

6 years ago

1.5.4

6 years ago

1.5.3

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.5

6 years ago

1.4.4

6 years ago

1.4.3

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.9.1

6 years ago

0.9.0

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago