@bchr/bchr-front-lib 0.3.117 → 0.3.121
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.
|
@@ -336,7 +336,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
336
336
|
label: dataItem.label,
|
|
337
337
|
name: dataItem.name,
|
|
338
338
|
rules: [{
|
|
339
|
-
required: !dataItem.
|
|
339
|
+
required: !dataItem.b_readonly && dataItem.required
|
|
340
340
|
}]
|
|
341
341
|
}, dataItem.render));
|
|
342
342
|
}
|
|
@@ -641,7 +641,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
641
641
|
required: !dataItem.b_readonly && b_required,
|
|
642
642
|
message: "请填写" + name,
|
|
643
643
|
whitespace: true,
|
|
644
|
-
validator: _this2.validator.bind(_assertThisInitialized(_this2), !dataItem.
|
|
644
|
+
validator: _this2.validator.bind(_assertThisInitialized(_this2), !dataItem.b_readonly && b_required, ui_render_type)
|
|
645
645
|
}, {
|
|
646
646
|
required: false,
|
|
647
647
|
message: name + "格式不正确",
|
|
@@ -649,7 +649,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
649
649
|
validator: _this2.formatValidator.bind(_assertThisInitialized(_this2)),
|
|
650
650
|
pattern: regexp_pattern
|
|
651
651
|
}],
|
|
652
|
-
hasFeedback: !dataItem.
|
|
652
|
+
hasFeedback: !dataItem.b_readonly && b_required,
|
|
653
653
|
valuePropName: valuePropName ? valuePropName : "value"
|
|
654
654
|
}, component));
|
|
655
655
|
});
|
|
@@ -324,7 +324,7 @@ var HttpService = /*#__PURE__*/function () {
|
|
|
324
324
|
var containsHTML = /<(noframes|noscript|object|script|video).*?<\/\2>/i.test(str);
|
|
325
325
|
|
|
326
326
|
if (containsHTML) {
|
|
327
|
-
throw new Error("
|
|
327
|
+
throw new Error("不安全的输入,请检查!【" + str + "】");
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
}, {
|
|
@@ -364,7 +364,7 @@ var HttpService = /*#__PURE__*/function () {
|
|
|
364
364
|
var containsHTML = /<(br|basefont|hr|input|source|frame|param|area|meta|!--|col|link|option|base|img|wbr|!DOCTYPE).*?>|<(a|abbr|acronym|address|applet|article|aside|audio|b|bdi|bdo|big|blockquote|body|button|canvas|caption|center|cite|code|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frameset|head|header|hgroup|h1|h2|h3|h4|h5|h6|html|i|iframe|ins|kbd|keygen|label|legend|li|map|mark|menu|meter|nav|noframes|noscript|object|ol|optgroup|output|p|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video).*?<\/\2>/i.test(str);
|
|
365
365
|
|
|
366
366
|
if (containsHTML) {
|
|
367
|
-
throw new Error("
|
|
367
|
+
throw new Error("不安全的输入,请检查!【" + str + "】");
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
}, {
|
package/package.json
CHANGED
|
@@ -326,7 +326,7 @@ class FormForModify extends React.Component{
|
|
|
326
326
|
key={form_id + "_" + dataItem.code}
|
|
327
327
|
label={dataItem.label}
|
|
328
328
|
name={dataItem.name}
|
|
329
|
-
rules={[{ required: !dataItem.
|
|
329
|
+
rules={[{ required: !dataItem.b_readonly && dataItem.required}]}
|
|
330
330
|
>
|
|
331
331
|
{dataItem.render}
|
|
332
332
|
</Form.Item>
|
|
@@ -728,10 +728,10 @@ class FormForModify extends React.Component{
|
|
|
728
728
|
name={code}
|
|
729
729
|
initialValue={initialValue}
|
|
730
730
|
rules={[
|
|
731
|
-
{required: (!dataItem.b_readonly && b_required), message: ("请填写" + name), whitespace: true, validator: this.validator.bind(this, (!dataItem.
|
|
731
|
+
{required: (!dataItem.b_readonly && b_required), message: ("请填写" + name), whitespace: true, validator: this.validator.bind(this, (!dataItem.b_readonly && b_required), ui_render_type)},
|
|
732
732
|
{required: false, message: (name + "格式不正确"), whitespace: true, validator: this.formatValidator.bind(this), pattern: regexp_pattern}
|
|
733
733
|
]}
|
|
734
|
-
hasFeedback={(!dataItem.
|
|
734
|
+
hasFeedback={(!dataItem.b_readonly && b_required)}
|
|
735
735
|
valuePropName={valuePropName ? valuePropName : "value"}
|
|
736
736
|
>
|
|
737
737
|
{component}
|
|
@@ -303,7 +303,7 @@ class HttpService {
|
|
|
303
303
|
|
|
304
304
|
let containsHTML = /<(noframes|noscript|object|script|video).*?<\/\2>/i.test(str);
|
|
305
305
|
if (containsHTML) {
|
|
306
|
-
throw new Error("
|
|
306
|
+
throw new Error("不安全的输入,请检查!【" + str + "】");
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
|
|
@@ -341,7 +341,7 @@ class HttpService {
|
|
|
341
341
|
|
|
342
342
|
let containsHTML = /<(br|basefont|hr|input|source|frame|param|area|meta|!--|col|link|option|base|img|wbr|!DOCTYPE).*?>|<(a|abbr|acronym|address|applet|article|aside|audio|b|bdi|bdo|big|blockquote|body|button|canvas|caption|center|cite|code|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frameset|head|header|hgroup|h1|h2|h3|h4|h5|h6|html|i|iframe|ins|kbd|keygen|label|legend|li|map|mark|menu|meter|nav|noframes|noscript|object|ol|optgroup|output|p|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video).*?<\/\2>/i.test(str);
|
|
343
343
|
if (containsHTML) {
|
|
344
|
-
throw new Error("
|
|
344
|
+
throw new Error("不安全的输入,请检查!【" + str + "】");
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
|