matrix_components 2.0.366 → 2.0.368

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.
@@ -54753,13 +54753,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
54753
54753
  },
54754
54754
  setup(__props, { expose: __expose }) {
54755
54755
  useCssVars((_ctx) => ({
54756
- "v52fd60ba": customBackgroundColor.value,
54757
- "v306705e1": gapV.value,
54758
- "v457e0ccc": superLabelWidth.value,
54759
- "v1e1d4d11": subLabelWidth.value,
54760
- "v96b132f0": height.value,
54761
- "v1ae797da": labelWidth.value,
54762
- "v5eb017a0": _ctx.$props.labelColor
54756
+ "v244b96b0": customBackgroundColor.value,
54757
+ "ef7fa198": gapV.value,
54758
+ "a3cc3cce": superLabelWidth.value,
54759
+ "fd5c1dc4": subLabelWidth.value,
54760
+ "v7adb871b": height.value,
54761
+ "v49c7d326": labelWidth.value,
54762
+ "fcbc6c86": _ctx.$props.labelColor
54763
54763
  }));
54764
54764
  const props = __props;
54765
54765
  const initialValues = ref$1(/* @__PURE__ */ new Map());
@@ -55052,7 +55052,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55052
55052
  };
55053
55053
  }
55054
55054
  }
55055
- function getNodeByKey(rows, key) {
55055
+ function getFormNodeByKey(key) {
55056
+ const rows = props.rows;
55056
55057
  for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {
55057
55058
  const row = rows[rowIndex];
55058
55059
  for (let colIndex = 0; colIndex < row.length; colIndex++) {
@@ -55072,7 +55073,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55072
55073
  }
55073
55074
  return null;
55074
55075
  }
55075
- function getKeyValuePairs(rows) {
55076
+ function getFormKvData() {
55077
+ const rows = props.rows;
55076
55078
  const result = {};
55077
55079
  for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {
55078
55080
  const row = rows[rowIndex];
@@ -55082,7 +55084,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55082
55084
  if ((item == null ? void 0 : item.value) && (item == null ? void 0 : item.delValue) && Array.isArray(item.value) && Array.isArray(item.delValue) && item.value.length && item.delValue.length) {
55083
55085
  result[item.key] = [...item.value, ...item.delValue];
55084
55086
  } else {
55085
- result[item.key] = item.value || "";
55087
+ result[item.key] = item.value ?? "";
55086
55088
  }
55087
55089
  }
55088
55090
  if (item.children && Array.isArray(item.children)) {
@@ -55092,7 +55094,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55092
55094
  if ((child == null ? void 0 : child.value) && (child == null ? void 0 : child.delValue) && Array.isArray(child.value) && Array.isArray(child.delValue) && child.value.length && child.delValue.length) {
55093
55095
  result[child.key] = [...child.value, ...child.delValue];
55094
55096
  } else {
55095
- result[child.key] = child.value || "";
55097
+ result[child.key] = child.value ?? "";
55096
55098
  }
55097
55099
  }
55098
55100
  }
@@ -55157,8 +55159,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55157
55159
  }
55158
55160
  }
55159
55161
  __expose({
55160
- getNodeByKey,
55161
- getKeyValuePairs,
55162
+ getFormNodeByKey,
55163
+ getFormKvData,
55162
55164
  resetForm,
55163
55165
  initDefaultValues
55164
55166
  });
@@ -55441,7 +55443,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55441
55443
  };
55442
55444
  }
55443
55445
  });
55444
- const NsForm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-d2276c6a"]]);
55446
+ const NsForm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-a4c4e2e2"]]);
55445
55447
  const _hoisted_1$1 = { class: "title-image-view" };
55446
55448
  const _hoisted_2 = { class: "content-model-title" };
55447
55449
  const _hoisted_3 = { class: "title-text" };
@@ -55482,6 +55484,27 @@ NsForm.install = (app2) => {
55482
55484
  NsFormTitle.install = (app2) => {
55483
55485
  app2.component(NsFormTitle.name, NsFormTitle);
55484
55486
  };
55487
+ function getAllFormNodeByKey(rows, key) {
55488
+ for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {
55489
+ const row = rows[rowIndex];
55490
+ for (let colIndex = 0; colIndex < row.length; colIndex++) {
55491
+ const item = row[colIndex];
55492
+ if (item.key === key) {
55493
+ return item;
55494
+ }
55495
+ if (item.children && Array.isArray(item.children)) {
55496
+ for (let childIndex = 0; childIndex < item.children.length; childIndex++) {
55497
+ const child = item.children[childIndex];
55498
+ if (child.key === key) {
55499
+ return child;
55500
+ }
55501
+ }
55502
+ }
55503
+ }
55504
+ }
55505
+ return null;
55506
+ }
55507
+ globalThis.getAllFormNodeByKey = getAllFormNodeByKey;
55485
55508
  const ir = Math.min, L0 = Math.max, Rr = Math.round, Ot = (e6) => ({
55486
55509
  x: e6,
55487
55510
  y: e6
@@ -91786,6 +91809,7 @@ export {
91786
91809
  downLoadLocalFile,
91787
91810
  download,
91788
91811
  get,
91812
+ getAllFormNodeByKey,
91789
91813
  getEncryptSm2,
91790
91814
  handleHeaderCellClass,
91791
91815
  handleSortChange,