3h1-ui 2.14.17 → 2.14.19
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 +23 -27
- package/lib/index.js +23 -27
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -7745,6 +7745,10 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
7745
7745
|
});
|
|
7746
7746
|
}
|
|
7747
7747
|
if (schema2.component === "Input") {
|
|
7748
|
+
const maxlength = (componentProps == null ? void 0 : componentProps.maxlength) === void 0 ? 100 : componentProps.maxlength;
|
|
7749
|
+
componentProps = Object.assign({}, componentProps, {
|
|
7750
|
+
maxlength
|
|
7751
|
+
});
|
|
7748
7752
|
componentProps.onInputEvent = (e) => {
|
|
7749
7753
|
flag.value += 1;
|
|
7750
7754
|
componentProps.maxlength = (componentProps == null ? void 0 : componentProps.maxlength) === void 0 ? 100 : componentProps.maxlength;
|
|
@@ -10261,15 +10265,19 @@ const _sfc_main$N = defineComponent({
|
|
|
10261
10265
|
const {
|
|
10262
10266
|
defaultValue,
|
|
10263
10267
|
component,
|
|
10268
|
+
componentProps,
|
|
10264
10269
|
isHandleDateDefaultValue = true
|
|
10265
10270
|
} = schema;
|
|
10266
|
-
if (isHandleDateDefaultValue && defaultValue && dateItemType.includes(component)) {
|
|
10271
|
+
if (isHandleDateDefaultValue && defaultValue && component && dateItemType.includes(component)) {
|
|
10272
|
+
const valueFormat = componentProps ? componentProps["valueFormat"] : null;
|
|
10267
10273
|
if (!Array.isArray(defaultValue)) {
|
|
10268
|
-
schema.defaultValue = dateUtil(defaultValue);
|
|
10274
|
+
schema.defaultValue = valueFormat ? dateUtil(defaultValue).format(valueFormat) : dateUtil(defaultValue);
|
|
10269
10275
|
} else {
|
|
10270
10276
|
const def = [];
|
|
10271
10277
|
defaultValue.forEach((item) => {
|
|
10272
|
-
def.push(
|
|
10278
|
+
def.push(
|
|
10279
|
+
valueFormat ? dateUtil(item).format(valueFormat) : dateUtil(item)
|
|
10280
|
+
);
|
|
10273
10281
|
});
|
|
10274
10282
|
schema.defaultValue = def;
|
|
10275
10283
|
}
|
|
@@ -12459,7 +12467,9 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
12459
12467
|
// showCount: true,
|
|
12460
12468
|
maxlength: 100,
|
|
12461
12469
|
size: "small",
|
|
12462
|
-
getPopupContainer: () =>
|
|
12470
|
+
getPopupContainer: (e) => {
|
|
12471
|
+
return !!index2 ? e.parentNode : unref(table2 == null ? void 0 : table2.wrapRef.value) ?? document.body;
|
|
12472
|
+
},
|
|
12463
12473
|
placeholder: createPlaceholderMessage(unref(getComponent)),
|
|
12464
12474
|
...apiSelectProps,
|
|
12465
12475
|
...compProps,
|
|
@@ -15268,30 +15278,10 @@ function useTableFooter(propsRef, scrollRef, tableElRef, getDataSourceRef) {
|
|
|
15268
15278
|
}
|
|
15269
15279
|
return { getFooterProps };
|
|
15270
15280
|
}
|
|
15271
|
-
function deepCopy(obj) {
|
|
15272
|
-
if (typeof obj !== "object" || obj === null) {
|
|
15273
|
-
return obj;
|
|
15274
|
-
}
|
|
15275
|
-
let copy;
|
|
15276
|
-
if (Array.isArray(obj)) {
|
|
15277
|
-
copy = [];
|
|
15278
|
-
for (let i = 0; i < obj.length; i++) {
|
|
15279
|
-
copy[i] = deepCopy(obj[i]);
|
|
15280
|
-
}
|
|
15281
|
-
} else {
|
|
15282
|
-
copy = {};
|
|
15283
|
-
for (const key2 in obj) {
|
|
15284
|
-
if (Object.prototype.hasOwnProperty.call(obj, key2)) {
|
|
15285
|
-
copy[key2] = deepCopy(obj[key2]);
|
|
15286
|
-
}
|
|
15287
|
-
}
|
|
15288
|
-
}
|
|
15289
|
-
return copy;
|
|
15290
|
-
}
|
|
15291
15281
|
function useTableForm(propsRef, slots, fetch, getLoading) {
|
|
15292
15282
|
const getFormConfig = computed(() => {
|
|
15293
15283
|
const { formConfig } = unref(propsRef);
|
|
15294
|
-
const temp =
|
|
15284
|
+
const temp = cloneDeep(formConfig);
|
|
15295
15285
|
temp == null ? void 0 : temp.schemas.forEach((item) => {
|
|
15296
15286
|
if (item.component === "Input") {
|
|
15297
15287
|
item.componentProps = {
|
|
@@ -17159,9 +17149,15 @@ const Description = /* @__PURE__ */ defineComponent({
|
|
|
17159
17149
|
textAlign: getProps.value.labelAlign
|
|
17160
17150
|
},
|
|
17161
17151
|
"class": `${prefixCls2}-label`
|
|
17162
|
-
}, [slots[`${item.field}Label`] ? (_b = slots[`${item.field}Label`]) == null ? void 0 : _b.call(slots
|
|
17152
|
+
}, [slots[`${item.field}Label`] ? (_b = slots[`${item.field}Label`]) == null ? void 0 : _b.call(slots, {
|
|
17153
|
+
model: getProps.value.data,
|
|
17154
|
+
field: item.label
|
|
17155
|
+
}) : item.label, ((_c = getProps.value) == null ? void 0 : _c.isShowColon) ? ":" : ""]), createVNode("span", {
|
|
17163
17156
|
"class": `${prefixCls2}-value`
|
|
17164
|
-
}, [slots[`${item.field}Value`] ? (_d = slots[`${item.field}Value`]) == null ? void 0 : _d.call(slots
|
|
17157
|
+
}, [slots[`${item.field}Value`] ? (_d = slots[`${item.field}Value`]) == null ? void 0 : _d.call(slots, {
|
|
17158
|
+
model: getProps.value.data,
|
|
17159
|
+
field: getProps.value.data[`${item.field}`]
|
|
17160
|
+
}) : getProps.value.data[`${item.field}`], (item == null ? void 0 : item.isCopy) ? createVNode("span", {
|
|
17165
17161
|
"style": "cursor:pointer;margin-left:5px",
|
|
17166
17162
|
"onClick": () => handleClick(getProps.value.data[`${item.field}`])
|
|
17167
17163
|
}, [createVNode(CopyOutlined$1, {
|
package/lib/index.js
CHANGED
|
@@ -7747,6 +7747,10 @@ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
|
7747
7747
|
});
|
|
7748
7748
|
}
|
|
7749
7749
|
if (schema2.component === "Input") {
|
|
7750
|
+
const maxlength = (componentProps == null ? void 0 : componentProps.maxlength) === void 0 ? 100 : componentProps.maxlength;
|
|
7751
|
+
componentProps = Object.assign({}, componentProps, {
|
|
7752
|
+
maxlength
|
|
7753
|
+
});
|
|
7750
7754
|
componentProps.onInputEvent = (e) => {
|
|
7751
7755
|
flag.value += 1;
|
|
7752
7756
|
componentProps.maxlength = (componentProps == null ? void 0 : componentProps.maxlength) === void 0 ? 100 : componentProps.maxlength;
|
|
@@ -10263,15 +10267,19 @@ const _sfc_main$N = vue.defineComponent({
|
|
|
10263
10267
|
const {
|
|
10264
10268
|
defaultValue,
|
|
10265
10269
|
component,
|
|
10270
|
+
componentProps,
|
|
10266
10271
|
isHandleDateDefaultValue = true
|
|
10267
10272
|
} = schema;
|
|
10268
|
-
if (isHandleDateDefaultValue && defaultValue && dateItemType.includes(component)) {
|
|
10273
|
+
if (isHandleDateDefaultValue && defaultValue && component && dateItemType.includes(component)) {
|
|
10274
|
+
const valueFormat = componentProps ? componentProps["valueFormat"] : null;
|
|
10269
10275
|
if (!Array.isArray(defaultValue)) {
|
|
10270
|
-
schema.defaultValue = utils.dateUtil(defaultValue);
|
|
10276
|
+
schema.defaultValue = valueFormat ? utils.dateUtil(defaultValue).format(valueFormat) : utils.dateUtil(defaultValue);
|
|
10271
10277
|
} else {
|
|
10272
10278
|
const def = [];
|
|
10273
10279
|
defaultValue.forEach((item) => {
|
|
10274
|
-
def.push(
|
|
10280
|
+
def.push(
|
|
10281
|
+
valueFormat ? utils.dateUtil(item).format(valueFormat) : utils.dateUtil(item)
|
|
10282
|
+
);
|
|
10275
10283
|
});
|
|
10276
10284
|
schema.defaultValue = def;
|
|
10277
10285
|
}
|
|
@@ -12461,7 +12469,9 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
|
12461
12469
|
// showCount: true,
|
|
12462
12470
|
maxlength: 100,
|
|
12463
12471
|
size: "small",
|
|
12464
|
-
getPopupContainer: () =>
|
|
12472
|
+
getPopupContainer: (e) => {
|
|
12473
|
+
return !!index2 ? e.parentNode : vue.unref(table2 == null ? void 0 : table2.wrapRef.value) ?? document.body;
|
|
12474
|
+
},
|
|
12465
12475
|
placeholder: createPlaceholderMessage(vue.unref(getComponent)),
|
|
12466
12476
|
...apiSelectProps,
|
|
12467
12477
|
...compProps,
|
|
@@ -15270,30 +15280,10 @@ function useTableFooter(propsRef, scrollRef, tableElRef, getDataSourceRef) {
|
|
|
15270
15280
|
}
|
|
15271
15281
|
return { getFooterProps };
|
|
15272
15282
|
}
|
|
15273
|
-
function deepCopy(obj) {
|
|
15274
|
-
if (typeof obj !== "object" || obj === null) {
|
|
15275
|
-
return obj;
|
|
15276
|
-
}
|
|
15277
|
-
let copy;
|
|
15278
|
-
if (Array.isArray(obj)) {
|
|
15279
|
-
copy = [];
|
|
15280
|
-
for (let i = 0; i < obj.length; i++) {
|
|
15281
|
-
copy[i] = deepCopy(obj[i]);
|
|
15282
|
-
}
|
|
15283
|
-
} else {
|
|
15284
|
-
copy = {};
|
|
15285
|
-
for (const key2 in obj) {
|
|
15286
|
-
if (Object.prototype.hasOwnProperty.call(obj, key2)) {
|
|
15287
|
-
copy[key2] = deepCopy(obj[key2]);
|
|
15288
|
-
}
|
|
15289
|
-
}
|
|
15290
|
-
}
|
|
15291
|
-
return copy;
|
|
15292
|
-
}
|
|
15293
15283
|
function useTableForm(propsRef, slots, fetch, getLoading) {
|
|
15294
15284
|
const getFormConfig = vue.computed(() => {
|
|
15295
15285
|
const { formConfig } = vue.unref(propsRef);
|
|
15296
|
-
const temp =
|
|
15286
|
+
const temp = cloneDeep(formConfig);
|
|
15297
15287
|
temp == null ? void 0 : temp.schemas.forEach((item) => {
|
|
15298
15288
|
if (item.component === "Input") {
|
|
15299
15289
|
item.componentProps = {
|
|
@@ -17161,9 +17151,15 @@ const Description = /* @__PURE__ */ vue.defineComponent({
|
|
|
17161
17151
|
textAlign: getProps.value.labelAlign
|
|
17162
17152
|
},
|
|
17163
17153
|
"class": `${prefixCls2}-label`
|
|
17164
|
-
}, [slots[`${item.field}Label`] ? (_b = slots[`${item.field}Label`]) == null ? void 0 : _b.call(slots
|
|
17154
|
+
}, [slots[`${item.field}Label`] ? (_b = slots[`${item.field}Label`]) == null ? void 0 : _b.call(slots, {
|
|
17155
|
+
model: getProps.value.data,
|
|
17156
|
+
field: item.label
|
|
17157
|
+
}) : item.label, ((_c = getProps.value) == null ? void 0 : _c.isShowColon) ? ":" : ""]), vue.createVNode("span", {
|
|
17165
17158
|
"class": `${prefixCls2}-value`
|
|
17166
|
-
}, [slots[`${item.field}Value`] ? (_d = slots[`${item.field}Value`]) == null ? void 0 : _d.call(slots
|
|
17159
|
+
}, [slots[`${item.field}Value`] ? (_d = slots[`${item.field}Value`]) == null ? void 0 : _d.call(slots, {
|
|
17160
|
+
model: getProps.value.data,
|
|
17161
|
+
field: getProps.value.data[`${item.field}`]
|
|
17162
|
+
}) : getProps.value.data[`${item.field}`], (item == null ? void 0 : item.isCopy) ? vue.createVNode("span", {
|
|
17167
17163
|
"style": "cursor:pointer;margin-left:5px",
|
|
17168
17164
|
"onClick": () => handleClick(getProps.value.data[`${item.field}`])
|
|
17169
17165
|
}, [vue.createVNode(CopyOutlined$1, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "3h1-ui",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.19",
|
|
4
4
|
"description": "",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"vue-json-pretty": "^2.2.3",
|
|
30
30
|
"vxe-table": "^4.3.6",
|
|
31
31
|
"xe-utils": "^3.5.7",
|
|
32
|
-
"@shy-plugins/
|
|
33
|
-
"@shy-plugins/
|
|
32
|
+
"@shy-plugins/utils": "1.1.1",
|
|
33
|
+
"@shy-plugins/use": "1.0.5"
|
|
34
34
|
},
|
|
35
35
|
"types": "es/ui/index.d.ts",
|
|
36
36
|
"devDependencies": {
|