@teamix/pro 1.1.35 → 1.1.39

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.
Files changed (43) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +956 -333
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/es/actions/dialog.d.ts +9 -0
  6. package/es/actions/dialog.js +96 -26
  7. package/es/actions/index.scss +31 -0
  8. package/es/actions/link.js +4 -2
  9. package/es/actions/request.d.ts +1 -1
  10. package/es/actions/request.js +2 -2
  11. package/es/form/Components/ProField/index.d.ts +1 -84
  12. package/es/form/typing.d.ts +5 -5
  13. package/es/index.d.ts +1 -1
  14. package/es/index.js +1 -1
  15. package/es/info/components/InfoValueItem/index.js +3 -0
  16. package/es/info/components/baseInfo/index.js +29 -10
  17. package/es/info/index.js +31 -10
  18. package/es/info/typing.d.ts +3 -1
  19. package/es/page-header/index.d.ts +9 -5
  20. package/es/page-header/index.js +21 -6
  21. package/es/table/components/Filter/index.js +7 -2
  22. package/es/table/components/Filter/index.scss +1 -1
  23. package/es/table/typing.d.ts +2 -0
  24. package/lib/actions/dialog.d.ts +9 -0
  25. package/lib/actions/dialog.js +99 -25
  26. package/lib/actions/index.scss +31 -0
  27. package/lib/actions/link.js +5 -2
  28. package/lib/actions/request.d.ts +1 -1
  29. package/lib/actions/request.js +2 -2
  30. package/lib/form/Components/ProField/index.d.ts +1 -84
  31. package/lib/form/typing.d.ts +5 -5
  32. package/lib/index.d.ts +1 -1
  33. package/lib/index.js +1 -1
  34. package/lib/info/components/InfoValueItem/index.js +3 -0
  35. package/lib/info/components/baseInfo/index.js +29 -10
  36. package/lib/info/index.js +32 -11
  37. package/lib/info/typing.d.ts +3 -1
  38. package/lib/page-header/index.d.ts +9 -5
  39. package/lib/page-header/index.js +21 -6
  40. package/lib/table/components/Filter/index.js +7 -2
  41. package/lib/table/components/Filter/index.scss +1 -1
  42. package/lib/table/typing.d.ts +2 -0
  43. package/package.json +1 -1
@@ -1,162 +1,79 @@
1
1
  import React from 'react';
2
2
  declare const _default: React.ForwardRefExoticComponent<(Partial<import("@teamix/pro-field/lib/components/FieldText").IProFieldText & {
3
3
  type: "text";
4
- } & {
5
- children?: React.ReactNode;
6
4
  }> | Partial<import("@teamix/pro-field/lib/components/FieldTextArea").IProFieldTextArea & {
7
5
  type: "textarea";
8
- } & {
9
- children?: React.ReactNode;
10
6
  }> | Partial<import("@teamix/pro-field/lib/components/FieldMoney").IProFieldMoney & {
11
7
  type: "money";
12
- } & {
13
- children?: React.ReactNode;
14
8
  }> | Partial<import("@teamix/pro-field/lib/components/FieldCheckBox").IProFieldCheckBox & {
15
9
  type: "checkbox";
16
- } & {
17
- children?: React.ReactNode;
18
10
  }> | Partial<import("@teamix/pro-field/lib/components/FieldRadio").IProFieldRadio & {
19
11
  type: "radio";
20
- } & {
21
- children?: React.ReactNode;
22
12
  }> | Partial<import("@teamix/pro-field/lib/components/FieldSelect").IProFieldSelect & {
23
13
  type: "select";
24
- } & {
25
- children?: React.ReactNode;
26
14
  }> | Partial<import("@teamix/pro-field/lib/components/FieldMultipleSelect").IProFieldMultipleSelect & {
27
15
  type: "multipleSelect";
28
- } & {
29
- children?: React.ReactNode;
30
16
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDate & {
31
17
  type: "date";
32
- } & {
33
- children?: React.ReactNode;
34
18
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateWeek & {
35
19
  type: "dateWeek";
36
- } & {
37
- children?: React.ReactNode;
38
20
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateMonth & {
39
21
  type: "dateMonth";
40
- } & {
41
- children?: React.ReactNode;
42
22
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateYear & {
43
23
  type: "dateYear";
44
- } & {
45
- children?: React.ReactNode;
46
24
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateQuarter & {
47
25
  type: "dateQuarter";
48
- } & {
49
- children?: React.ReactNode;
50
26
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateRange & {
51
27
  type: "dateRange";
52
- } & {
53
- children?: React.ReactNode;
54
28
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateWeekRange & {
55
29
  type: "dateWeekRange";
56
- } & {
57
- children?: React.ReactNode;
58
30
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateMonthRange & {
59
31
  type: "dateMonthRange";
60
- } & {
61
- children?: React.ReactNode;
62
32
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateYearRange & {
63
33
  type: "dateYearRange";
64
- } & {
65
- children?: React.ReactNode;
66
34
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateQuarterRange & {
67
35
  type: "dateQuarterRange";
68
- } & {
69
- children?: React.ReactNode;
70
36
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateTime & {
71
37
  type: "dateTime";
72
- } & {
73
- children?: React.ReactNode;
74
38
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateTimeRange & {
75
39
  type: "dateTimeRange";
76
- } & {
77
- children?: React.ReactNode;
78
40
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldTime & {
79
41
  type: "time";
80
- } & {
81
- children?: React.ReactNode;
82
42
  }> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldTimeRange & {
83
43
  type: "timeRange";
84
- } & {
85
- children?: React.ReactNode;
86
44
  }> | Partial<import("@teamix/pro-field/lib/components/FieldNumber").IProFieldNumber & {
87
45
  type: "number";
88
- } & {
89
- children?: React.ReactNode;
90
46
  }> | Partial<import("@teamix/pro-field/lib/components/FieldPercent").IProFieldPercent & {
91
47
  type: "percent";
92
- } & {
93
- children?: React.ReactNode;
94
48
  }> | Partial<import("@teamix/pro-field/lib/components/FieldCascader").IProFieldCascader & {
95
49
  type: "cascader";
96
- } & {
97
- children?: React.ReactNode;
98
50
  }> | Partial<import("@teamix/pro-field/lib/components/FieldCascader").IProFieldMultipleCascader & {
99
51
  type: "multipleCascader";
100
- } & {
101
- children?: React.ReactNode;
102
52
  }> | Partial<import("@teamix/pro-field/lib/components/FieldCascader").IProFieldArbitraryCascader & {
103
53
  type: "arbitraryCascader";
104
- } & {
105
- children?: React.ReactNode;
106
54
  }> | Partial<import("@teamix/pro-field/lib/components/FieldSwitch").IProFieldSwitch & {
107
55
  type: "switch";
108
- } & {
109
- children?: React.ReactNode;
110
56
  }> | Partial<import("@teamix/pro-field/lib/components/FieldColor").IProFieldColor & {
111
57
  type: "color" | "colorSwatches" | "colorRadio" | "colorTwitter";
112
- } & {
113
- children?: React.ReactNode;
114
58
  }> | Partial<import("@teamix/pro-field/lib/components/FieldIcon").IProFieldIcon & {
115
59
  type: "icon";
116
- } & {
117
- children?: React.ReactNode;
118
60
  }> | Partial<import("@teamix/pro-field/lib/components/FieldTreeSelect").IProFieldTreeSelect & {
119
61
  type: "treeSelect";
120
- } & {
121
- children?: React.ReactNode;
122
62
  }> | Partial<import("@teamix/pro-field/lib/components/FieldJson").IProFieldJson & {
123
63
  type: "json";
124
- } & {
125
- children?: React.ReactNode;
126
64
  }> | Partial<import("@teamix/pro-field/lib/components/FieldTransfer").IProFieldTransfer & {
127
65
  type: "transfer";
128
- } & {
129
- children?: React.ReactNode;
130
66
  }> | Partial<import("@teamix/pro-field/lib/components/FieldRange").IProFieldRange & {
131
67
  type: "range";
132
- } & {
133
- children?: React.ReactNode;
134
68
  }> | Partial<import("@teamix/pro-field/lib/components/FieldPassword").IProFieldPassword & {
135
69
  type: "password";
136
- } & {
137
- children?: React.ReactNode;
138
70
  }> | Partial<import("@teamix/pro-field/lib/components/FieldSearch").IProFieldSearch & {
139
71
  type: "search";
140
- } & {
141
- children?: React.ReactNode;
142
72
  }> | Partial<import("@teamix/pro-field/lib/components/FieldTagFilter").IProFieldTagFilter & {
143
73
  type: "tagFilter";
144
- } & {
145
- children?: React.ReactNode;
146
74
  }> | Partial<import("@teamix/pro-field/lib/components/FieldTagFilter").IProFieldMultipleTagFilter & {
147
75
  type: "multipleTagPicker";
148
- } & {
149
- children?: React.ReactNode;
150
76
  }> | Partial<import("@teamix/pro-field/lib/components/FieldMenuSelect").IProFieldMenuSelect & {
151
77
  type: "menuSelect";
152
- } & {
153
- children?: React.ReactNode;
154
- }> | Pick<Partial<{
155
- [key: string]: any;
156
- type: string;
157
- value?: any;
158
- initValue?: any;
159
- } & import("@teamix/pro-field").IProBaseField & {
160
- children?: React.ReactNode;
161
- }>, string | number>) & React.RefAttributes<unknown>>;
78
+ }> | Pick<Partial<import("@teamix/pro-field").IProFieldCustom>, keyof import("@teamix/pro-field").IProFieldCustom>) & React.RefAttributes<unknown>>;
162
79
  export default _default;
@@ -33,11 +33,11 @@ export interface IFormSchemaItem {
33
33
  tooltip?: string;
34
34
  required?: boolean;
35
35
  display?: FieldDisplayTypes;
36
- visible?: boolean;
37
- hidden?: boolean;
38
- disabled?: boolean;
39
- readOnly?: boolean;
40
- readPretty?: boolean;
36
+ visible?: boolean | string;
37
+ hidden?: boolean | string;
38
+ disabled?: boolean | string;
39
+ readOnly?: boolean | string;
40
+ readPretty?: boolean | string;
41
41
  pattern?: FieldPatternTypes;
42
42
  default?: any;
43
43
  request?: IRequestConfig;
package/lib/index.d.ts CHANGED
@@ -21,5 +21,5 @@ export * from './page-container';
21
21
  export * from './page-header';
22
22
  export * from './skeleton';
23
23
  export * from './table';
24
- declare const version = "1.1.34";
24
+ declare const version = "1.1.38";
25
25
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, hooks, nocode, templates, utils, };
package/lib/index.js CHANGED
@@ -251,5 +251,5 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
251
251
  // 设置图标源
252
252
  _icon.default.setConfig(_utils.default.getTeamixIconConfig());
253
253
 
254
- var version = '1.1.34';
254
+ var version = '1.1.38';
255
255
  exports.version = version;
@@ -155,6 +155,9 @@ var InfoValueItem = function InfoValueItem(props) {
155
155
  type: "text",
156
156
  style: {
157
157
  marginLeft: '8px'
158
+ },
159
+ context: {
160
+ record: record
158
161
  }
159
162
  });
160
163
  }
@@ -37,29 +37,48 @@ var ProBaseInfo = function ProBaseInfo(props) {
37
37
  layout = props.layout,
38
38
  size = props.size;
39
39
 
40
- var defaultLayout = _layout.default[(0, _utils.getLayout)((_size$width = size === null || size === void 0 ? void 0 : size.width) !== null && _size$width !== void 0 ? _size$width : 0)]; // 获取列的布局参数
40
+ var defaultLayout = _layout.default[(0, _utils.getLayout)((_size$width = size === null || size === void 0 ? void 0 : size.width) !== null && _size$width !== void 0 ? _size$width : 0)]; // 获取列内的布局参数
41
41
 
42
42
 
43
- var getFormItemLayout = function getFormItemLayout() {
43
+ var getFormItemLayout = function getFormItemLayout(colspan) {
44
+ var formItemLayout = JSON.parse(JSON.stringify(defaultLayout.formItemLayout)); // 自定义布局
45
+
44
46
  if (layout) {
45
47
  var _layout$labelCol, _layout$wrapperCol;
46
48
 
47
- return {
48
- labelCol: (_layout$labelCol = layout === null || layout === void 0 ? void 0 : layout.labelCol) !== null && _layout$labelCol !== void 0 ? _layout$labelCol : defaultLayout.formItemLayout.labelCol,
49
- wrapperCol: (_layout$wrapperCol = layout === null || layout === void 0 ? void 0 : layout.wrapperCol) !== null && _layout$wrapperCol !== void 0 ? _layout$wrapperCol : defaultLayout.formItemLayout.wrapperCol
50
- };
49
+ var labelCol = (_layout$labelCol = layout === null || layout === void 0 ? void 0 : layout.labelCol) !== null && _layout$labelCol !== void 0 ? _layout$labelCol : defaultLayout.formItemLayout.labelCol;
50
+ var wrapperCol = (_layout$wrapperCol = layout === null || layout === void 0 ? void 0 : layout.wrapperCol) !== null && _layout$wrapperCol !== void 0 ? _layout$wrapperCol : defaultLayout.formItemLayout.wrapperCol;
51
+ formItemLayout.labelCol = labelCol;
52
+ formItemLayout.wrapperCol = wrapperCol;
53
+ }
54
+
55
+ var newLabelSpan = formItemLayout.labelCol.span;
56
+ var newWrapperSpan = formItemLayout.wrapperCol.span; // 计算合并列情况。label与wrapper需要重新计算
57
+
58
+ if (colspan) {
59
+ newLabelSpan = newLabelSpan / colspan;
60
+ newWrapperSpan = newWrapperSpan + (formItemLayout.labelCol.span - newLabelSpan);
51
61
  }
52
62
 
53
- return defaultLayout.formItemLayout;
63
+ var newFormItemLayout = {
64
+ labelCol: {
65
+ span: newLabelSpan
66
+ },
67
+ wrapperCol: {
68
+ span: newWrapperSpan
69
+ }
70
+ };
71
+ return Object.assign(formItemLayout, newFormItemLayout);
54
72
  };
55
73
 
56
74
  var renderContent = function renderContent() {
57
75
  return columns.map(function (item, index) {
58
- var _layout$span, _item$title, _item$valueType, _ref;
76
+ var _layout$span, _layout$span2, _item$title, _item$valueType, _ref, _item$colSpan;
59
77
 
60
78
  var span = item.colSpan ? defaultLayout.span * item.colSpan : defaultLayout.span;
79
+ var layoutSpan = item.colSpan ? ((_layout$span = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span !== void 0 ? _layout$span : span) * item.colSpan : (_layout$span2 = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span2 !== void 0 ? _layout$span2 : span;
61
80
  return /*#__PURE__*/_react.default.createElement(Col, {
62
- span: (_layout$span = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span !== void 0 ? _layout$span : span,
81
+ span: layoutSpan,
63
82
  key: index
64
83
  }, /*#__PURE__*/_react.default.createElement(_ProInfoItem.default, {
65
84
  label: (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : '',
@@ -73,7 +92,7 @@ var ProBaseInfo = function ProBaseInfo(props) {
73
92
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
74
93
  actionRef: actionRef
75
94
  }),
76
- baseInfoLayout: getFormItemLayout(),
95
+ baseInfoLayout: getFormItemLayout((_item$colSpan = item === null || item === void 0 ? void 0 : item.colSpan) !== null && _item$colSpan !== void 0 ? _item$colSpan : 0),
77
96
  tooltip: item.tooltip,
78
97
  tooltipIcon: item.tooltipIcon
79
98
  }));
package/lib/info/index.js CHANGED
@@ -10,11 +10,11 @@ exports.default = void 0;
10
10
 
11
11
  var _react = _interopRequireWildcard(require("react"));
12
12
 
13
- var _TableInfo = _interopRequireDefault(require("./components/TableInfo"));
13
+ var _tableInfo = _interopRequireDefault(require("./components/tableInfo"));
14
14
 
15
- var _HeaderInfo = _interopRequireDefault(require("./components/HeaderInfo"));
15
+ var _headerInfo = _interopRequireDefault(require("./components/headerInfo"));
16
16
 
17
- var _BaseInfo = _interopRequireDefault(require("./components/BaseInfo"));
17
+ var _baseInfo = _interopRequireDefault(require("./components/baseInfo"));
18
18
 
19
19
  var _InfoGroup = _interopRequireDefault(require("./components/InfoGroup"));
20
20
 
@@ -41,7 +41,7 @@ Object.keys(_typing).forEach(function (key) {
41
41
  }
42
42
  });
43
43
  });
44
- var _excluded = ["type", "url", "method", "formatResult", "params", "actionRef", "header", "onError", "className", "style", "columns", "layout", "dataSource"];
44
+ var _excluded = ["type", "url", "method", "formatResult", "params", "actionRef", "header", "onError", "className", "style", "columns", "layout", "dataSource", "loading", "extra"];
45
45
 
46
46
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
47
47
 
@@ -88,6 +88,8 @@ var ProInfo = function ProInfo(props) {
88
88
  columns = props.columns,
89
89
  layout = props.layout,
90
90
  dataSource = props.dataSource,
91
+ userLoading = props.loading,
92
+ extra = props.extra,
91
93
  others = _objectWithoutProperties(props, _excluded);
92
94
 
93
95
  var _useContext = (0, _react.useContext)(_utils.ProInfoGroupContext),
@@ -164,35 +166,54 @@ var ProInfo = function ProInfo(props) {
164
166
  getData.run({});
165
167
  }
166
168
  });
169
+
170
+ var getExtra = function getExtra() {
171
+ if (!extra) {
172
+ return undefined;
173
+ }
174
+
175
+ if ( /*#__PURE__*/(0, _react.isValidElement)(extra)) {
176
+ return extra;
177
+ }
178
+
179
+ return _objectSpread(_objectSpread({}, extra), {}, {
180
+ context: {
181
+ record: dataSource !== null && dataSource !== void 0 ? dataSource : getDataSource(getData.data)
182
+ }
183
+ });
184
+ };
185
+
167
186
  return /*#__PURE__*/_react.default.createElement("div", {
168
187
  ref: ref,
169
188
  className: "teamix-pro-info ".concat(className !== null && className !== void 0 ? className : ''),
170
189
  style: style
171
- }, /*#__PURE__*/_react.default.createElement(_.ProCard, _objectSpread(_objectSpread({
190
+ }, /*#__PURE__*/_react.default.createElement(_.ProCard, _objectSpread(_objectSpread(_objectSpread({
172
191
  compacted: true,
173
192
  hoveredShadow: false,
174
193
  bordered: false,
175
194
  backgroundColor: "transparent"
176
- }, header), others), type === 'table' && /*#__PURE__*/_react.default.createElement(_TableInfo.default, {
195
+ }, header), others), {}, {
196
+ extra: getExtra()
197
+ }), type === 'table' && /*#__PURE__*/_react.default.createElement(_tableInfo.default, {
177
198
  dataSource: dataSource,
178
199
  columns: columns,
179
- loading: loading || getData.loading,
200
+ loading: userLoading || loading || getData.loading,
180
201
  result: getDataSource(getData.data),
181
202
  actionRef: actionRef,
182
203
  layout: layout
183
- }), type === 'header' && /*#__PURE__*/_react.default.createElement(_HeaderInfo.default, {
204
+ }), type === 'header' && /*#__PURE__*/_react.default.createElement(_headerInfo.default, {
184
205
  dataSource: dataSource,
185
206
  columns: columns,
186
207
  header: header,
187
- loading: loading || getData.loading,
208
+ loading: userLoading || loading || getData.loading,
188
209
  result: getDataSource(getData.data),
189
210
  actionRef: actionRef,
190
211
  layout: layout,
191
212
  size: size
192
- }), type === 'base' && /*#__PURE__*/_react.default.createElement(_BaseInfo.default, {
213
+ }), type === 'base' && /*#__PURE__*/_react.default.createElement(_baseInfo.default, {
193
214
  dataSource: dataSource,
194
215
  columns: columns,
195
- loading: loading || getData.loading,
216
+ loading: userLoading || loading || getData.loading,
196
217
  result: getDataSource(getData.data),
197
218
  actionRef: actionRef,
198
219
  layout: layout,
@@ -41,6 +41,8 @@ export declare type ProInfoBaseProps = {
41
41
  };
42
42
  /** 布局值 */
43
43
  layout?: BaseInfoLayoutProps;
44
+ /** 加载动画 */
45
+ loading?: boolean;
44
46
  } & ProInfoHeaderProps;
45
47
  /** ProInfoItemProps info 单元格 定义 */
46
48
  export interface ProInfoItemProps {
@@ -147,7 +149,7 @@ export declare type InfoValueItemProps = {
147
149
  render?: ProInfoCellRender;
148
150
  dataSource?: IProFieldOptionItem[] | ProInfoCellFunProp;
149
151
  } & Omit<IProFieldProps, 'render' | 'dataSource'>;
150
- export declare type ProInfoHeaderProps = CardProps;
152
+ export declare type ProInfoHeaderProps = Omit<CardProps, 'loading'>;
151
153
  /** ProInfoGroupContextProps */
152
154
  export declare type ProInfoGroupContextProps = {
153
155
  /** 因为其他数据都为异步。visible 只用作标识 */
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { TagProps, CloseableProps } from '@alicloudfe/components/types/tag';
2
3
  import { ActionGroupProps } from '../actions';
3
4
  import { ProInfoProps } from '../info';
4
5
  import './index.scss';
@@ -12,11 +13,14 @@ export interface LinkItem {
12
13
  text: string;
13
14
  onClick?: (e?: React.MouseEvent<Element, MouseEvent>) => void;
14
15
  }
15
- export interface TagItem {
16
- type?: 'normal' | 'primary';
17
- color?: string;
18
- text: string;
19
- }
16
+ export declare type TagItem = (TagProps | (CloseableProps & {
17
+ closable: true;
18
+ })) & {
19
+ /**
20
+ * @deprecated 建议使用 children 代替
21
+ */
22
+ text?: string;
23
+ };
20
24
  declare type Color = 'blue' | 'green' | 'orange' | 'red' | 'yellow' | string;
21
25
  export interface DataItem {
22
26
  title: string;
@@ -25,7 +25,8 @@ var _info = _interopRequireDefault(require("../info"));
25
25
 
26
26
  require("./index.scss");
27
27
 
28
- var _excluded = ["title", "description", "icon", "iconColor", "iconBackgroundType", "iconBackgroundColor", "goback", "operation", "extra", "image", "loading", "breadcrumb", "tags", "data", "info", "children", "className", "style"];
28
+ var _excluded = ["text", "children", "closable"],
29
+ _excluded2 = ["title", "description", "icon", "iconColor", "iconBackgroundType", "iconBackgroundColor", "goback", "operation", "extra", "image", "loading", "breadcrumb", "tags", "data", "info", "children", "className", "style"];
29
30
 
30
31
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
32
 
@@ -85,15 +86,29 @@ var renderTags = function renderTags(tags) {
85
86
  return /*#__PURE__*/_react.default.createElement(_components.Tag.Group, {
86
87
  className: cls('tags')
87
88
  }, tags.map(function (tag, i) {
88
- return /*#__PURE__*/_react.default.createElement(_components.Tag, {
89
+ // @ts-ignore
90
+ var text = tag.text,
91
+ children = tag.children,
92
+ closable = tag.closable,
93
+ others = _objectWithoutProperties(tag, _excluded);
94
+
95
+ if (closable) {
96
+ return /*#__PURE__*/_react.default.createElement(_components.Tag.Closeable, _objectSpread({
97
+ key: i,
98
+ size: "large",
99
+ style: {
100
+ marginBottom: 0
101
+ }
102
+ }, others), text || children);
103
+ }
104
+
105
+ return /*#__PURE__*/_react.default.createElement(_components.Tag, _objectSpread({
89
106
  key: i,
90
107
  size: "large",
91
- type: tag.type,
92
- color: tag.color,
93
108
  style: {
94
109
  marginBottom: 0
95
110
  }
96
- }, tag.text);
111
+ }, others), text || children);
97
112
  }));
98
113
  };
99
114
 
@@ -178,7 +193,7 @@ var PageHeader = function PageHeader(props) {
178
193
  children = props.children,
179
194
  className = props.className,
180
195
  style = props.style,
181
- others = _objectWithoutProperties(props, _excluded);
196
+ others = _objectWithoutProperties(props, _excluded2);
182
197
 
183
198
  var history = (0, _reactRouterDom.useHistory)();
184
199
  var backgroundImage = image ? "url('".concat(image, "')") : undefined;
@@ -55,7 +55,9 @@ var RadioItem = _components.Menu.RadioItem;
55
55
 
56
56
  var Filter = function Filter(props) {
57
57
  var column = props.column,
58
- actionRef = props.actionRef; // 选中过滤项
58
+ actionRef = props.actionRef;
59
+ var _column$filtersWidth = column.filtersWidth,
60
+ filtersWidth = _column$filtersWidth === void 0 ? 130 : _column$filtersWidth; // 选中过滤项
59
61
 
60
62
  var _useState = (0, _react.useState)([]),
61
63
  _useState2 = _slicedToArray(_useState, 2),
@@ -174,7 +176,10 @@ var Filter = function Filter(props) {
174
176
  return setVisible(false);
175
177
  }
176
178
  }, /*#__PURE__*/_react.default.createElement("div", {
177
- className: cls()
179
+ className: cls(),
180
+ style: {
181
+ width: filtersWidth
182
+ }
178
183
  }, /*#__PURE__*/_react.default.createElement(_components.Menu, null, renderSelect(), /*#__PURE__*/_react.default.createElement("div", {
179
184
  className: cls({
180
185
  'btn-box': true
@@ -1,5 +1,5 @@
1
1
  .teamix-pro-table-toolbar-filter {
2
- width: 130px;
2
+ min-width: 130px;
3
3
  max-height: 350px;
4
4
  overflow-y: auto;
5
5
  box-shadow: var(--popup-local-shadow, 0px 6px 24px 0px rgba(0, 0, 0, 0.1));
@@ -47,6 +47,8 @@ export declare type ProColumnProps = {
47
47
  filtersMode?: 'single' | 'multiple';
48
48
  /** 表头的过滤菜单项在搜索之前的参数操作 */
49
49
  beforeFilter?: (rules: string[]) => string;
50
+ /** 表头的过滤菜单宽度 */
51
+ filtersWidth?: string | number;
50
52
  /** 操作组配置 */
51
53
  actionSchema?: ActionGroupProps;
52
54
  /** 指定列对应的字段,支持`a.b`形式的快速取值 和 数组取值 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamix/pro",
3
- "version": "1.1.35",
3
+ "version": "1.1.39",
4
4
  "description": "TeamixPro大包",
5
5
  "repository": "http://gitlab.alibaba-inc.com/teamix/pro",
6
6
  "author": "Velociraptor(迅猛龙)",