@vue-ui-kit/ant 2.2.1 → 2.2.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-ui-kit/ant",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "Vue3 UI Kit based on Ant Design",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",
@@ -35,6 +35,7 @@ interface BtnOptions extends ButtonProps {
35
35
  dropdowns?: BtnOptions[];
36
36
  clickEvt?: (p: RenderTableParams) => any;
37
37
  hiddenIf?: (p: RenderTableParams) => boolean;
38
+ getProps?: (p: RenderTableParams) => Partial<ButtonProps>;
38
39
  }
39
40
  export interface RenderWorkshop {
40
41
  renderItemContent?: (
@@ -234,8 +235,10 @@ const renderBtn = (
234
235
  'icon',
235
236
  'clickEvt',
236
237
  'dropdowns',
238
+ 'getProps',
237
239
  ])}
238
240
  icon={btnOpt.icon ? <Icon icon={btnOpt.icon} /> : <Icon icon="DownOutlined" />}
241
+ {...(btnOpt.getProps?.(params) ?? {})}
239
242
  >
240
243
  {btnOpt.content || (btnOpt?.getContent?.(params) ?? '')}
241
244
  </Button>
@@ -259,9 +262,11 @@ const renderBtn = (
259
262
  'icon',
260
263
  'clickEvt',
261
264
  'dropdowns',
265
+ 'getProps',
262
266
  ])}
263
267
  disabled={(!!btnOpt.dropdowns && btnOpt.dropdowns.length > 0) || btnOpt.disabled}
264
268
  icon={btnOpt.icon ? <Icon icon={btnOpt.icon} /> : null}
269
+ {...(btnOpt.getProps?.(params) ?? {})}
265
270
  onClick={() => {
266
271
  if (btnOpt?.clickEvt) {
267
272
  btnOpt.clickEvt(params);