@luck-design-biz/luckda 0.0.27-3 → 0.0.28-1

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/es/utils/form.js CHANGED
@@ -123,6 +123,7 @@ export var formItemDataFormat = function formItemDataFormat() {
123
123
  }
124
124
  omitValues = omit(omitValues, [name, "".concat(name, "_virtual")]);
125
125
  }, {});
126
+ console.log('omitValues', omitValues, 'data', data);
126
127
  return _objectSpread(_objectSpread({}, omitValues), data);
127
128
  };
128
129
 
@@ -186,6 +187,7 @@ export var dataFormat = function dataFormat() {
186
187
  }
187
188
  values = omit(values, [name, "".concat(name, "_virtual")]);
188
189
  }, {});
190
+ console.log('omitValues', omitValues, 'data', data);
189
191
  return _objectSpread(_objectSpread({}, values), data);
190
192
  };
191
193
 
package/es/utils/grid.js CHANGED
@@ -6,7 +6,7 @@ var _excluded = ["comName", "property"],
6
6
  _excluded3 = ["filter", "filterParams"];
7
7
  import React from 'react';
8
8
  import { getDvaApp } from 'umi';
9
- import { merge, isNil, isArray, includes, capitalize } from 'lodash';
9
+ import { merge, isNil, isArray, includes, capitalize, isObject } from 'lodash';
10
10
  import { Switch, Tag } from 'luck-design/antd';
11
11
  import moment from 'moment';
12
12
  import UploadGridCell from "../upload/GridCell";
@@ -45,11 +45,11 @@ export function getColumnRender(name, type) {
45
45
  case 'select':
46
46
  case 'group':
47
47
  render = function render(text, record) {
48
- if (record["".concat(name, "_virtual")]) return record["".concat(name, "_virtual")];
49
48
  if (isArray(text)) return text.map(function (i) {
50
49
  return i.label;
51
50
  }).join(',');
52
- if (!isNil(text)) return text.label;
51
+ if (isObject(text)) return text.label;
52
+ if (record["".concat(name, "_virtual")]) return record["".concat(name, "_virtual")];
53
53
  };
54
54
  break;
55
55
  case 'switch':
package/lib/utils/form.js CHANGED
@@ -132,6 +132,7 @@ var formItemDataFormat = exports.formItemDataFormat = function formItemDataForma
132
132
  }
133
133
  omitValues = (0, _lodash.omit)(omitValues, [name, "".concat(name, "_virtual")]);
134
134
  }, {});
135
+ console.log('omitValues', omitValues, 'data', data);
135
136
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, omitValues), data);
136
137
  };
137
138
 
@@ -195,6 +196,7 @@ var dataFormat = exports.dataFormat = function dataFormat() {
195
196
  }
196
197
  values = (0, _lodash.omit)(values, [name, "".concat(name, "_virtual")]);
197
198
  }, {});
199
+ console.log('omitValues', omitValues, 'data', data);
198
200
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, values), data);
199
201
  };
200
202
 
package/lib/utils/grid.js CHANGED
@@ -53,11 +53,11 @@ function getColumnRender(name, type) {
53
53
  case 'select':
54
54
  case 'group':
55
55
  render = function render(text, record) {
56
- if (record["".concat(name, "_virtual")]) return record["".concat(name, "_virtual")];
57
56
  if ((0, _lodash.isArray)(text)) return text.map(function (i) {
58
57
  return i.label;
59
58
  }).join(',');
60
- if (!(0, _lodash.isNil)(text)) return text.label;
59
+ if ((0, _lodash.isObject)(text)) return text.label;
60
+ if (record["".concat(name, "_virtual")]) return record["".concat(name, "_virtual")];
61
61
  };
62
62
  break;
63
63
  case 'switch':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luck-design-biz/luckda",
3
- "version": "0.0.27-3",
3
+ "version": "0.0.28-1",
4
4
  "description": "前端配置管理中心业务组件库",
5
5
  "scripts": {
6
6
  "start": "cross-env NODE_OPTIONS=--max-old-space-size=10240 USER_RUNTIME=SITE RUNTIME=dev umi dev",