@blueking/bkui-form 0.0.42-beta.15 → 0.0.42-beta.16

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.
@@ -10237,10 +10237,12 @@
10237
10237
 
10238
10238
  var messages = {
10239
10239
  'zh-CN': {
10240
- add: '添加'
10240
+ add: '添加',
10241
+ required: '必填项'
10241
10242
  },
10242
10243
  'en-US': {
10243
- add: 'Add'
10244
+ add: 'Add',
10245
+ required: 'Required'
10244
10246
  }
10245
10247
  };
10246
10248
  function locale(item) {
@@ -10302,9 +10304,12 @@
10302
10304
  },
10303
10305
  render: function render(h) {
10304
10306
  var _this = this,
10307
+ _self$value,
10305
10308
  _this$schema,
10306
10309
  _this$schema$uiProps,
10307
- _this$schema2;
10310
+ _this$schema2,
10311
+ _this$schema3,
10312
+ _this$schema3$uiProp;
10308
10313
  var self = this;
10309
10314
  var arrVnodeList = (Array.isArray(this.value) ? this.value : []).map(function (_, index) {
10310
10315
  var curPath = Path.getCurPath(_this.path, index);
@@ -10328,6 +10333,7 @@
10328
10333
  var _Schema$getGroupWrap = Schema.getGroupWrap(this.schema),
10329
10334
  name = _Schema$getGroupWrap.name,
10330
10335
  vnode = _objectWithoutProperties(_Schema$getGroupWrap, _excluded$2);
10336
+ var error = ((_self$value = self.value) === null || _self$value === void 0 ? void 0 : _self$value.length) === 0 && self.required;
10331
10337
  return h(name, mergeDeep({
10332
10338
  props: _objectSpread2(_objectSpread2({}, this.$props), {}, {
10333
10339
  layout: {},
@@ -10339,7 +10345,9 @@
10339
10345
  'bk-schema-form-item-auto-height': true
10340
10346
  }
10341
10347
  }, [h('span', {
10342
- class: ['bk-schema-form-group-add', (_this$schema = this.schema) === null || _this$schema === void 0 ? void 0 : (_this$schema$uiProps = _this$schema['ui:props']) === null || _this$schema$uiProps === void 0 ? void 0 : _this$schema$uiProps.size, {
10348
+ class: ['bk-schema-form-group-add', {
10349
+ 'error': error
10350
+ }, (_this$schema = this.schema) === null || _this$schema === void 0 ? void 0 : (_this$schema$uiProps = _this$schema['ui:props']) === null || _this$schema$uiProps === void 0 ? void 0 : _this$schema$uiProps.size, {
10343
10351
  disabled: this.disabled,
10344
10352
  readonly: this.readonly
10345
10353
  }],
@@ -10350,7 +10358,9 @@
10350
10358
  }
10351
10359
  }, [h('i', {
10352
10360
  class: ['bk-icon icon-plus-circle-shape mr5']
10353
- }), "".concat(locale('add')).concat(((_this$schema2 = this.schema) === null || _this$schema2 === void 0 ? void 0 : _this$schema2.title) || '')])]) : null]));
10361
+ }), "".concat(locale('add')).concat(((_this$schema2 = this.schema) === null || _this$schema2 === void 0 ? void 0 : _this$schema2.title) || '')]), error && ((_this$schema3 = this.schema) === null || _this$schema3 === void 0 ? void 0 : (_this$schema3$uiProp = _this$schema3['ui:props']) === null || _this$schema3$uiProp === void 0 ? void 0 : _this$schema3$uiProp.size) === 'large' && h('p', {
10362
+ class: ['bk-schema-form-item__error-tips']
10363
+ }, [locale('required')])]) : null]));
10354
10364
  }
10355
10365
  });
10356
10366