3h1-ui 2.9.5 → 2.9.6
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.
- package/es/index.js +24 -3
- package/lib/index.js +24 -3
- package/package.json +1 -1
package/es/index.js
CHANGED
|
@@ -14403,9 +14403,10 @@ const searchTypeSelect = [{ label: "等于", value: "eq" }];
|
|
|
14403
14403
|
const getGlobalAdvancedType = (fieldList, value) => {
|
|
14404
14404
|
const temp = {};
|
|
14405
14405
|
fieldList.forEach((field) => {
|
|
14406
|
-
temp[`${field}-op`] = "ct";
|
|
14407
|
-
temp[field] = value;
|
|
14406
|
+
temp[`${field}.${field}-op`] = "ct";
|
|
14407
|
+
temp[`${field}.${field}`] = value;
|
|
14408
14408
|
});
|
|
14409
|
+
temp.gexpr = fieldList.join("|");
|
|
14409
14410
|
return temp;
|
|
14410
14411
|
};
|
|
14411
14412
|
const _hoisted_1$e = { class: "shy-ui-advanced-search" };
|
|
@@ -15108,10 +15109,30 @@ function useTableFooter(propsRef, scrollRef, tableElRef, getDataSourceRef) {
|
|
|
15108
15109
|
}
|
|
15109
15110
|
return { getFooterProps };
|
|
15110
15111
|
}
|
|
15112
|
+
function deepCopy(obj) {
|
|
15113
|
+
if (typeof obj !== "object" || obj === null) {
|
|
15114
|
+
return obj;
|
|
15115
|
+
}
|
|
15116
|
+
let copy;
|
|
15117
|
+
if (Array.isArray(obj)) {
|
|
15118
|
+
copy = [];
|
|
15119
|
+
for (let i = 0; i < obj.length; i++) {
|
|
15120
|
+
copy[i] = deepCopy(obj[i]);
|
|
15121
|
+
}
|
|
15122
|
+
} else {
|
|
15123
|
+
copy = {};
|
|
15124
|
+
for (let key2 in obj) {
|
|
15125
|
+
if (Object.prototype.hasOwnProperty.call(obj, key2)) {
|
|
15126
|
+
copy[key2] = deepCopy(obj[key2]);
|
|
15127
|
+
}
|
|
15128
|
+
}
|
|
15129
|
+
}
|
|
15130
|
+
return copy;
|
|
15131
|
+
}
|
|
15111
15132
|
function useTableForm(propsRef, slots, fetch, getLoading) {
|
|
15112
15133
|
const getFormConfig = computed(() => {
|
|
15113
15134
|
const { formConfig } = unref(propsRef);
|
|
15114
|
-
const temp =
|
|
15135
|
+
const temp = deepCopy(formConfig);
|
|
15115
15136
|
temp == null ? void 0 : temp.schemas.forEach((item) => {
|
|
15116
15137
|
if (item.component === "Input") {
|
|
15117
15138
|
item.componentProps = {
|
package/lib/index.js
CHANGED
|
@@ -14405,9 +14405,10 @@ const searchTypeSelect = [{ label: "等于", value: "eq" }];
|
|
|
14405
14405
|
const getGlobalAdvancedType = (fieldList, value) => {
|
|
14406
14406
|
const temp = {};
|
|
14407
14407
|
fieldList.forEach((field) => {
|
|
14408
|
-
temp[`${field}-op`] = "ct";
|
|
14409
|
-
temp[field] = value;
|
|
14408
|
+
temp[`${field}.${field}-op`] = "ct";
|
|
14409
|
+
temp[`${field}.${field}`] = value;
|
|
14410
14410
|
});
|
|
14411
|
+
temp.gexpr = fieldList.join("|");
|
|
14411
14412
|
return temp;
|
|
14412
14413
|
};
|
|
14413
14414
|
const _hoisted_1$e = { class: "shy-ui-advanced-search" };
|
|
@@ -15110,10 +15111,30 @@ function useTableFooter(propsRef, scrollRef, tableElRef, getDataSourceRef) {
|
|
|
15110
15111
|
}
|
|
15111
15112
|
return { getFooterProps };
|
|
15112
15113
|
}
|
|
15114
|
+
function deepCopy(obj) {
|
|
15115
|
+
if (typeof obj !== "object" || obj === null) {
|
|
15116
|
+
return obj;
|
|
15117
|
+
}
|
|
15118
|
+
let copy;
|
|
15119
|
+
if (Array.isArray(obj)) {
|
|
15120
|
+
copy = [];
|
|
15121
|
+
for (let i = 0; i < obj.length; i++) {
|
|
15122
|
+
copy[i] = deepCopy(obj[i]);
|
|
15123
|
+
}
|
|
15124
|
+
} else {
|
|
15125
|
+
copy = {};
|
|
15126
|
+
for (let key2 in obj) {
|
|
15127
|
+
if (Object.prototype.hasOwnProperty.call(obj, key2)) {
|
|
15128
|
+
copy[key2] = deepCopy(obj[key2]);
|
|
15129
|
+
}
|
|
15130
|
+
}
|
|
15131
|
+
}
|
|
15132
|
+
return copy;
|
|
15133
|
+
}
|
|
15113
15134
|
function useTableForm(propsRef, slots, fetch, getLoading) {
|
|
15114
15135
|
const getFormConfig = vue.computed(() => {
|
|
15115
15136
|
const { formConfig } = vue.unref(propsRef);
|
|
15116
|
-
const temp =
|
|
15137
|
+
const temp = deepCopy(formConfig);
|
|
15117
15138
|
temp == null ? void 0 : temp.schemas.forEach((item) => {
|
|
15118
15139
|
if (item.component === "Input") {
|
|
15119
15140
|
item.componentProps = {
|