4.0.8 • Published 8 months ago

vxe-table-plugin-antd v4.0.8

Weekly downloads
1,878
License
MIT
Repository
github
Last release
8 months ago

vxe-table-plugin-antd

gitee star npm version npm downloads npm license

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

Compatibility

对应 vxe-table v4 版本

Installing

npm install vxe-table@next vxe-table-plugin-antd@next ant-design-vue@next
// ...
import VXETable from 'vxe-table'
import VXETablePluginAntd from 'vxe-table-plugin-antd'
import 'vxe-table-plugin-antd/dist/style.css'
// ...

VXETable.use(VXETablePluginAntd)

API

cell-render 默认的渲染器配置项说明

属性描述类型可选值默认值
name支持的渲染组件StringAInput, AAutocomplete, AInputNumber, ASwitch, ARate, AButton, AButtons
props渲染组件附加属性,参数请查看被渲染的 Component propsObject{}
options只对 name=ASelect 有效,下拉组件选项列表Array[]
optionProps只对 name=ASelect 有效,下拉组件选项属性参数配置Object{ value: 'value', label: 'label' }
optionGroups只对 name=ASelect 有效,下拉组件分组选项列表Array[]
optionGroupProps只对 name=ASelect 有效,下拉组件分组选项属性参数配置Object{ options: 'options', label: 'label' }
events渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments )Object
nativeEvents渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments )Object

edit-render 可编辑渲染器配置项说明

属性描述类型可选值默认值
name支持的渲染组件StringAInput, AAutocomplete, AInputNumber, ASelect, ACascader, ADatePicker, AMonthPicker, ARangePicker, AWeekPicker, ATimePicker, ATreeSelect, ASwitch, ARate, AButton, AButtons
props渲染组件附加属性,参数请查看被渲染的 Component propsObject{}
options只对 name=ASelect 有效,下拉组件选项列表Array[]
optionProps只对 name=ASelect 有效,下拉组件选项属性参数配置Object{ value: 'value', label: 'label' }
optionGroups只对 name=ASelect 有效,下拉组件分组选项列表Array[]
optionGroupProps只对 name=ASelect 有效,下拉组件分组选项属性参数配置Object{ options: 'options', label: 'label' }
events渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments )Object
nativeEvents渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments )Object

filter-render 筛选渲染器配置项说明

属性描述类型可选值默认值
name支持的渲染组件StringAInput, AAutocomplete, AInputNumber, ASelect, ASwitch, ARate
props渲染组件附加属性,参数请查看被渲染的 Component propsObject{}
options只对 name=ASelect 有效,下拉组件选项列表Array[]
optionProps只对 name=ASelect 有效,下拉组件选项属性参数配置Object{ value: 'value', label: 'label' }
optionGroups只对 name=ASelect 有效,下拉组件分组选项列表Array[]
optionGroupProps只对 name=ASelect 有效,下拉组件分组选项属性参数配置Object{ options: 'options', label: 'label' }
events渲染组件附加事件,参数为 ( {}, ...Component arguments )Object
nativeEvents渲染组件附加事件,参数为 ( {}, ...Component arguments )Object

item-render 表单-项选渲染器配置项说明

属性描述类型可选值默认值
name支持的渲染组件StringAInput, AAutocomplete, AInputNumber, ASelect, ASwitch, ARate, ARadio, ACheckbox, AButton, AButtons
props渲染组件附加属性,参数请查看被渲染的 Component propsObject{}
options只对 name=ASelect 有效,下拉组件选项列表Array[]
optionProps只对 name=ASelect 有效,下拉组件选项属性参数配置Object{ value: 'value', label: 'label' }
optionGroups只对 name=ASelect 有效,下拉组件分组选项列表Array[]
optionGroupProps只对 name=ASelect 有效,下拉组件分组选项属性参数配置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 }">
      <a-input v-model:value="row.name"></a-input>
    </template>
  </vxe-column>
  <vxe-column field="age" title="Age" :edit-render="{}">
    <template #edit="{ row }">
      <a-input-number v-model:value="row.age"></a-input-number>
    </template>
  </vxe-column>
  <vxe-column field="date" title="Date" width="200" :edit-render="{}">
    <template #edit="{ row }">
      <a-date-picker v-model:value="row.date" type="date"></a-date-picker>
    </template>
  </vxe-column>
</vxe-table>
import { defineComponent } from 'vue'

export default defineComponent({
  setup () {
    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 }">
      <a-input type="type" v-for="(option, index) in column.filters" :key="index" v-model:value="option.data" @input="$panel.changeOption($event, !!option.data, option)"></a-input>
    </template>
  </vxe-column>
</vxe-table>
import { defineComponent } from 'vue'

export default defineComponent({
  setup () {
    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.6

8 months ago

3.3.5

10 months ago

4.0.5

1 year ago

4.0.4

1 year ago

4.0.7

1 year ago

4.0.6

1 year ago

4.0.3

1 year ago

4.0.8

1 year ago

3.3.3

1 year ago

3.3.2

1 year ago

4.0.2

1 year ago

3.3.1

1 year ago

4.0.1

1 year ago

3.3.0

1 year ago

4.0.0

1 year ago

1.12.0

2 years ago

3.0.8

2 years ago

1.13.0

2 years ago

3.0.9

2 years ago

3.1.0

2 years ago

3.0.7

2 years ago

3.0.6

3 years ago

3.0.5

4 years ago

1.11.3

4 years ago

3.0.4

4 years ago

3.0.3

4 years ago

3.0.2

4 years ago

1.11.2

4 years ago

1.11.1

4 years ago

3.0.1

4 years ago

1.11.0

4 years ago

3.0.0

4 years ago

3.0.0-beta.1

4 years ago

3.0.0-beta.3

4 years ago

3.0.0-beta.2

4 years ago

3.0.0-beta.5

4 years ago

3.0.0-beta.4

4 years ago

1.10.4

4 years ago

1.10.3

4 years ago

3.0.0-beta.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.10

5 years ago

1.8.9

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.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

6 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.6

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.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.1

6 years ago