@zat-design/sisyphus-react 3.3.0-beta.8 → 3.3.0-beta.9
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.
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import { validate, regExp } from '@zat-design/utils';
|
|
3
|
+
import { isString } from 'lodash';
|
|
3
4
|
import { isNullValue } from './index';
|
|
4
5
|
import locale from '../../locale';
|
|
5
6
|
export var rulesCreator = function rulesCreator(rules, label, isSelect) {
|
|
6
7
|
var _result;
|
|
7
|
-
var message = "".concat(isSelect ? "".concat(locale.ProForm.selectPlaceHolder) : "".concat(locale.ProForm.inputPlaceholder)).concat(locale.ProForm.ruleText).concat(label
|
|
8
|
+
var message = "".concat(isSelect ? "".concat(locale.ProForm.selectPlaceHolder) : "".concat(locale.ProForm.inputPlaceholder)).concat(locale.ProForm.ruleText).concat(isString(label) ? label : '');
|
|
8
9
|
var result = [];
|
|
9
10
|
result = rules.map(function (ruleItem) {
|
|
10
11
|
var rule = _objectSpread({}, ruleItem);
|
|
@@ -7,11 +7,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.rulesCreator = void 0;
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
9
|
var _utils = require("@zat-design/utils");
|
|
10
|
+
var _lodash = require("lodash");
|
|
10
11
|
var _index = require("./index");
|
|
11
12
|
var _locale = _interopRequireDefault(require("../../locale"));
|
|
12
13
|
var rulesCreator = exports.rulesCreator = function rulesCreator(rules, label, isSelect) {
|
|
13
14
|
var _result;
|
|
14
|
-
var message = "".concat(isSelect ? "".concat(_locale.default.ProForm.selectPlaceHolder) : "".concat(_locale.default.ProForm.inputPlaceholder)).concat(_locale.default.ProForm.ruleText).concat(label
|
|
15
|
+
var message = "".concat(isSelect ? "".concat(_locale.default.ProForm.selectPlaceHolder) : "".concat(_locale.default.ProForm.inputPlaceholder)).concat(_locale.default.ProForm.ruleText).concat((0, _lodash.isString)(label) ? label : '');
|
|
15
16
|
var result = [];
|
|
16
17
|
result = rules.map(function (ruleItem) {
|
|
17
18
|
var rule = (0, _objectSpread2.default)({}, ruleItem);
|