@cmstops/pro-compo 0.1.83 → 0.1.84
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.
|
@@ -18,18 +18,20 @@ const _sfc_main = defineComponent({
|
|
|
18
18
|
const form = ref({});
|
|
19
19
|
const columnsKeys = computed(() => props.columns.map((column) => column.key));
|
|
20
20
|
const columnsMap = computed(() => {
|
|
21
|
-
const
|
|
21
|
+
const columnsArr = JSON.parse(JSON.stringify(props.columns));
|
|
22
|
+
const map = columnsArr.reduce((map2, column) => {
|
|
22
23
|
map2[column.key] = column;
|
|
23
24
|
return map2;
|
|
24
25
|
}, {});
|
|
25
26
|
return map;
|
|
26
27
|
});
|
|
27
28
|
const renderColumns = computed(() => {
|
|
28
|
-
|
|
29
|
+
const columnsArr = JSON.parse(JSON.stringify(props.columns));
|
|
30
|
+
let rangeKeys = columnsArr.filter((column) => column.range).map((column) => column.range);
|
|
29
31
|
rangeKeys = [...new Set(rangeKeys)];
|
|
30
|
-
const _columns =
|
|
32
|
+
const _columns = columnsArr.filter((column) => !column.range);
|
|
31
33
|
rangeKeys.forEach((key) => {
|
|
32
|
-
const rangeItem =
|
|
34
|
+
const rangeItem = columnsArr.filter((column) => column.range === key);
|
|
33
35
|
rangeItem[0].key = key;
|
|
34
36
|
_columns.push(rangeItem[0]);
|
|
35
37
|
});
|
|
@@ -60,7 +62,8 @@ const _sfc_main = defineComponent({
|
|
|
60
62
|
const renderForm = () => {
|
|
61
63
|
const _form = {};
|
|
62
64
|
const rangeTemp = {};
|
|
63
|
-
props.columns
|
|
65
|
+
const columnsArr = JSON.parse(JSON.stringify(props.columns));
|
|
66
|
+
columnsArr.forEach((column) => {
|
|
64
67
|
if (column.range) {
|
|
65
68
|
if (!rangeTemp[column.range]) {
|
|
66
69
|
rangeTemp[column.range] = { range: [] };
|
|
@@ -19,18 +19,20 @@ const _sfc_main = vue.defineComponent({
|
|
|
19
19
|
const form = vue.ref({});
|
|
20
20
|
const columnsKeys = vue.computed(() => props.columns.map((column) => column.key));
|
|
21
21
|
const columnsMap = vue.computed(() => {
|
|
22
|
-
const
|
|
22
|
+
const columnsArr = JSON.parse(JSON.stringify(props.columns));
|
|
23
|
+
const map = columnsArr.reduce((map2, column) => {
|
|
23
24
|
map2[column.key] = column;
|
|
24
25
|
return map2;
|
|
25
26
|
}, {});
|
|
26
27
|
return map;
|
|
27
28
|
});
|
|
28
29
|
const renderColumns = vue.computed(() => {
|
|
29
|
-
|
|
30
|
+
const columnsArr = JSON.parse(JSON.stringify(props.columns));
|
|
31
|
+
let rangeKeys = columnsArr.filter((column) => column.range).map((column) => column.range);
|
|
30
32
|
rangeKeys = [...new Set(rangeKeys)];
|
|
31
|
-
const _columns =
|
|
33
|
+
const _columns = columnsArr.filter((column) => !column.range);
|
|
32
34
|
rangeKeys.forEach((key) => {
|
|
33
|
-
const rangeItem =
|
|
35
|
+
const rangeItem = columnsArr.filter((column) => column.range === key);
|
|
34
36
|
rangeItem[0].key = key;
|
|
35
37
|
_columns.push(rangeItem[0]);
|
|
36
38
|
});
|
|
@@ -61,7 +63,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
61
63
|
const renderForm = () => {
|
|
62
64
|
const _form = {};
|
|
63
65
|
const rangeTemp = {};
|
|
64
|
-
props.columns
|
|
66
|
+
const columnsArr = JSON.parse(JSON.stringify(props.columns));
|
|
67
|
+
columnsArr.forEach((column) => {
|
|
65
68
|
if (column.range) {
|
|
66
69
|
if (!rangeTemp[column.range]) {
|
|
67
70
|
rangeTemp[column.range] = { range: [] };
|