@luck-design-biz/luckda 1.0.7-3 → 1.0.7-5
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 +1 -1
- package/lib/utils/form.js +1 -1
- package/package.json +1 -1
package/es/utils/form.js
CHANGED
|
@@ -77,7 +77,7 @@ export var formItemDataFormat = function formItemDataFormat() {
|
|
|
77
77
|
var translatorProps = translator(props);
|
|
78
78
|
var name = translatorProps.name,
|
|
79
79
|
dataFormat = translatorProps.dataFormat;
|
|
80
|
-
if (values[name] || values["".concat(name, "_virtual")]) switch (comName || defaultComName[property]) {
|
|
80
|
+
if (!isNil(values[name]) || !isNil(values["".concat(name, "_virtual")])) switch (comName || defaultComName[property]) {
|
|
81
81
|
case 'date':
|
|
82
82
|
result[name] = values["".concat(name, "_virtual")] ? moment(values["".concat(name, "_virtual")], 'YYYY-MM-DD HH:mm:ss') : undefined;
|
|
83
83
|
break;
|
package/lib/utils/form.js
CHANGED
|
@@ -86,7 +86,7 @@ var formItemDataFormat = exports.formItemDataFormat = function formItemDataForma
|
|
|
86
86
|
var translatorProps = (0, _form.translator)(props);
|
|
87
87
|
var name = translatorProps.name,
|
|
88
88
|
dataFormat = translatorProps.dataFormat;
|
|
89
|
-
if (values[name] || values["".concat(name, "_virtual")]) switch (comName || _form.defaultComName[property]) {
|
|
89
|
+
if (!(0, _lodash.isNil)(values[name]) || !(0, _lodash.isNil)(values["".concat(name, "_virtual")])) switch (comName || _form.defaultComName[property]) {
|
|
90
90
|
case 'date':
|
|
91
91
|
result[name] = values["".concat(name, "_virtual")] ? (0, _moment.default)(values["".concat(name, "_virtual")], 'YYYY-MM-DD HH:mm:ss') : undefined;
|
|
92
92
|
break;
|