@vxe-ui/plugin-render-antd 3.0.1 → 3.0.3

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,153 @@
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 v3](https://www.npmjs.com/package/vxe-table) or [vxe-pc-ui v3](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 v3](https://www.npmjs.com/package/vxe-table) or [vxe-pc-ui v3](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
+ // prefixCls: 'ant-'
27
+ })
28
+ ```
29
+
30
+
31
+ ## API
32
+
33
+ ### cell-render 默认的渲染器配置项说明
34
+
35
+ | 属性 | 描述 | 类型 | 可选值 | 默认值 |
36
+ |------|------|-----|-----|-----|
37
+ | name | 支持的渲染组件 | String | AInput, AAutocomplete, AInputNumber, ASwitch, ARate, AButton, AButtons | — |
38
+ | props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
39
+ | options | 只对 name=ASelect 有效,下拉组件选项列表 | Array | — | [] |
40
+ | optionProps | 只对 name=ASelect 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
41
+ | optionGroups | 只对 name=ASelect 有效,下拉组件分组选项列表 | Array | — | [] |
42
+ | optionGroupProps | 只对 name=ASelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
43
+ | events | 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) | Object | — | — |
44
+
45
+ ### edit-render 可编辑渲染器配置项说明
46
+
47
+ | 属性 | 描述 | 类型 | 可选值 | 默认值 |
48
+ |------|------|-----|-----|-----|
49
+ | name | 支持的渲染组件 | String | AInput, AAutocomplete, AInputNumber, ASelect, ACascader, ADatePicker, AMonthPicker, ARangePicker, AWeekPicker, ATimePicker, ATreeSelect, ASwitch, ARate, AButton, AButtons | — |
50
+ | props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
51
+ | options | 只对 name=ASelect 有效,下拉组件选项列表 | Array | — | [] |
52
+ | optionProps | 只对 name=ASelect 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
53
+ | optionGroups | 只对 name=ASelect 有效,下拉组件分组选项列表 | Array | — | [] |
54
+ | optionGroupProps | 只对 name=ASelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
55
+ | events | 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) | Object | — | — |
56
+
57
+ ### filter-render 筛选渲染器配置项说明
58
+
59
+ | 属性 | 描述 | 类型 | 可选值 | 默认值 |
60
+ |------|------|-----|-----|-----|
61
+ | name | 支持的渲染组件 | String | AInput, AAutocomplete, AInputNumber, ASelect, ASwitch, ARate | — |
62
+ | props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
63
+ | options | 只对 name=ASelect 有效,下拉组件选项列表 | Array | — | [] |
64
+ | optionProps | 只对 name=ASelect 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
65
+ | optionGroups | 只对 name=ASelect 有效,下拉组件分组选项列表 | Array | — | [] |
66
+ | optionGroupProps | 只对 name=ASelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
67
+ | events | 渲染组件附加事件,参数为 ( {}, ...Component arguments ) | Object | — | — |
68
+
69
+ ### item-render 表单-项选渲染器配置项说明
70
+
71
+ | 属性 | 描述 | 类型 | 可选值 | 默认值 |
72
+ |------|------|-----|-----|-----|
73
+ | name | 支持的渲染组件 | String | AInput, AAutocomplete, AInputNumber, ASelect, ASwitch, ARate, ARadio, ACheckbox, AButton, AButtons | — |
74
+ | props | 渲染组件附加属性,参数请查看被渲染的 Component props | Object | — | {} |
75
+ | options | 只对 name=ASelect 有效,下拉组件选项列表 | Array | — | [] |
76
+ | optionProps | 只对 name=ASelect 有效,下拉组件选项属性参数配置 | Object | — | { value: 'value', label: 'label' } |
77
+ | optionGroups | 只对 name=ASelect 有效,下拉组件分组选项列表 | Array | — | [] |
78
+ | optionGroupProps | 只对 name=ASelect 有效,下拉组件分组选项属性参数配置 | Object | — | { options: 'options', label: 'label' } |
79
+ | events | 渲染组件附加事件,参数为 ( {}, ...Component arguments ) | Object | — | — |
80
+
81
+ ### 表单设计器配置项
82
+
83
+ | 描述 |
84
+ |------|
85
+ | 'AInputWidget', 'ATextareaWidget', 'ANumberInputWidget', 'ADatePickerWidget', 'ASelectWidget', 'ARadioWidget', 'ACheckboxWidget', 'ASwitchWidget' |
86
+
87
+ ## Cell demo
88
+
89
+ ```html
90
+ <vxe-table
91
+ height="600"
92
+ :data="tableData"
93
+ :edit-config="{trigger: 'click', mode: 'cell'}">
94
+ <vxe-column field="name" title="Name" :edit-render="{name: 'AInput'}"></vxe-column>
95
+ <vxe-column field="age" title="Age" :edit-render="{name: 'AInputNumber'}"></vxe-column>
96
+ <vxe-column field="date" title="Date" width="200" :edit-render="{name: 'ADatePicker'}"></vxe-column>
97
+ </vxe-table>
98
+ ```
99
+
100
+ ```javascript
101
+ export default {
102
+ data () {
103
+ return {
104
+ tableData: [
105
+ { id: 100, name: 'test0', age: 28, sex: '1', date: '' },
106
+ { id: 101, name: 'test1', age: 32, sex: '0', date: '' },
107
+ { id: 102, name: 'test2', age: 36, sex: '1', date: '' }
108
+ ]
109
+ }
110
+ }
111
+ }
112
+ ```
113
+
114
+ ## Filter demo
115
+
116
+ ```html
117
+ <vxe-table
118
+ height="600"
119
+ :data="tableData">
120
+ <vxe-column field="name" title="Name":filters="nameOptions" :filter-render="{name: 'AInput'}"></vxe-column>
121
+ <vxe-column field="age" title="Age"></vxe-column>
122
+ <vxe-column field="date" title="Date" ></vxe-column>
123
+ </vxe-table>
124
+ ```
125
+
126
+ ```javascript
127
+ import { defineComponent } from 'vue'
128
+
129
+ export default defineComponent({
130
+ setup () {
131
+ return {
132
+ nameOptions: [
133
+ { data: '' }
134
+ ],
135
+ tableData: [
136
+ { id: 100, name: 'test0', age: 28, date: '' },
137
+ { id: 101, name: 'test1', age: 32, date: '' },
138
+ { id: 102, name: 'test2', age: 36, date: '' }
139
+ ]
140
+ }
141
+ }
142
+ })
143
+ ```
144
+
145
+ ## Contributors
146
+
147
+ Thank you to everyone who contributed to this project.
148
+
149
+ [![vxe-ui-plugins](https://contrib.rocks/image?repo=x-extends/vxe-ui-plugins)](https://github.com/x-extends/vxe-ui-plugins/graphs/contributors)
150
+
151
+ ## License
152
+
153
+ [MIT](LICENSE) © 2019-present, Xu Liangzhan
@@ -21,7 +21,7 @@ function defineFormRender(VxeUI) {
21
21
  return cellValue === null || cellValue === undefined || cellValue === '';
22
22
  }
23
23
  function getOnName(type) {
24
- return type;
24
+ return _xeUtils["default"].kebabCase(type);
25
25
  }
26
26
  function getModelProp(renderOpts) {
27
27
  var prop = 'value';
@@ -398,30 +398,34 @@ function getEventTargetNode(evnt, container, className) {
398
398
  flag: false
399
399
  };
400
400
  }
401
- /**
402
- * 事件兼容性处理
403
- */
404
- function handleClearEvent(params) {
405
- var $event = params.$event;
406
- var bodyElem = document.body;
407
- if (
408
- // 下拉框
409
- getEventTargetNode($event, bodyElem, 'ant-select-dropdown').flag ||
410
- // 级联
411
- getEventTargetNode($event, bodyElem, 'ant-cascader-menus').flag ||
412
- // 日期
413
- getEventTargetNode($event, bodyElem, 'ant-picker-dropdown').flag || getEventTargetNode($event, bodyElem, 'ant-calendar-picker-container').flag ||
414
- // 时间选择
415
- getEventTargetNode($event, bodyElem, 'ant-time-picker-panel').flag) {
416
- return false;
417
- }
418
- }
419
401
  var VxeUIPluginRenderAntd = exports.VxeUIPluginRenderAntd = {
420
402
  install: function install(VxeUI, options) {
403
+ var pluginOpts = Object.assign({
404
+ prefixCls: 'ant-'
405
+ }, options);
421
406
  // 检查版本
422
407
  if (!/^(3)\./.test(VxeUI.uiVersion)) {
423
- console.error('[plugin-render-antd 3.x] Version 3.x is required');
408
+ console.error('[@vxe-ui/plugin-render-antd 3.0.3] Requires vxe-table 3.9.0+ version. https://vxeui.com/other3/#/plugin-export-xlsx/install');
424
409
  }
410
+ /**
411
+ * 事件兼容性处理
412
+ */
413
+ var handleClearEvent = function handleClearEvent(params) {
414
+ var $event = params.$event;
415
+ var bodyElem = document.body;
416
+ var prefixCls = pluginOpts.prefixCls;
417
+ if (
418
+ // 下拉框
419
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "select-dropdown")).flag ||
420
+ // 级联
421
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "cascader-menus")).flag ||
422
+ // 日期
423
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "picker-dropdown")).flag || getEventTargetNode($event, bodyElem, "".concat(prefixCls, "calendar-picker-container")).flag ||
424
+ // 时间选择
425
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "time-picker-panel")).flag) {
426
+ return false;
427
+ }
428
+ };
425
429
  (0, _table.defineTableRender)(VxeUI);
426
430
  (0, _form.defineFormRender)(VxeUI);
427
431
  VxeUI.interceptor.add('event.clearFilter', handleClearEvent);
@@ -458,7 +462,7 @@ function defineTableRender(VxeUI) {
458
462
  return cellValue === null || cellValue === undefined || cellValue === '';
459
463
  }
460
464
  function getOnName(type) {
461
- return type;
465
+ return _xeUtils["default"].kebabCase(type);
462
466
  }
463
467
  function getModelProp(renderOpts) {
464
468
  var prop = 'value';
@@ -20,7 +20,7 @@ function defineFormRender(VxeUI) {
20
20
  return cellValue === null || cellValue === undefined || cellValue === '';
21
21
  }
22
22
  function getOnName(type) {
23
- return type;
23
+ return _xeUtils["default"].kebabCase(type);
24
24
  }
25
25
  function getModelProp(renderOpts) {
26
26
  var prop = 'value';
@@ -28,30 +28,34 @@ function getEventTargetNode(evnt, container, className) {
28
28
  flag: false
29
29
  };
30
30
  }
31
- /**
32
- * 事件兼容性处理
33
- */
34
- function handleClearEvent(params) {
35
- var $event = params.$event;
36
- var bodyElem = document.body;
37
- if (
38
- // 下拉框
39
- getEventTargetNode($event, bodyElem, 'ant-select-dropdown').flag ||
40
- // 级联
41
- getEventTargetNode($event, bodyElem, 'ant-cascader-menus').flag ||
42
- // 日期
43
- getEventTargetNode($event, bodyElem, 'ant-picker-dropdown').flag || getEventTargetNode($event, bodyElem, 'ant-calendar-picker-container').flag ||
44
- // 时间选择
45
- getEventTargetNode($event, bodyElem, 'ant-time-picker-panel').flag) {
46
- return false;
47
- }
48
- }
49
31
  var VxeUIPluginRenderAntd = exports.VxeUIPluginRenderAntd = {
50
32
  install: function install(VxeUI, options) {
33
+ var pluginOpts = Object.assign({
34
+ prefixCls: 'ant-'
35
+ }, options);
51
36
  // 检查版本
52
37
  if (!/^(3)\./.test(VxeUI.uiVersion)) {
53
- console.error('[plugin-render-antd 3.x] Version 3.x is required');
38
+ console.error('[@vxe-ui/plugin-render-antd 3.0.3] Requires vxe-table 3.9.0+ version. https://vxeui.com/other3/#/plugin-export-xlsx/install');
54
39
  }
40
+ /**
41
+ * 事件兼容性处理
42
+ */
43
+ var handleClearEvent = function handleClearEvent(params) {
44
+ var $event = params.$event;
45
+ var bodyElem = document.body;
46
+ var prefixCls = pluginOpts.prefixCls;
47
+ if (
48
+ // 下拉框
49
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "select-dropdown")).flag ||
50
+ // 级联
51
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "cascader-menus")).flag ||
52
+ // 日期
53
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "picker-dropdown")).flag || getEventTargetNode($event, bodyElem, "".concat(prefixCls, "calendar-picker-container")).flag ||
54
+ // 时间选择
55
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "time-picker-panel")).flag) {
56
+ return false;
57
+ }
58
+ };
55
59
  (0, _table.defineTableRender)(VxeUI);
56
60
  (0, _form.defineFormRender)(VxeUI);
57
61
  VxeUI.interceptor.add('event.clearFilter', handleClearEvent);
package/dist/index.js CHANGED
@@ -28,30 +28,34 @@ function getEventTargetNode(evnt, container, className) {
28
28
  flag: false
29
29
  };
30
30
  }
31
- /**
32
- * 事件兼容性处理
33
- */
34
- function handleClearEvent(params) {
35
- var $event = params.$event;
36
- var bodyElem = document.body;
37
- if (
38
- // 下拉框
39
- getEventTargetNode($event, bodyElem, 'ant-select-dropdown').flag ||
40
- // 级联
41
- getEventTargetNode($event, bodyElem, 'ant-cascader-menus').flag ||
42
- // 日期
43
- getEventTargetNode($event, bodyElem, 'ant-picker-dropdown').flag || getEventTargetNode($event, bodyElem, 'ant-calendar-picker-container').flag ||
44
- // 时间选择
45
- getEventTargetNode($event, bodyElem, 'ant-time-picker-panel').flag) {
46
- return false;
47
- }
48
- }
49
31
  var VxeUIPluginRenderAntd = exports.VxeUIPluginRenderAntd = {
50
32
  install: function install(VxeUI, options) {
33
+ var pluginOpts = Object.assign({
34
+ prefixCls: 'ant-'
35
+ }, options);
51
36
  // 检查版本
52
37
  if (!/^(3)\./.test(VxeUI.uiVersion)) {
53
- console.error('[plugin-render-antd 3.x] Version 3.x is required');
38
+ console.error('[@vxe-ui/plugin-render-antd 3.0.3] Requires vxe-table 3.9.0+ version. https://vxeui.com/other3/#/plugin-export-xlsx/install');
54
39
  }
40
+ /**
41
+ * 事件兼容性处理
42
+ */
43
+ var handleClearEvent = function handleClearEvent(params) {
44
+ var $event = params.$event;
45
+ var bodyElem = document.body;
46
+ var prefixCls = pluginOpts.prefixCls;
47
+ if (
48
+ // 下拉框
49
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "select-dropdown")).flag ||
50
+ // 级联
51
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "cascader-menus")).flag ||
52
+ // 日期
53
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "picker-dropdown")).flag || getEventTargetNode($event, bodyElem, "".concat(prefixCls, "calendar-picker-container")).flag ||
54
+ // 时间选择
55
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "time-picker-panel")).flag) {
56
+ return false;
57
+ }
58
+ };
55
59
  (0, _table.defineTableRender)(VxeUI);
56
60
  (0, _form.defineFormRender)(VxeUI);
57
61
  VxeUI.interceptor.add('event.clearFilter', handleClearEvent);
package/dist/index.umd.js CHANGED
@@ -112,7 +112,7 @@
112
112
  return cellValue === null || cellValue === undefined || cellValue === '';
113
113
  }
114
114
  function getOnName(type) {
115
- return type;
115
+ return _xeUtils["default"].kebabCase(type);
116
116
  }
117
117
  function getModelProp(renderOpts) {
118
118
  var prop = 'value';
@@ -492,30 +492,34 @@
492
492
  flag: false
493
493
  };
494
494
  }
495
- /**
496
- * 事件兼容性处理
497
- */
498
- function handleClearEvent(params) {
499
- var $event = params.$event;
500
- var bodyElem = document.body;
501
- if (
502
- // 下拉框
503
- getEventTargetNode($event, bodyElem, 'ant-select-dropdown').flag ||
504
- // 级联
505
- getEventTargetNode($event, bodyElem, 'ant-cascader-menus').flag ||
506
- // 日期
507
- getEventTargetNode($event, bodyElem, 'ant-picker-dropdown').flag || getEventTargetNode($event, bodyElem, 'ant-calendar-picker-container').flag ||
508
- // 时间选择
509
- getEventTargetNode($event, bodyElem, 'ant-time-picker-panel').flag) {
510
- return false;
511
- }
512
- }
513
495
  var VxeUIPluginRenderAntd = exports.VxeUIPluginRenderAntd = {
514
496
  install: function install(VxeUI, options) {
497
+ var pluginOpts = Object.assign({
498
+ prefixCls: 'ant-'
499
+ }, options);
515
500
  // 检查版本
516
501
  if (!/^(3)\./.test(VxeUI.uiVersion)) {
517
- console.error('[plugin-render-antd 3.x] Version 3.x is required');
502
+ console.error('[@vxe-ui/plugin-render-antd 3.0.3] Requires vxe-table 3.9.0+ version. https://vxeui.com/other3/#/plugin-export-xlsx/install');
518
503
  }
504
+ /**
505
+ * 事件兼容性处理
506
+ */
507
+ var handleClearEvent = function handleClearEvent(params) {
508
+ var $event = params.$event;
509
+ var bodyElem = document.body;
510
+ var prefixCls = pluginOpts.prefixCls;
511
+ if (
512
+ // 下拉框
513
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "select-dropdown")).flag ||
514
+ // 级联
515
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "cascader-menus")).flag ||
516
+ // 日期
517
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "picker-dropdown")).flag || getEventTargetNode($event, bodyElem, "".concat(prefixCls, "calendar-picker-container")).flag ||
518
+ // 时间选择
519
+ getEventTargetNode($event, bodyElem, "".concat(prefixCls, "time-picker-panel")).flag) {
520
+ return false;
521
+ }
522
+ };
519
523
  (0, _table.defineTableRender)(VxeUI);
520
524
  (0, _form.defineFormRender)(VxeUI);
521
525
  VxeUI.interceptor.add('event.clearFilter', handleClearEvent);
@@ -606,7 +610,7 @@
606
610
  return cellValue === null || cellValue === undefined || cellValue === '';
607
611
  }
608
612
  function getOnName(type) {
609
- return type;
613
+ return _xeUtils["default"].kebabCase(type);
610
614
  }
611
615
  function getModelProp(renderOpts) {
612
616
  var prop = 'value';