4.0.12 • Published 10 months ago

@vxe-ui/plugin-render-antd v4.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@vxe-ui/plugin-render-antd

Vxe UI plug-in for compatibility with the ant-design-vue component.

Compatibility

It corresponds to vxe-table v4 or vxe-pc-ui v4

Installing

npm install @vxe-ui/plugin-render-antd
// ...
// Use vxe-pc-ui
import { VxeUI } from 'vxe-pc-ui'
// Use vxe-table
// import { VxeUI } from 'vxe-table'
import VxeUIPluginRenderAntd from '@vxe-ui/plugin-render-antd'
import '@vxe-ui/plugin-render-antd/dist/style.css'
// ...

VxeUI.use(VxeUIPluginRenderAntd, {
  // prefixCls: 'ant-'
})

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

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

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

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

表单设计器配置项

描述
'AInputWidget', 'ATextareaWidget', 'ANumberInputWidget', 'ADatePickerWidget', 'ASelectWidget', 'ARadioWidget', 'ACheckboxWidget', 'ASwitchWidget'

Table Cell demo

<vxe-table
  height="600"
  :data="tableData"
  :edit-config="{trigger: 'click', mode: 'cell'}">
  <vxe-column field="name" title="Name" :edit-render="{name: 'AInput'}"></vxe-column>
  <vxe-column field="age" title="Age" :edit-render="{name: 'AInputNumber'}"></vxe-column>
  <vxe-column field="date" title="Date" width="200" :edit-render="{name: 'ADatePicker'}"></vxe-column>
</vxe-table>
export default {
  data () {
    return {
      tableData: [
        { id: 100, name: 'test0', age: 28, sex: '1', date: '' },
        { id: 101, name: 'test1', age: 32, sex: '0', date: '' },
        { id: 102, name: 'test2', age: 36, sex: '1', date: '' }
      ]
    }
  }
}

Table Filter demo

<template>
  <vxe-table
    height="600"
    :data="tableData">
    <vxe-column field="name" title="Name":filters="nameOptions" :filter-render="{name: 'AInput'}"></vxe-column>
    <vxe-column field="age" title="Age"></vxe-column>
    <vxe-column field="date" title="Date" ></vxe-column>
  </vxe-table>
</template>
import { defineComponent } from 'vue'

export default defineComponent({
  setup () {
    return {
      nameOptions: [
        { data: '' }
      ],
      tableData: [
        { id: 100, name: 'test0', age: 28, date: '' },
        { id: 101, name: 'test1', age: 32, date: '' },
        { id: 102, name: 'test2', age: 36, date: '' }
      ]
    }
  }
})

Contributors

Thank you to everyone who contributed to this project.

vxe-ui-plugins

License

MIT © 2019-present, Xu Liangzhan

3.0.4

10 months ago

3.0.6

10 months ago

3.0.5

10 months ago

4.0.10

10 months ago

4.0.12

10 months ago

4.0.11

10 months ago

3.0.3

11 months ago

4.0.9

11 months ago

3.0.2

11 months ago

4.0.8

11 months ago

3.0.1

1 year ago

3.0.0

1 year ago

4.0.7

1 year ago

4.0.6

1 year ago

4.0.5

1 year ago

4.0.4

1 year ago

4.0.3

1 year ago

4.0.2

1 year ago

4.0.1

1 year ago

4.0.0

1 year ago