matrix_components 2.0.389 → 2.0.390

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
- "v40225fae": customBackgroundColor.value,
54772
- "v86e5deca": gapV.value,
54773
- "v4d1fe9d2": superLabelWidth.value,
54774
- "v387eb397": subLabelWidth.value,
54775
- "v6114aa7c": height.value,
54776
- "v906c6966": labelWidth.value,
54777
- "v7746a7b6": _ctx.$props.labelColor
54771
+ "v43a69490": customBackgroundColor.value,
54772
+ "ffa39558": gapV.value,
54773
+ "v3580c779": superLabelWidth.value,
54774
+ "v520e6204": subLabelWidth.value,
54775
+ "v2f60853b": height.value,
54776
+ "v1960c146": labelWidth.value,
54777
+ "v6a3290c6": _ctx.$props.labelColor
54778
54778
  }));
54779
54779
  const props = __props;
54780
54780
  const initialValues = ref$1(/* @__PURE__ */ new Map());
@@ -55136,7 +55136,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55136
55136
  for (let colIndex = 0; colIndex < row.length; colIndex++) {
55137
55137
  const item = row[colIndex];
55138
55138
  if (item.key) {
55139
- const oldValue = deepClone(item.value);
55140
55139
  if (item.defaultValue !== void 0) {
55141
55140
  item.value = deepClone(item.defaultValue);
55142
55141
  } else {
@@ -55153,24 +55152,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55153
55152
  if (item.delValue !== void 0) {
55154
55153
  item.delValue = [];
55155
55154
  }
55156
- if (JSON.stringify(oldValue) !== JSON.stringify(item.value) && item.events) {
55157
- if (item.events.change && typeof item.events.change === "function") {
55158
- setTimeout(() => {
55159
- item.events.change(item.value);
55160
- }, 0);
55161
- }
55162
- if (item.events.input && typeof item.events.input === "function") {
55163
- setTimeout(() => {
55164
- item.events.input(item.value);
55165
- }, 0);
55166
- }
55167
- }
55168
55155
  }
55169
55156
  if (item.children && Array.isArray(item.children)) {
55170
55157
  for (let childIndex = 0; childIndex < item.children.length; childIndex++) {
55171
55158
  const child = item.children[childIndex];
55172
55159
  if (child.key) {
55173
- const oldChildValue = deepClone(child.value);
55174
55160
  if (child.defaultValue !== void 0) {
55175
55161
  child.value = deepClone(child.defaultValue);
55176
55162
  } else {
@@ -55187,18 +55173,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55187
55173
  if (child.delValue !== void 0) {
55188
55174
  child.delValue = [];
55189
55175
  }
55190
- if (JSON.stringify(oldChildValue) !== JSON.stringify(child.value) && child.events) {
55191
- if (child.events.change && typeof child.events.change === "function") {
55192
- setTimeout(() => {
55193
- child.events.change(child.value);
55194
- }, 0);
55195
- }
55196
- if (child.events.input && typeof child.events.input === "function") {
55197
- setTimeout(() => {
55198
- child.events.input(child.value);
55199
- }, 0);
55200
- }
55201
- }
55202
55176
  }
55203
55177
  }
55204
55178
  }
@@ -55211,7 +55185,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55211
55185
  }
55212
55186
  }
55213
55187
  function getReadOnlyDisplayValue(rowInfo) {
55214
- var _a3, _b, _c2, _d, _e, _f;
55188
+ var _a3, _b, _c2;
55215
55189
  if (!props.readOnly) {
55216
55190
  return rowInfo.value;
55217
55191
  }
@@ -55236,26 +55210,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55236
55210
  return selectedOption ? selectedOption[labelKey] : rowInfo.value;
55237
55211
  }
55238
55212
  }
55239
- if (rowInfo.component && rowInfo.component.name && (rowInfo.component.name + "").toLowerCase().indexOf("switch") !== -1) {
55240
- if (rowInfo.value) {
55241
- return ((_d = rowInfo.params) == null ? void 0 : _d["active-text"]) || "启用";
55242
- } else {
55243
- return ((_e = rowInfo.params) == null ? void 0 : _e["inactive-text"]) || "禁用";
55244
- }
55245
- }
55246
- if (rowInfo.component && rowInfo.component.name && (rowInfo.component.name + "").toLowerCase().indexOf("rate") !== -1) {
55247
- const max2 = ((_f = rowInfo.params) == null ? void 0 : _f.max) || 5;
55248
- return `${rowInfo.value || 0}/${max2}`;
55249
- }
55250
- if (rowInfo.component && rowInfo.component.name && (rowInfo.component.name + "").toLowerCase().indexOf("slider") !== -1) {
55251
- if (Array.isArray(rowInfo.value)) {
55252
- return `${rowInfo.value[0]} - ${rowInfo.value[1]}`;
55253
- }
55254
- return rowInfo.value || 0;
55255
- }
55256
- if (rowInfo.component && rowInfo.component.name && (rowInfo.component.name + "").toLowerCase().indexOf("colorpicker") !== -1) {
55257
- return rowInfo.value || "";
55258
- }
55259
55213
  return rowInfo.value;
55260
55214
  }
55261
55215
  const getComponentValue = computed(() => {
@@ -55308,37 +55262,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55308
55262
  const label = findOptionInTree(options, rowInfo.value);
55309
55263
  return label || rowInfo.value;
55310
55264
  }
55311
- function setFormData(data) {
55312
- if (!data || typeof data !== "object") {
55313
- console.warn("setFormData: 参数必须是一个对象");
55314
- return;
55315
- }
55316
- for (const [key, value] of Object.entries(data)) {
55317
- const node = getFormNodeByKey(key);
55318
- if (node) {
55319
- node.value = value;
55320
- if (node.events) {
55321
- if (node.events.change && typeof node.events.change === "function") {
55322
- setTimeout(() => {
55323
- node.events.change(value);
55324
- }, 0);
55325
- }
55326
- if (node.events.input && typeof node.events.input === "function") {
55327
- setTimeout(() => {
55328
- node.events.input(value);
55329
- }, 0);
55330
- }
55331
- }
55332
- }
55333
- }
55334
- }
55335
55265
  __expose({
55336
- // 核心功能
55337
55266
  getFormNodeByKey,
55338
55267
  getFormKvData,
55339
- setFormData,
55340
55268
  resetForm,
55341
- // 可选
55342
55269
  initDefaultValues,
55343
55270
  getReadOnlyDisplayValue
55344
55271
  });
@@ -55476,7 +55403,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55476
55403
  createVNode(_component_el_tooltip, {
55477
55404
  "hide-after": 0,
55478
55405
  "show-after": 500,
55479
- disabled: !(__props.readOnly && (!isUploadComponent(rowInfo) && !rowInfo.readOnlyUseComponent)),
55406
+ disabled: !(__props.readOnly && !rowInfo.readOnlyUseComponent),
55480
55407
  content: getComponentValue.value(rowInfo),
55481
55408
  placement: "top-start",
55482
55409
  "popper-class": "detail-view-tooltip"
@@ -55621,7 +55548,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
55621
55548
  };
55622
55549
  }
55623
55550
  });
55624
- const NsForm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e430073e"]]);
55551
+ const NsForm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-28d91da1"]]);
55625
55552
  const _hoisted_1$1 = { class: "title-image-view" };
55626
55553
  const _hoisted_2 = { class: "content-model-title" };
55627
55554
  const _hoisted_3 = { class: "title-text" };