@vxe-ui/plugin-render-antd 4.0.5 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 Xu Liangzhan
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Xu Liangzhan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,151 +1,151 @@
1
- # @vxe-ui/plugin-render-antd
2
-
3
- [Vxe UI](https://vxeui.com/) plug-in for compatibility with the [ant-design-vue](https://www.npmjs.com/package/ant-design-vue) component.
4
-
5
- ## Compatibility
6
-
7
- It corresponds to [vxe-table v4](https://www.npmjs.com/package/vxe-table) | [vxe-pc-ui v4](https://www.npmjs.com/package/vxe-pc-ui)
8
-
9
- ## Installing
10
-
11
- ```shell
12
- npm install @vxe-ui/plugin-render-antd
13
- ```
14
-
15
- ```javascript
16
- // ...
17
- // Use vxe-pc-ui
18
- import { VxeUI } from 'vxe-pc-ui'
19
- // Use vxe-table
20
- // import { VxeUI } from 'vxe-table'
21
- import VxeUIPluginRenderAntd from '@vxe-ui/plugin-render-antd'
22
- import '@vxe-ui/plugin-render-antd/dist/style.css'
23
- // ...
24
-
25
- VxeUI.use(VxeUIPluginRenderAntd)
26
- ```
27
-
28
-
29
- ## API
30
-
31
- ### cell-render 默认的渲染器配置项说明
32
-
33
- | 属性 | 描述 | 类型 | 可选值 | 默认值 |
34
- |------|------|-----|-----|-----|
35
- | name | 支持的渲染组件 | String | AInput, AAutocomplete, AInputNumber, ASwitch, ARate, AButton, AButtons | — |
36
- | props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
37
- | options | 只对 name=ASelect 有效,下拉组件选项列表 | Array | — | [] |
38
- | optionProps | 只对 name=ASelect 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
39
- | optionGroups | 只对 name=ASelect 有效,下拉组件分组选项列表 | Array | — | [] |
40
- | optionGroupProps | 只对 name=ASelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
41
- | events | 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) | Object | — | — |
42
-
43
- ### edit-render 可编辑渲染器配置项说明
44
-
45
- | 属性 | 描述 | 类型 | 可选值 | 默认值 |
46
- |------|------|-----|-----|-----|
47
- | name | 支持的渲染组件 | String | AInput, AAutocomplete, AInputNumber, ASelect, ACascader, ADatePicker, AMonthPicker, ARangePicker, AWeekPicker, ATimePicker, ATreeSelect, ASwitch, ARate, AButton, AButtons | — |
48
- | props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
49
- | options | 只对 name=ASelect 有效,下拉组件选项列表 | Array | — | [] |
50
- | optionProps | 只对 name=ASelect 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
51
- | optionGroups | 只对 name=ASelect 有效,下拉组件分组选项列表 | Array | — | [] |
52
- | optionGroupProps | 只对 name=ASelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
53
- | events | 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) | Object | — | — |
54
-
55
- ### filter-render 筛选渲染器配置项说明
56
-
57
- | 属性 | 描述 | 类型 | 可选值 | 默认值 |
58
- |------|------|-----|-----|-----|
59
- | name | 支持的渲染组件 | String | AInput, AAutocomplete, AInputNumber, ASelect, ASwitch, ARate | — |
60
- | props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
61
- | options | 只对 name=ASelect 有效,下拉组件选项列表 | Array | — | [] |
62
- | optionProps | 只对 name=ASelect 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
63
- | optionGroups | 只对 name=ASelect 有效,下拉组件分组选项列表 | Array | — | [] |
64
- | optionGroupProps | 只对 name=ASelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
65
- | events | 渲染组件附加事件,参数为 ( {}, ...Component arguments ) | Object | — | — |
66
-
67
- ### item-render 表单-项选渲染器配置项说明
68
-
69
- | 属性 | 描述 | 类型 | 可选值 | 默认值 |
70
- |------|------|-----|-----|-----|
71
- | name | 支持的渲染组件 | String | AInput, AAutocomplete, AInputNumber, ASelect, ASwitch, ARate, ARadio, ACheckbox, AButton, AButtons | — |
72
- | props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
73
- | options | 只对 name=ASelect 有效,下拉组件选项列表 | Array | — | [] |
74
- | optionProps | 只对 name=ASelect 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
75
- | optionGroups | 只对 name=ASelect 有效,下拉组件分组选项列表 | Array | — | [] |
76
- | optionGroupProps | 只对 name=ASelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
77
- | events | 渲染组件附加事件,参数为 ( {}, ...Component arguments ) | Object | — | — |
78
-
79
- ### 表单设计器配置项
80
-
81
- | 描述 |
82
- |------|
83
- | 'AInputWidget', 'ATextareaWidget', 'ANumberInputWidget', 'ADatePickerWidget', 'ASelectWidget', 'ARadioWidget', 'ACheckboxWidget', 'ASwitchWidget' |
84
-
85
- ## Cell demo
86
-
87
- ```html
88
- <vxe-table
89
- height="600"
90
- :data="tableData"
91
- :edit-config="{trigger: 'click', mode: 'cell'}">
92
- <vxe-column field="name" title="Name" :edit-render="{name: 'AInput'}"></vxe-column>
93
- <vxe-column field="age" title="Age" :edit-render="{name: 'AInputNumber'}"></vxe-column>
94
- <vxe-column field="date" title="Date" width="200" :edit-render="{name: 'ADatePicker'}"></vxe-column>
95
- </vxe-table>
96
- ```
97
-
98
- ```javascript
99
- export default {
100
- data () {
101
- return {
102
- tableData: [
103
- { id: 100, name: 'test0', age: 28, sex: '1', date: '' },
104
- { id: 101, name: 'test1', age: 32, sex: '0', date: '' },
105
- { id: 102, name: 'test2', age: 36, sex: '1', date: '' }
106
- ]
107
- }
108
- }
109
- }
110
- ```
111
-
112
- ## Filter demo
113
-
114
- ```html
115
- <vxe-table
116
- height="600"
117
- :data="tableData">
118
- <vxe-column field="name" title="Name":filters="nameOptions" :filter-render="{name: 'AInput'}"></vxe-column>
119
- <vxe-column field="age" title="Age"></vxe-column>
120
- <vxe-column field="date" title="Date" ></vxe-column>
121
- </vxe-table>
122
- ```
123
-
124
- ```javascript
125
- import { defineComponent } from 'vue'
126
-
127
- export default defineComponent({
128
- setup () {
129
- return {
130
- nameOptions: [
131
- { data: '' }
132
- ],
133
- tableData: [
134
- { id: 100, name: 'test0', age: 28, date: '' },
135
- { id: 101, name: 'test1', age: 32, date: '' },
136
- { id: 102, name: 'test2', age: 36, date: '' }
137
- ]
138
- }
139
- }
140
- })
141
- ```
142
-
143
- ## Contributors
144
-
145
- Thank you to everyone who contributed to this project.
146
-
147
- [![vxe-ui-plugins](https://contrib.rocks/image?repo=x-extends/vxe-ui-plugins)](https://github.com/x-extends/vxe-ui-plugins/graphs/contributors)
148
-
149
- ## License
150
-
151
- [MIT](LICENSE) © 2019-present, Xu Liangzhan
1
+ # @vxe-ui/plugin-render-antd
2
+
3
+ [Vxe UI](https://vxeui.com/) plug-in for compatibility with the [ant-design-vue](https://www.npmjs.com/package/ant-design-vue) component.
4
+
5
+ ## Compatibility
6
+
7
+ It corresponds to [vxe-table v4](https://www.npmjs.com/package/vxe-table) or [vxe-pc-ui v4](https://www.npmjs.com/package/vxe-pc-ui)
8
+
9
+ ## Installing
10
+
11
+ ```shell
12
+ npm install @vxe-ui/plugin-render-antd
13
+ ```
14
+
15
+ ```javascript
16
+ // ...
17
+ // Use vxe-pc-ui
18
+ import { VxeUI } from 'vxe-pc-ui'
19
+ // Use vxe-table
20
+ // import { VxeUI } from 'vxe-table'
21
+ import VxeUIPluginRenderAntd from '@vxe-ui/plugin-render-antd'
22
+ import '@vxe-ui/plugin-render-antd/dist/style.css'
23
+ // ...
24
+
25
+ VxeUI.use(VxeUIPluginRenderAntd)
26
+ ```
27
+
28
+
29
+ ## API
30
+
31
+ ### cell-render 默认的渲染器配置项说明
32
+
33
+ | 属性 | 描述 | 类型 | 可选值 | 默认值 |
34
+ |------|------|-----|-----|-----|
35
+ | name | 支持的渲染组件 | String | AInput, AAutocomplete, AInputNumber, ASwitch, ARate, AButton, AButtons | — |
36
+ | props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
37
+ | options | 只对 name=ASelect 有效,下拉组件选项列表 | Array | — | [] |
38
+ | optionProps | 只对 name=ASelect 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
39
+ | optionGroups | 只对 name=ASelect 有效,下拉组件分组选项列表 | Array | — | [] |
40
+ | optionGroupProps | 只对 name=ASelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
41
+ | events | 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) | Object | — | — |
42
+
43
+ ### edit-render 可编辑渲染器配置项说明
44
+
45
+ | 属性 | 描述 | 类型 | 可选值 | 默认值 |
46
+ |------|------|-----|-----|-----|
47
+ | name | 支持的渲染组件 | String | AInput, AAutocomplete, AInputNumber, ASelect, ACascader, ADatePicker, AMonthPicker, ARangePicker, AWeekPicker, ATimePicker, ATreeSelect, ASwitch, ARate, AButton, AButtons | — |
48
+ | props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
49
+ | options | 只对 name=ASelect 有效,下拉组件选项列表 | Array | — | [] |
50
+ | optionProps | 只对 name=ASelect 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
51
+ | optionGroups | 只对 name=ASelect 有效,下拉组件分组选项列表 | Array | — | [] |
52
+ | optionGroupProps | 只对 name=ASelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
53
+ | events | 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) | Object | — | — |
54
+
55
+ ### filter-render 筛选渲染器配置项说明
56
+
57
+ | 属性 | 描述 | 类型 | 可选值 | 默认值 |
58
+ |------|------|-----|-----|-----|
59
+ | name | 支持的渲染组件 | String | AInput, AAutocomplete, AInputNumber, ASelect, ASwitch, ARate | — |
60
+ | props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
61
+ | options | 只对 name=ASelect 有效,下拉组件选项列表 | Array | — | [] |
62
+ | optionProps | 只对 name=ASelect 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
63
+ | optionGroups | 只对 name=ASelect 有效,下拉组件分组选项列表 | Array | — | [] |
64
+ | optionGroupProps | 只对 name=ASelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
65
+ | events | 渲染组件附加事件,参数为 ( {}, ...Component arguments ) | Object | — | — |
66
+
67
+ ### item-render 表单-项选渲染器配置项说明
68
+
69
+ | 属性 | 描述 | 类型 | 可选值 | 默认值 |
70
+ |------|------|-----|-----|-----|
71
+ | name | 支持的渲染组件 | String | AInput, AAutocomplete, AInputNumber, ASelect, ASwitch, ARate, ARadio, ACheckbox, AButton, AButtons | — |
72
+ | props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
73
+ | options | 只对 name=ASelect 有效,下拉组件选项列表 | Array | — | [] |
74
+ | optionProps | 只对 name=ASelect 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
75
+ | optionGroups | 只对 name=ASelect 有效,下拉组件分组选项列表 | Array | — | [] |
76
+ | optionGroupProps | 只对 name=ASelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
77
+ | events | 渲染组件附加事件,参数为 ( {}, ...Component arguments ) | Object | — | — |
78
+
79
+ ### 表单设计器配置项
80
+
81
+ | 描述 |
82
+ |------|
83
+ | 'AInputWidget', 'ATextareaWidget', 'ANumberInputWidget', 'ADatePickerWidget', 'ASelectWidget', 'ARadioWidget', 'ACheckboxWidget', 'ASwitchWidget' |
84
+
85
+ ## Cell demo
86
+
87
+ ```html
88
+ <vxe-table
89
+ height="600"
90
+ :data="tableData"
91
+ :edit-config="{trigger: 'click', mode: 'cell'}">
92
+ <vxe-column field="name" title="Name" :edit-render="{name: 'AInput'}"></vxe-column>
93
+ <vxe-column field="age" title="Age" :edit-render="{name: 'AInputNumber'}"></vxe-column>
94
+ <vxe-column field="date" title="Date" width="200" :edit-render="{name: 'ADatePicker'}"></vxe-column>
95
+ </vxe-table>
96
+ ```
97
+
98
+ ```javascript
99
+ export default {
100
+ data () {
101
+ return {
102
+ tableData: [
103
+ { id: 100, name: 'test0', age: 28, sex: '1', date: '' },
104
+ { id: 101, name: 'test1', age: 32, sex: '0', date: '' },
105
+ { id: 102, name: 'test2', age: 36, sex: '1', date: '' }
106
+ ]
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ ## Filter demo
113
+
114
+ ```html
115
+ <vxe-table
116
+ height="600"
117
+ :data="tableData">
118
+ <vxe-column field="name" title="Name":filters="nameOptions" :filter-render="{name: 'AInput'}"></vxe-column>
119
+ <vxe-column field="age" title="Age"></vxe-column>
120
+ <vxe-column field="date" title="Date" ></vxe-column>
121
+ </vxe-table>
122
+ ```
123
+
124
+ ```javascript
125
+ import { defineComponent } from 'vue'
126
+
127
+ export default defineComponent({
128
+ setup () {
129
+ return {
130
+ nameOptions: [
131
+ { data: '' }
132
+ ],
133
+ tableData: [
134
+ { id: 100, name: 'test0', age: 28, date: '' },
135
+ { id: 101, name: 'test1', age: 32, date: '' },
136
+ { id: 102, name: 'test2', age: 36, date: '' }
137
+ ]
138
+ }
139
+ }
140
+ })
141
+ ```
142
+
143
+ ## Contributors
144
+
145
+ Thank you to everyone who contributed to this project.
146
+
147
+ [![vxe-ui-plugins](https://contrib.rocks/image?repo=x-extends/vxe-ui-plugins)](https://github.com/x-extends/vxe-ui-plugins/graphs/contributors)
148
+
149
+ ## License
150
+
151
+ [MIT](LICENSE) © 2019-present, Xu Liangzhan
@@ -1737,7 +1737,12 @@ function defineFormRender(VxeUI) {
1737
1737
  }
1738
1738
  return [];
1739
1739
  }
1740
- function createFormItemRadioAndCheckboxRender() {
1740
+ /**
1741
+ *
1742
+ * 已废弃
1743
+ * @deprecated
1744
+ */
1745
+ function createOldFormItemRadioAndCheckboxRender() {
1741
1746
  return function (renderOpts, params) {
1742
1747
  var name = renderOpts.name,
1743
1748
  _renderOpts$options = renderOpts.options,
@@ -1825,15 +1830,74 @@ function defineFormRender(VxeUI) {
1825
1830
  ASwitch: {
1826
1831
  renderFormItemContent: createFormItemRender()
1827
1832
  },
1828
- ARadio: {
1829
- renderFormItemContent: createFormItemRadioAndCheckboxRender()
1833
+ ARadioGroup: {
1834
+ renderFormItemContent: function renderFormItemContent(renderOpts, params) {
1835
+ var _renderOpts$options3 = renderOpts.options,
1836
+ options = _renderOpts$options3 === void 0 ? [] : _renderOpts$options3,
1837
+ _renderOpts$optionPro2 = renderOpts.optionProps,
1838
+ optionProps = _renderOpts$optionPro2 === void 0 ? {} : _renderOpts$optionPro2;
1839
+ var data = params.data,
1840
+ field = params.field;
1841
+ var attrs = renderOpts.attrs;
1842
+ var labelProp = optionProps.label || 'label';
1843
+ var valueProp = optionProps.value || 'value';
1844
+ var itemValue = _xeUtils["default"].get(data, field);
1845
+ return [(0, _vue.h)((0, _vue.resolveComponent)('a-radio-group'), _objectSpread(_objectSpread(_objectSpread({}, attrs), getItemProps(renderOpts, params, itemValue)), getItemOns(renderOpts, params)), {
1846
+ "default": function _default() {
1847
+ return options.map(function (option, oIndex) {
1848
+ return (0, _vue.h)((0, _vue.resolveComponent)('a-radio'), {
1849
+ key: oIndex,
1850
+ value: option[valueProp],
1851
+ disabled: option.disabled
1852
+ }, {
1853
+ "default": function _default() {
1854
+ return cellText(option[labelProp]);
1855
+ }
1856
+ });
1857
+ });
1858
+ }
1859
+ })];
1860
+ }
1830
1861
  },
1831
- ACheckbox: {
1832
- renderFormItemContent: createFormItemRadioAndCheckboxRender()
1862
+ ACheckboxGroup: {
1863
+ renderFormItemContent: function renderFormItemContent(renderOpts, params) {
1864
+ var _renderOpts$options4 = renderOpts.options,
1865
+ options = _renderOpts$options4 === void 0 ? [] : _renderOpts$options4,
1866
+ _renderOpts$optionPro3 = renderOpts.optionProps,
1867
+ optionProps = _renderOpts$optionPro3 === void 0 ? {} : _renderOpts$optionPro3;
1868
+ var data = params.data,
1869
+ field = params.field;
1870
+ var attrs = renderOpts.attrs;
1871
+ var labelProp = optionProps.label || 'label';
1872
+ var valueProp = optionProps.value || 'value';
1873
+ var itemValue = _xeUtils["default"].get(data, field);
1874
+ return [(0, _vue.h)((0, _vue.resolveComponent)('a-checkbox-group'), _objectSpread(_objectSpread(_objectSpread({}, attrs), getItemProps(renderOpts, params, itemValue)), getItemOns(renderOpts, params)), {
1875
+ "default": function _default() {
1876
+ return options.map(function (option, oIndex) {
1877
+ return (0, _vue.h)((0, _vue.resolveComponent)('a-checkbox'), {
1878
+ key: oIndex,
1879
+ value: option[valueProp],
1880
+ disabled: option.disabled
1881
+ }, {
1882
+ "default": function _default() {
1883
+ return cellText(option[labelProp]);
1884
+ }
1885
+ });
1886
+ });
1887
+ }
1888
+ })];
1889
+ }
1833
1890
  },
1834
1891
  AButton: {
1835
1892
  renderFormItemContent: defaultButtonItemRender
1836
1893
  },
1894
+ // 已废弃
1895
+ ARadio: {
1896
+ renderFormItemContent: createOldFormItemRadioAndCheckboxRender()
1897
+ },
1898
+ ACheckbox: {
1899
+ renderFormItemContent: createOldFormItemRadioAndCheckboxRender()
1900
+ },
1837
1901
  AButtons: {
1838
1902
  renderFormItemContent: defaultButtonsItemRender
1839
1903
  }
@@ -131,7 +131,12 @@ function defineFormRender(VxeUI) {
131
131
  }
132
132
  return [];
133
133
  }
134
- function createFormItemRadioAndCheckboxRender() {
134
+ /**
135
+ *
136
+ * 已废弃
137
+ * @deprecated
138
+ */
139
+ function createOldFormItemRadioAndCheckboxRender() {
135
140
  return function (renderOpts, params) {
136
141
  var name = renderOpts.name,
137
142
  _renderOpts$options = renderOpts.options,
@@ -219,15 +224,74 @@ function defineFormRender(VxeUI) {
219
224
  ASwitch: {
220
225
  renderFormItemContent: createFormItemRender()
221
226
  },
222
- ARadio: {
223
- renderFormItemContent: createFormItemRadioAndCheckboxRender()
227
+ ARadioGroup: {
228
+ renderFormItemContent: function renderFormItemContent(renderOpts, params) {
229
+ var _renderOpts$options3 = renderOpts.options,
230
+ options = _renderOpts$options3 === void 0 ? [] : _renderOpts$options3,
231
+ _renderOpts$optionPro2 = renderOpts.optionProps,
232
+ optionProps = _renderOpts$optionPro2 === void 0 ? {} : _renderOpts$optionPro2;
233
+ var data = params.data,
234
+ field = params.field;
235
+ var attrs = renderOpts.attrs;
236
+ var labelProp = optionProps.label || 'label';
237
+ var valueProp = optionProps.value || 'value';
238
+ var itemValue = _xeUtils["default"].get(data, field);
239
+ return [(0, _vue.h)((0, _vue.resolveComponent)('a-radio-group'), _objectSpread(_objectSpread(_objectSpread({}, attrs), getItemProps(renderOpts, params, itemValue)), getItemOns(renderOpts, params)), {
240
+ "default": function _default() {
241
+ return options.map(function (option, oIndex) {
242
+ return (0, _vue.h)((0, _vue.resolveComponent)('a-radio'), {
243
+ key: oIndex,
244
+ value: option[valueProp],
245
+ disabled: option.disabled
246
+ }, {
247
+ "default": function _default() {
248
+ return cellText(option[labelProp]);
249
+ }
250
+ });
251
+ });
252
+ }
253
+ })];
254
+ }
224
255
  },
225
- ACheckbox: {
226
- renderFormItemContent: createFormItemRadioAndCheckboxRender()
256
+ ACheckboxGroup: {
257
+ renderFormItemContent: function renderFormItemContent(renderOpts, params) {
258
+ var _renderOpts$options4 = renderOpts.options,
259
+ options = _renderOpts$options4 === void 0 ? [] : _renderOpts$options4,
260
+ _renderOpts$optionPro3 = renderOpts.optionProps,
261
+ optionProps = _renderOpts$optionPro3 === void 0 ? {} : _renderOpts$optionPro3;
262
+ var data = params.data,
263
+ field = params.field;
264
+ var attrs = renderOpts.attrs;
265
+ var labelProp = optionProps.label || 'label';
266
+ var valueProp = optionProps.value || 'value';
267
+ var itemValue = _xeUtils["default"].get(data, field);
268
+ return [(0, _vue.h)((0, _vue.resolveComponent)('a-checkbox-group'), _objectSpread(_objectSpread(_objectSpread({}, attrs), getItemProps(renderOpts, params, itemValue)), getItemOns(renderOpts, params)), {
269
+ "default": function _default() {
270
+ return options.map(function (option, oIndex) {
271
+ return (0, _vue.h)((0, _vue.resolveComponent)('a-checkbox'), {
272
+ key: oIndex,
273
+ value: option[valueProp],
274
+ disabled: option.disabled
275
+ }, {
276
+ "default": function _default() {
277
+ return cellText(option[labelProp]);
278
+ }
279
+ });
280
+ });
281
+ }
282
+ })];
283
+ }
227
284
  },
228
285
  AButton: {
229
286
  renderFormItemContent: defaultButtonItemRender
230
287
  },
288
+ // 已废弃
289
+ ARadio: {
290
+ renderFormItemContent: createOldFormItemRadioAndCheckboxRender()
291
+ },
292
+ ACheckbox: {
293
+ renderFormItemContent: createOldFormItemRadioAndCheckboxRender()
294
+ },
231
295
  AButtons: {
232
296
  renderFormItemContent: defaultButtonsItemRender
233
297
  }
package/dist/index.umd.js CHANGED
@@ -1902,7 +1902,12 @@
1902
1902
  }
1903
1903
  return [];
1904
1904
  }
1905
- function createFormItemRadioAndCheckboxRender() {
1905
+ /**
1906
+ *
1907
+ * 已废弃
1908
+ * @deprecated
1909
+ */
1910
+ function createOldFormItemRadioAndCheckboxRender() {
1906
1911
  return function (renderOpts, params) {
1907
1912
  var name = renderOpts.name,
1908
1913
  _renderOpts$options = renderOpts.options,
@@ -1990,15 +1995,74 @@
1990
1995
  ASwitch: {
1991
1996
  renderFormItemContent: createFormItemRender()
1992
1997
  },
1993
- ARadio: {
1994
- renderFormItemContent: createFormItemRadioAndCheckboxRender()
1998
+ ARadioGroup: {
1999
+ renderFormItemContent: function renderFormItemContent(renderOpts, params) {
2000
+ var _renderOpts$options3 = renderOpts.options,
2001
+ options = _renderOpts$options3 === void 0 ? [] : _renderOpts$options3,
2002
+ _renderOpts$optionPro2 = renderOpts.optionProps,
2003
+ optionProps = _renderOpts$optionPro2 === void 0 ? {} : _renderOpts$optionPro2;
2004
+ var data = params.data,
2005
+ field = params.field;
2006
+ var attrs = renderOpts.attrs;
2007
+ var labelProp = optionProps.label || 'label';
2008
+ var valueProp = optionProps.value || 'value';
2009
+ var itemValue = _xeUtils["default"].get(data, field);
2010
+ return [(0, _vue.h)((0, _vue.resolveComponent)('a-radio-group'), _objectSpread(_objectSpread(_objectSpread({}, attrs), getItemProps(renderOpts, params, itemValue)), getItemOns(renderOpts, params)), {
2011
+ "default": function _default() {
2012
+ return options.map(function (option, oIndex) {
2013
+ return (0, _vue.h)((0, _vue.resolveComponent)('a-radio'), {
2014
+ key: oIndex,
2015
+ value: option[valueProp],
2016
+ disabled: option.disabled
2017
+ }, {
2018
+ "default": function _default() {
2019
+ return cellText(option[labelProp]);
2020
+ }
2021
+ });
2022
+ });
2023
+ }
2024
+ })];
2025
+ }
1995
2026
  },
1996
- ACheckbox: {
1997
- renderFormItemContent: createFormItemRadioAndCheckboxRender()
2027
+ ACheckboxGroup: {
2028
+ renderFormItemContent: function renderFormItemContent(renderOpts, params) {
2029
+ var _renderOpts$options4 = renderOpts.options,
2030
+ options = _renderOpts$options4 === void 0 ? [] : _renderOpts$options4,
2031
+ _renderOpts$optionPro3 = renderOpts.optionProps,
2032
+ optionProps = _renderOpts$optionPro3 === void 0 ? {} : _renderOpts$optionPro3;
2033
+ var data = params.data,
2034
+ field = params.field;
2035
+ var attrs = renderOpts.attrs;
2036
+ var labelProp = optionProps.label || 'label';
2037
+ var valueProp = optionProps.value || 'value';
2038
+ var itemValue = _xeUtils["default"].get(data, field);
2039
+ return [(0, _vue.h)((0, _vue.resolveComponent)('a-checkbox-group'), _objectSpread(_objectSpread(_objectSpread({}, attrs), getItemProps(renderOpts, params, itemValue)), getItemOns(renderOpts, params)), {
2040
+ "default": function _default() {
2041
+ return options.map(function (option, oIndex) {
2042
+ return (0, _vue.h)((0, _vue.resolveComponent)('a-checkbox'), {
2043
+ key: oIndex,
2044
+ value: option[valueProp],
2045
+ disabled: option.disabled
2046
+ }, {
2047
+ "default": function _default() {
2048
+ return cellText(option[labelProp]);
2049
+ }
2050
+ });
2051
+ });
2052
+ }
2053
+ })];
2054
+ }
1998
2055
  },
1999
2056
  AButton: {
2000
2057
  renderFormItemContent: defaultButtonItemRender
2001
2058
  },
2059
+ // 已废弃
2060
+ ARadio: {
2061
+ renderFormItemContent: createOldFormItemRadioAndCheckboxRender()
2062
+ },
2063
+ ACheckbox: {
2064
+ renderFormItemContent: createOldFormItemRadioAndCheckboxRender()
2065
+ },
2002
2066
  AButtons: {
2003
2067
  renderFormItemContent: defaultButtonsItemRender
2004
2068
  }