@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.
@@ -10229,10 +10229,12 @@ var NumberField = Vue.extend({
10229
10229
 
10230
10230
  var messages = {
10231
10231
  'zh-CN': {
10232
- add: '添加'
10232
+ add: '添加',
10233
+ required: '必填项'
10233
10234
  },
10234
10235
  'en-US': {
10235
- add: 'Add'
10236
+ add: 'Add',
10237
+ required: 'Required'
10236
10238
  }
10237
10239
  };
10238
10240
  function locale(item) {
@@ -10294,9 +10296,12 @@ var ArrayWidget = Vue.extend({
10294
10296
  },
10295
10297
  render: function render(h) {
10296
10298
  var _this = this,
10299
+ _self$value,
10297
10300
  _this$schema,
10298
10301
  _this$schema$uiProps,
10299
- _this$schema2;
10302
+ _this$schema2,
10303
+ _this$schema3,
10304
+ _this$schema3$uiProp;
10300
10305
  var self = this;
10301
10306
  var arrVnodeList = (Array.isArray(this.value) ? this.value : []).map(function (_, index) {
10302
10307
  var curPath = Path.getCurPath(_this.path, index);
@@ -10320,6 +10325,7 @@ var ArrayWidget = Vue.extend({
10320
10325
  var _Schema$getGroupWrap = Schema.getGroupWrap(this.schema),
10321
10326
  name = _Schema$getGroupWrap.name,
10322
10327
  vnode = _objectWithoutProperties(_Schema$getGroupWrap, _excluded$2);
10328
+ var error = ((_self$value = self.value) === null || _self$value === void 0 ? void 0 : _self$value.length) === 0 && self.required;
10323
10329
  return h(name, mergeDeep({
10324
10330
  props: _objectSpread2(_objectSpread2({}, this.$props), {}, {
10325
10331
  layout: {},
@@ -10331,7 +10337,9 @@ var ArrayWidget = Vue.extend({
10331
10337
  'bk-schema-form-item-auto-height': true
10332
10338
  }
10333
10339
  }, [h('span', {
10334
- 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, {
10340
+ class: ['bk-schema-form-group-add', {
10341
+ 'error': error
10342
+ }, (_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, {
10335
10343
  disabled: this.disabled,
10336
10344
  readonly: this.readonly
10337
10345
  }],
@@ -10342,7 +10350,9 @@ var ArrayWidget = Vue.extend({
10342
10350
  }
10343
10351
  }, [h('i', {
10344
10352
  class: ['bk-icon icon-plus-circle-shape mr5']
10345
- }), "".concat(locale('add')).concat(((_this$schema2 = this.schema) === null || _this$schema2 === void 0 ? void 0 : _this$schema2.title) || '')])]) : null]));
10353
+ }), "".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', {
10354
+ class: ['bk-schema-form-item__error-tips']
10355
+ }, [locale('required')])]) : null]));
10346
10356
  }
10347
10357
  });
10348
10358