matrix_components 2.0.406 → 2.0.408

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.
@@ -54768,13 +54768,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
54768
54768
  },
54769
54769
  setup(__props, { expose: __expose }) {
54770
54770
  useCssVars((_ctx) => ({
54771
- "v361296b9": customBackgroundColor.value,
54772
- "v99a9cfea": gapV.value,
54773
- "v3e00473c": superLabelWidth.value,
54774
- "v944bebb2": subLabelWidth.value,
54775
- "d2a0d39c": height.value,
54776
- "v30407ebd": labelWidth.value,
54777
- "da179374": _ctx.$props.labelColor
54771
+ "v6bb22b5f": customBackgroundColor.value,
54772
+ "v0007caa5": gapV.value,
54773
+ "v587d6588": superLabelWidth.value,
54774
+ "v2553a4cd": subLabelWidth.value,
54775
+ "v1f2a0a4c": height.value,
54776
+ "v4fcf55d7": labelWidth.value,
54777
+ "v21340dec": _ctx.$props.labelColor
54778
54778
  }));
54779
54779
  const props = __props;
54780
54780
  const initialValues = ref$1(/* @__PURE__ */ new Map());
@@ -54881,7 +54881,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
54881
54881
  rows == null ? void 0 : rows.forEach((rowInfo) => {
54882
54882
  var _a4;
54883
54883
  if (rowInfo.component) {
54884
- const componentName = (rowInfo.component.name + "").replace("-", "").toLowerCase();
54884
+ const componentName = typeof rowInfo.component === "string" ? rowInfo.component.replace("-", "").toLowerCase() : (rowInfo.component.name + "").replace("-", "").toLowerCase();
54885
54885
  if ((componentName === "elselect" || componentName === "elradiogroup" || componentName === "elcheckboxgroup" || componentName === "elradio" || componentName === "elcheckbox" || componentName === "elcascader") && !((_a4 = rowInfo.params) == null ? void 0 : _a4.props)) {
54886
54886
  rowInfo.params.props = {
54887
54887
  value: "value",
@@ -54908,14 +54908,16 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
54908
54908
  );
54909
54909
  function checkIsElempentComponent(rowInfo, name = "el") {
54910
54910
  if (rowInfo.component) {
54911
- return (rowInfo.component.name + "").toLowerCase().startsWith(name);
54911
+ const componentName = typeof rowInfo.component === "string" ? rowInfo.component.toLowerCase() : (rowInfo.component.name + "").toLowerCase();
54912
+ return componentName.startsWith(name);
54912
54913
  } else {
54913
54914
  return false;
54914
54915
  }
54915
54916
  }
54916
54917
  function isUploadComponent(rowInfo) {
54917
- var _a3;
54918
- return ((((_a3 = rowInfo == null ? void 0 : rowInfo.component) == null ? void 0 : _a3.name) || "") + "").toLowerCase().indexOf("upload") !== -1;
54918
+ if (!rowInfo.component) return false;
54919
+ const componentName = typeof rowInfo.component === "string" ? rowInfo.component.toLowerCase() : ((rowInfo.component.name || "") + "").toLowerCase();
54920
+ return componentName.indexOf("upload") !== -1;
54919
54921
  }
54920
54922
  function getComponentParams(rowInfo) {
54921
54923
  const params = { ...rowInfo.params };
@@ -54924,7 +54926,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
54924
54926
  delete params["v-length.regex"];
54925
54927
  delete params["v-length-modifier"];
54926
54928
  if (rowInfo.component) {
54927
- const componentName = (rowInfo.component.name + "").replace("-", "").toLowerCase();
54929
+ const componentName = typeof rowInfo.component === "string" ? rowInfo.component.replace("-", "").toLowerCase() : (rowInfo.component.name + "").replace("-", "").toLowerCase();
54928
54930
  if (componentName.indexOf("input") !== -1 || componentName === "elautocomplete") {
54929
54931
  params.placeholder = params.placeholder || "请输入";
54930
54932
  } else if (componentName === "elselect" || componentName === "eltimeselect" || componentName === "eltimepicker" || componentName === "eldatepicker") {
@@ -55227,27 +55229,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55227
55229
  }
55228
55230
  }
55229
55231
  function getReadOnlyDisplayValue(rowInfo) {
55230
- var _a3, _b, _c2, _d, _e, _f, _g, _h2;
55232
+ var _a3, _b, _c2, _d, _e, _f;
55231
55233
  if (!props.readOnly) {
55232
55234
  return rowInfo.value;
55233
55235
  }
55234
55236
  if (rowInfo.component && ((_a3 = rowInfo.params) == null ? void 0 : _a3.options)) {
55235
- const componentName = (rowInfo.component.name + "").replace("-", "").toLowerCase();
55237
+ const componentName = typeof rowInfo.component === "string" ? rowInfo.component.replace("-", "").toLowerCase() : (rowInfo.component.name + "").replace("-", "").toLowerCase();
55236
55238
  if (componentName.indexOf("cascader") !== -1) {
55237
55239
  return getCascaderDisplayValue(rowInfo);
55238
55240
  }
55239
- if (componentName.indexOf("autocomplete") !== -1) {
55240
- const options = rowInfo.params.options;
55241
- const valueKey = ((_b = rowInfo.params.props) == null ? void 0 : _b.value) || "value";
55242
- const labelKey = ((_c2 = rowInfo.params.props) == null ? void 0 : _c2.label) || "label";
55243
- const selectedOption = options.find((opt) => opt[valueKey] === rowInfo.value);
55244
- return selectedOption ? selectedOption[labelKey] : rowInfo.value;
55245
- }
55246
55241
  const isSelectComponent = componentName.indexOf("select") !== -1 || componentName.indexOf("radio") !== -1 || componentName.indexOf("checkbox") !== -1;
55247
55242
  if (isSelectComponent) {
55248
55243
  const options = rowInfo.params.options;
55249
- const valueKey = ((_d = rowInfo.params.props) == null ? void 0 : _d.value) || "value";
55250
- const labelKey = ((_e = rowInfo.params.props) == null ? void 0 : _e.label) || "label";
55244
+ const valueKey = ((_b = rowInfo.params.props) == null ? void 0 : _b.value) || "value";
55245
+ const labelKey = ((_c2 = rowInfo.params.props) == null ? void 0 : _c2.label) || "label";
55251
55246
  if (Array.isArray(rowInfo.value)) {
55252
55247
  const selectedLabels = rowInfo.value.map((val) => {
55253
55248
  const option = options.find((opt) => opt[valueKey] === val);
@@ -55259,25 +55254,28 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55259
55254
  return selectedOption ? selectedOption[labelKey] : rowInfo.value;
55260
55255
  }
55261
55256
  }
55262
- if (rowInfo.component && rowInfo.component.name && (rowInfo.component.name + "").toLowerCase().indexOf("switch") !== -1) {
55263
- if (rowInfo.value) {
55264
- return ((_f = rowInfo.params) == null ? void 0 : _f["active-text"]) || "启用";
55265
- } else {
55266
- return ((_g = rowInfo.params) == null ? void 0 : _g["inactive-text"]) || "禁用";
55257
+ if (rowInfo.component) {
55258
+ const componentName = typeof rowInfo.component === "string" ? rowInfo.component.toLowerCase() : ((rowInfo.component.name || "") + "").toLowerCase();
55259
+ if (componentName.indexOf("switch") !== -1) {
55260
+ if (rowInfo.value) {
55261
+ return ((_d = rowInfo.params) == null ? void 0 : _d["active-text"]) || "启用";
55262
+ } else {
55263
+ return ((_e = rowInfo.params) == null ? void 0 : _e["inactive-text"]) || "禁用";
55264
+ }
55267
55265
  }
55268
- }
55269
- if (rowInfo.component && rowInfo.component.name && (rowInfo.component.name + "").toLowerCase().indexOf("rate") !== -1) {
55270
- const max2 = ((_h2 = rowInfo.params) == null ? void 0 : _h2.max) || 5;
55271
- return `${rowInfo.value || 0}/${max2}`;
55272
- }
55273
- if (rowInfo.component && rowInfo.component.name && (rowInfo.component.name + "").toLowerCase().indexOf("slider") !== -1) {
55274
- if (Array.isArray(rowInfo.value)) {
55275
- return `${rowInfo.value[0]} - ${rowInfo.value[1]}`;
55266
+ if (componentName.indexOf("rate") !== -1) {
55267
+ const max2 = ((_f = rowInfo.params) == null ? void 0 : _f.max) || 5;
55268
+ return `${rowInfo.value || 0}/${max2}`;
55269
+ }
55270
+ if (componentName.indexOf("slider") !== -1) {
55271
+ if (Array.isArray(rowInfo.value)) {
55272
+ return `${rowInfo.value[0]} - ${rowInfo.value[1]}`;
55273
+ }
55274
+ return rowInfo.value || 0;
55275
+ }
55276
+ if (componentName.indexOf("colorpicker") !== -1) {
55277
+ return rowInfo.value || "";
55276
55278
  }
55277
- return rowInfo.value || 0;
55278
- }
55279
- if (rowInfo.component && rowInfo.component.name && (rowInfo.component.name + "").toLowerCase().indexOf("colorpicker") !== -1) {
55280
- return rowInfo.value || "";
55281
55279
  }
55282
55280
  return rowInfo.value;
55283
55281
  }
@@ -55661,7 +55659,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55661
55659
  };
55662
55660
  }
55663
55661
  });
55664
- const NsForm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-f3bf8309"]]);
55662
+ const NsForm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-a15f3f72"]]);
55665
55663
  const _hoisted_1$1 = { class: "title-image-view" };
55666
55664
  const _hoisted_2 = { class: "content-model-title" };
55667
55665
  const _hoisted_3 = { class: "title-text" };