matrix_components 2.0.413 → 2.0.415
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.
|
@@ -54779,13 +54779,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
54779
54779
|
},
|
|
54780
54780
|
setup(__props, { expose: __expose }) {
|
|
54781
54781
|
useCssVars((_ctx) => ({
|
|
54782
|
-
"
|
|
54783
|
-
"
|
|
54784
|
-
"
|
|
54785
|
-
"
|
|
54786
|
-
"
|
|
54787
|
-
"
|
|
54788
|
-
"
|
|
54782
|
+
"v41461ce4": customBackgroundColor.value,
|
|
54783
|
+
"v4d8c0496": gapV.value,
|
|
54784
|
+
"v06ef8a12": superLabelWidth.value,
|
|
54785
|
+
"v1fa309fc": subLabelWidth.value,
|
|
54786
|
+
"v1c878bfd": height.value,
|
|
54787
|
+
"v7a429708": labelWidth.value,
|
|
54788
|
+
"v244178ca": _ctx.$props.labelColor
|
|
54789
54789
|
}));
|
|
54790
54790
|
const props = __props;
|
|
54791
54791
|
const initialValues = ref$1(/* @__PURE__ */ new Map());
|
|
@@ -55297,7 +55297,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
55297
55297
|
};
|
|
55298
55298
|
});
|
|
55299
55299
|
function getCascaderDisplayValue(rowInfo) {
|
|
55300
|
-
var _a3, _b, _c2, _d;
|
|
55300
|
+
var _a3, _b, _c2, _d, _e;
|
|
55301
55301
|
if (!rowInfo.value || !((_a3 = rowInfo.params) == null ? void 0 : _a3.options)) {
|
|
55302
55302
|
return rowInfo.value;
|
|
55303
55303
|
}
|
|
@@ -55306,6 +55306,85 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
55306
55306
|
const labelKey = ((_c2 = rowInfo.params.props) == null ? void 0 : _c2.label) || "label";
|
|
55307
55307
|
const childrenKey = ((_d = rowInfo.params.props) == null ? void 0 : _d.children) || "children";
|
|
55308
55308
|
const separator = rowInfo.params.separator || " / ";
|
|
55309
|
+
const showAllLevels = rowInfo.params.showAllLevels !== false && rowInfo.params["show-all-levels"] !== false;
|
|
55310
|
+
const isMultiple = ((_e = rowInfo.params.props) == null ? void 0 : _e.multiple) === true;
|
|
55311
|
+
if (isMultiple) {
|
|
55312
|
+
let values2 = [];
|
|
55313
|
+
if (Array.isArray(rowInfo.value)) {
|
|
55314
|
+
values2 = rowInfo.value;
|
|
55315
|
+
} else if (typeof rowInfo.value === "string") {
|
|
55316
|
+
values2 = rowInfo.value.split(",").map((v) => v.trim()).filter((v) => v);
|
|
55317
|
+
} else {
|
|
55318
|
+
values2 = [rowInfo.value];
|
|
55319
|
+
}
|
|
55320
|
+
const displayPaths = [];
|
|
55321
|
+
for (const value of values2) {
|
|
55322
|
+
if (Array.isArray(value)) {
|
|
55323
|
+
const labels = [];
|
|
55324
|
+
let currentOptions = options;
|
|
55325
|
+
for (const val of value) {
|
|
55326
|
+
const currentOption = currentOptions.find((opt) => opt[valueKey] === val);
|
|
55327
|
+
if (!currentOption) {
|
|
55328
|
+
labels.push(val);
|
|
55329
|
+
break;
|
|
55330
|
+
}
|
|
55331
|
+
labels.push(currentOption[labelKey]);
|
|
55332
|
+
if (currentOption[childrenKey] && Array.isArray(currentOption[childrenKey])) {
|
|
55333
|
+
currentOptions = currentOption[childrenKey];
|
|
55334
|
+
} else {
|
|
55335
|
+
break;
|
|
55336
|
+
}
|
|
55337
|
+
}
|
|
55338
|
+
if (!showAllLevels && labels.length > 0) {
|
|
55339
|
+
displayPaths.push(labels[labels.length - 1]);
|
|
55340
|
+
} else {
|
|
55341
|
+
displayPaths.push(labels.join(separator));
|
|
55342
|
+
}
|
|
55343
|
+
} else {
|
|
55344
|
+
const findFullPath2 = (opts, targetValue, currentPath = []) => {
|
|
55345
|
+
for (const option of opts) {
|
|
55346
|
+
if (option[valueKey] === targetValue) {
|
|
55347
|
+
return [...currentPath, option[labelKey]];
|
|
55348
|
+
}
|
|
55349
|
+
if (option[childrenKey] && Array.isArray(option[childrenKey])) {
|
|
55350
|
+
const newPath = [...currentPath, option[labelKey]];
|
|
55351
|
+
const result = findFullPath2(option[childrenKey], targetValue, newPath);
|
|
55352
|
+
if (result) {
|
|
55353
|
+
return result;
|
|
55354
|
+
}
|
|
55355
|
+
}
|
|
55356
|
+
}
|
|
55357
|
+
return null;
|
|
55358
|
+
};
|
|
55359
|
+
const fullPath2 = findFullPath2(options, value);
|
|
55360
|
+
if (fullPath2 && fullPath2.length > 0) {
|
|
55361
|
+
if (!showAllLevels) {
|
|
55362
|
+
displayPaths.push(fullPath2[fullPath2.length - 1]);
|
|
55363
|
+
} else {
|
|
55364
|
+
displayPaths.push(fullPath2.join(separator));
|
|
55365
|
+
}
|
|
55366
|
+
} else {
|
|
55367
|
+
const findOptionInTree2 = (opts, targetValue) => {
|
|
55368
|
+
for (const option of opts) {
|
|
55369
|
+
if (option[valueKey] === targetValue) {
|
|
55370
|
+
return option[labelKey];
|
|
55371
|
+
}
|
|
55372
|
+
if (option[childrenKey] && Array.isArray(option[childrenKey])) {
|
|
55373
|
+
const result = findOptionInTree2(option[childrenKey], targetValue);
|
|
55374
|
+
if (result) {
|
|
55375
|
+
return option[labelKey] + separator + result;
|
|
55376
|
+
}
|
|
55377
|
+
}
|
|
55378
|
+
}
|
|
55379
|
+
return null;
|
|
55380
|
+
};
|
|
55381
|
+
const label2 = findOptionInTree2(options, value);
|
|
55382
|
+
displayPaths.push(label2 || value);
|
|
55383
|
+
}
|
|
55384
|
+
}
|
|
55385
|
+
}
|
|
55386
|
+
return displayPaths.join(",");
|
|
55387
|
+
}
|
|
55309
55388
|
if (Array.isArray(rowInfo.value)) {
|
|
55310
55389
|
const labels = [];
|
|
55311
55390
|
let currentOptions = options;
|
|
@@ -55321,8 +55400,33 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
55321
55400
|
break;
|
|
55322
55401
|
}
|
|
55323
55402
|
}
|
|
55403
|
+
if (!showAllLevels && labels.length > 0) {
|
|
55404
|
+
return labels[labels.length - 1];
|
|
55405
|
+
}
|
|
55324
55406
|
return labels.join(separator);
|
|
55325
55407
|
}
|
|
55408
|
+
const findFullPath = (opts, targetValue, currentPath = []) => {
|
|
55409
|
+
for (const option of opts) {
|
|
55410
|
+
if (option[valueKey] === targetValue) {
|
|
55411
|
+
return [...currentPath, option[labelKey]];
|
|
55412
|
+
}
|
|
55413
|
+
if (option[childrenKey] && Array.isArray(option[childrenKey])) {
|
|
55414
|
+
const newPath = [...currentPath, option[labelKey]];
|
|
55415
|
+
const result = findFullPath(option[childrenKey], targetValue, newPath);
|
|
55416
|
+
if (result) {
|
|
55417
|
+
return result;
|
|
55418
|
+
}
|
|
55419
|
+
}
|
|
55420
|
+
}
|
|
55421
|
+
return null;
|
|
55422
|
+
};
|
|
55423
|
+
const fullPath = findFullPath(options, rowInfo.value);
|
|
55424
|
+
if (fullPath && fullPath.length > 0) {
|
|
55425
|
+
if (!showAllLevels) {
|
|
55426
|
+
return fullPath[fullPath.length - 1];
|
|
55427
|
+
}
|
|
55428
|
+
return fullPath.join(separator);
|
|
55429
|
+
}
|
|
55326
55430
|
const findOptionInTree = (opts, targetValue) => {
|
|
55327
55431
|
for (const option of opts) {
|
|
55328
55432
|
if (option[valueKey] === targetValue) {
|
|
@@ -55670,7 +55774,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
55670
55774
|
};
|
|
55671
55775
|
}
|
|
55672
55776
|
});
|
|
55673
|
-
const NsForm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
55777
|
+
const NsForm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-f5dfded2"]]);
|
|
55674
55778
|
const _hoisted_1$1 = { class: "title-image-view" };
|
|
55675
55779
|
const _hoisted_2 = { class: "content-model-title" };
|
|
55676
55780
|
const _hoisted_3 = { class: "title-text" };
|
|
@@ -58585,9 +58689,8 @@ const download = (url, filename = "", method = RequestHttpEnum.GET, data = {}, b
|
|
|
58585
58689
|
return response;
|
|
58586
58690
|
});
|
|
58587
58691
|
};
|
|
58588
|
-
function downLoadLocalFile(path, name, errorCallback) {
|
|
58589
|
-
const
|
|
58590
|
-
const downloadUrl = `${window.location.origin}${baseUrl}`;
|
|
58692
|
+
function downLoadLocalFile(projectBaseUrl, path, name, errorCallback) {
|
|
58693
|
+
const downloadUrl = `${window.location.origin}${projectBaseUrl}`;
|
|
58591
58694
|
download(path, name, "get", {}, downloadUrl, {}, errorCallback);
|
|
58592
58695
|
}
|
|
58593
58696
|
function getTokenInfo() {
|