venus-design 0.6.5 → 0.6.6

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.
@@ -42,4 +42,4 @@ export declare const assemblyFilterData: (column: VenusSelectDataVo[]) => VenusE
42
42
  /**
43
43
  * 警告标识
44
44
  */
45
- export declare const handleConflictFlag: (column: VenusColumns, record: any, actions: any) => React.JSX.Element | undefined;
45
+ export declare const handleConflictFlag: (column: VenusColumns, record: any, actions: any) => React.JSX.Element | null;
@@ -7,7 +7,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
7
7
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
8
8
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
9
  import React from 'react';
10
- import { dataToEnum, IconFont, isNotNullVenus, storage, VENUS_TABLE_COLUMNENUM_TYPE, VENUS_TABLE_COLUMNFILTER_TYPE, VENUS_TABLE_COLUMNRENDER_TYPE } from "./..";
10
+ import { dataToEnum, IconFont, storage, VENUS_TABLE_COLUMNENUM_TYPE, VENUS_TABLE_COLUMNFILTER_TYPE, VENUS_TABLE_COLUMNRENDER_TYPE } from "./..";
11
11
  import { VENUS_ConflictFlag_Image_Url } from "./staticAttr";
12
12
 
13
13
  /**
@@ -172,29 +172,37 @@ export var assemblyFilterData = function assemblyFilterData(column) {
172
172
  * 警告标识
173
173
  */
174
174
  export var handleConflictFlag = function handleConflictFlag(column, record, actions) {
175
- var conflictList = record.conflictList;
176
- if (isNotNullVenus(conflictList) && conflictList.length > 0) {
175
+ var _record$conflictList;
176
+ var conflictList = (_record$conflictList = record.conflictList) !== null && _record$conflictList !== void 0 ? _record$conflictList : [];
177
+
178
+ // 互斥过滤
179
+ var hasAdjusting = conflictList.some(function (v) {
180
+ return v.code === 'VC_ADJUSTING';
181
+ });
182
+ var filtered = hasAdjusting ? conflictList.filter(function (v) {
183
+ return v.code !== 'VC_ADJUSTED';
184
+ }) : conflictList;
185
+ if (!filtered.length) return null;
186
+ return /*#__PURE__*/React.createElement("div", {
187
+ style: {
188
+ display: 'flex'
189
+ }
190
+ }, filtered.map(function (v) {
177
191
  return /*#__PURE__*/React.createElement("div", {
192
+ key: v.code
193
+ },
194
+ //@ts-ignore
195
+ VENUS_ConflictFlag_Image_Url[v.iconPath] && /*#__PURE__*/React.createElement(_Tooltip, {
196
+ title: v.nameTips || v.name,
197
+ placement: "top",
198
+ color: "geekblue"
199
+ }, /*#__PURE__*/React.createElement(IconFont, {
178
200
  style: {
179
- display: "flex"
201
+ fontSize: 20
180
202
  }
181
- }, conflictList.map(function (v) {
182
- return [/*#__PURE__*/React.createElement("div", null,
183
203
  //@ts-ignore
184
- VENUS_ConflictFlag_Image_Url[v.iconPath] != undefined ? /*#__PURE__*/React.createElement(_Tooltip, {
185
- title: v.nameTips || v.name,
186
- placement: "top",
187
- color: "geekblue",
188
- key: "green"
189
- },
190
- /*#__PURE__*/
191
- //@ts-ignore
192
- React.createElement(IconFont, {
193
- style: {
194
- fontSize: 20
195
- },
196
- type: VENUS_ConflictFlag_Image_Url[v.iconPath] || "null"
197
- })) : null)];
198
- }));
199
- }
204
+ ,
205
+ type: VENUS_ConflictFlag_Image_Url[v.iconPath]
206
+ })));
207
+ }));
200
208
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venus-design",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "description": "venus all compoments",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",