ocpview-pro 0.1.26 → 0.1.27

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.
@@ -453,7 +453,7 @@ common.initEview = function(ViewUI2) {
453
453
  common.initAnchor(ViewUI2.Anchor);
454
454
  };
455
455
  const name = "ocpview-pro";
456
- const version$2 = "0.1.25";
456
+ const version$2 = "0.1.26";
457
457
  const title = "ocpviewPlus";
458
458
  const description = "A high quality Service UI components Library with Vue.js";
459
459
  const homepage = "";
@@ -45087,7 +45087,7 @@ const _sfc_main$A = {
45087
45087
  const code2 = params.row[fieldName];
45088
45088
  const colorGroup = colorMap[code2];
45089
45089
  const text = this.$Method.formatComboBox(code2, params.column);
45090
- const textF = this.$t(text);
45090
+ const textF = this.translateComboBoxText(text);
45091
45091
  if (colorGroup) {
45092
45092
  const style2 = {
45093
45093
  color: colorGroup.text || "",
@@ -45103,6 +45103,16 @@ const _sfc_main$A = {
45103
45103
  };
45104
45104
  el2._colorMap = colorMap;
45105
45105
  },
45106
+ translateComboBoxText(text) {
45107
+ if (typeof text !== "string") {
45108
+ return text;
45109
+ }
45110
+ const match = text.match(/^(\[[^\]]*\])([\s\S]*)$/);
45111
+ if (match) {
45112
+ return match[1] + this.$t(match[2]);
45113
+ }
45114
+ return this.$t(text);
45115
+ },
45106
45116
  initRowBtn() {
45107
45117
  if (this.enablePermissions) {
45108
45118
  let btns = [];
@@ -51850,7 +51860,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
51850
51860
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.action(_ctx.btnData[0].name))
51851
51861
  }, {
51852
51862
  default: withCtx(() => [
51853
- createTextVNode(toDisplayString$1(_ctx.$t(_ctx.btnData[0].text)) + "1", 1)
51863
+ createTextVNode(toDisplayString$1(_ctx.$t(_ctx.btnData[0].text)), 1)
51854
51864
  ]),
51855
51865
  _: 1
51856
51866
  }, 8, ["icon", "customIcon"])) : createCommentVNode("", true),
@@ -56239,7 +56249,7 @@ const _sfc_main$f = {
56239
56249
  row,
56240
56250
  item
56241
56251
  );
56242
- const valueFormat = this.$t(valueData);
56252
+ const valueFormat = this.translateComboBoxText(valueData);
56243
56253
  const colorGroup = item._colorMap[cellValue];
56244
56254
  if (colorGroup) {
56245
56255
  const styleStr = Object.entries({
@@ -56372,6 +56382,16 @@ const _sfc_main$f = {
56372
56382
  })
56373
56383
  ];
56374
56384
  },
56385
+ translateComboBoxText(text) {
56386
+ if (typeof text !== "string") {
56387
+ return text;
56388
+ }
56389
+ const match = text.match(/^(\[[^\]]*\])([\s\S]*)$/);
56390
+ if (match) {
56391
+ return match[1] + this.$t(match[2]);
56392
+ }
56393
+ return this.$t(text);
56394
+ },
56375
56395
  handleSumField(params) {
56376
56396
  const { list, field } = params;
56377
56397
  let count = 0;