@blueking/bkui-form 0.0.38 → 0.0.39

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.
@@ -802,6 +802,20 @@
802
802
  complete.splice.apply(complete, [restIndex, 1].concat(_toConsumableArray(rest)));
803
803
  return complete;
804
804
  }
805
+ var getCookie = function getCookie(name) {
806
+ var cookies = document.cookie.split(';');
807
+ for (var i = 0; i < cookies.length; i++) {
808
+ var cookie = cookies[i];
809
+ var _cookie$split = cookie.split('='),
810
+ _cookie$split2 = _slicedToArray(_cookie$split, 2),
811
+ key = _cookie$split2[0],
812
+ value = _cookie$split2[1];
813
+ if (key.trim() === name) {
814
+ return value;
815
+ }
816
+ }
817
+ return null;
818
+ };
805
819
 
806
820
  /**
807
821
  * Registry注册Form组件全局相关内容
@@ -10376,6 +10390,25 @@
10376
10390
  }
10377
10391
  });
10378
10392
 
10393
+ var messages = {
10394
+ 'zh-CN': {
10395
+ add: '添加'
10396
+ },
10397
+ 'en-US': {
10398
+ add: 'Add'
10399
+ }
10400
+ };
10401
+ function locale(item) {
10402
+ var _messages$curLang;
10403
+ var curLang = getCookie('blueking_language') || 'zh-CN';
10404
+ if (['en-US', 'enUS', 'enus', 'en-us', 'en'].includes(curLang)) {
10405
+ curLang = 'en-US';
10406
+ } else {
10407
+ curLang = 'zh-CN';
10408
+ }
10409
+ return ((_messages$curLang = messages[curLang]) === null || _messages$curLang === void 0 ? void 0 : _messages$curLang[item]) || '';
10410
+ }
10411
+
10379
10412
  var _excluded$2 = ["name"];
10380
10413
  // 默认数组控件
10381
10414
  var ArrayWidget = Vue__default["default"].extend({
@@ -10466,7 +10499,7 @@
10466
10499
  }
10467
10500
  }, [h('i', {
10468
10501
  class: ['bk-icon icon-plus-circle-shape mr5']
10469
- }), '添加'])])]));
10502
+ }), locale('add')])])]));
10470
10503
  }
10471
10504
  });
10472
10505
 
@@ -10928,7 +10961,7 @@
10928
10961
  style: {
10929
10962
  'text-decoration-line': 'underline',
10930
10963
  'text-decoration-style': 'dashed',
10931
- 'cursor': 'pointer'
10964
+ cursor: 'pointer'
10932
10965
  },
10933
10966
  directives: [{
10934
10967
  name: 'bk-tooltips',