cnhis-design-vue 3.1.13-beta.7 → 3.1.13
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/packages/big-table/src/BigTable.vue.d.ts +6 -15
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +11 -2
- package/es/packages/big-table/src/bigTableEmits.js +2 -1
- package/es/packages/big-table/src/hooks/useColumnConfigAdaptor.d.ts +12 -0
- package/es/packages/big-table/src/hooks/useColumnConfigAdaptor.js +91 -0
- package/es/packages/button-print/index.d.ts +15 -1
- package/es/packages/button-print/src/ButtonPrint.vue.d.ts +199 -185
- package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +39 -4
- package/es/packages/button-print/src/utils/print.d.ts +41 -0
- package/es/packages/button-print/src/utils/print.js +325 -0
- package/es/packages/fabric-chart/index.d.ts +3 -4
- package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +3 -4
- package/es/packages/fabric-chart/src/FabricChart.vue_vue_type_script_setup_true_lang.js +21 -12
- package/es/packages/fabric-chart/src/hooks/useBottom.js +2 -3
- package/es/packages/fabric-chart/src/hooks/useCenter.js +33 -11
- package/es/packages/fabric-chart/src/hooks/useCumputedPoint.d.ts +2 -2
- package/es/packages/fabric-chart/src/hooks/useCumputedPoint.js +27 -13
- package/es/packages/fabric-chart/src/hooks/useGrid.js +18 -13
- package/es/packages/fabric-chart/src/hooks/useLeft.js +63 -40
- package/es/packages/fabric-chart/src/hooks/useRight.js +2 -2
- package/es/packages/fabric-chart/src/interface.d.ts +6 -3
- package/es/packages/fabric-chart/src/utils/index.d.ts +6815 -6815
- package/es/packages/form-render/index.d.ts +297 -0
- package/es/packages/form-render/src/FormRender.vue.d.ts +297 -0
- package/es/packages/form-render/src/FormRender.vue_vue_type_script_setup_true_lang.js +34 -24
- package/es/packages/form-render/src/components/renderer/formItem.js +6 -4
- package/es/packages/form-render/src/hooks/useAnchor.js +3 -3
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +2 -2
- package/es/packages/form-render/src/hooks/useFieldVisitor.js +3 -0
- package/es/packages/form-render/src/hooks/useFormItemDeps.js +2 -3
- package/es/packages/form-render/src/utils/index.d.ts +1 -0
- package/es/packages/form-render/src/utils/index.js +4 -1
- package/es/packages/form-render/style/index.css +25 -7
- package/es/packages/form-table/src/hooks/useNuiThemeOverrides.d.ts +4 -0
- package/es/packages/form-table/src/hooks/useNuiThemeOverrides.js +18 -0
- package/es/packages/index.css +193 -9
- package/es/packages/index.d.ts +2 -1
- package/es/packages/index.js +3 -0
- package/es/packages/steps-wheel/index.d.ts +548 -0
- package/es/packages/steps-wheel/index.js +11 -0
- package/es/packages/steps-wheel/src/StepsWheel.js +4 -0
- package/es/packages/steps-wheel/src/StepsWheel.vue.d.ts +547 -0
- package/es/packages/steps-wheel/src/StepsWheel.vue_vue_type_script_setup_true_lang.js +252 -0
- package/es/packages/steps-wheel/style/index.css +161 -0
- package/es/packages/time-line/index.d.ts +1 -0
- package/es/packages/time-line/src/TimeLine.vue.d.ts +1 -0
- package/es/packages/time-line/src/TimeLine.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/packages/time-line/style/index.css +7 -2
- package/package.json +1 -1
- package/es/packages/button-print/src/utils/print.es.min.d.ts +0 -2
- package/es/packages/button-print/src/utils/print.es.min.js +0 -2532
|
@@ -1080,13 +1080,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1080
1080
|
textColorSuccess: string;
|
|
1081
1081
|
textColorHoverSuccess: string;
|
|
1082
1082
|
textColorPressedSuccess: string;
|
|
1083
|
-
textColorFocusSuccess: string;
|
|
1084
|
-
* 删除选中scan数据
|
|
1085
|
-
*/
|
|
1083
|
+
textColorFocusSuccess: string;
|
|
1086
1084
|
textColorDisabledSuccess: string;
|
|
1087
1085
|
textColorTextSuccess: string;
|
|
1088
1086
|
textColorTextHoverSuccess: string;
|
|
1089
|
-
textColorTextPressedSuccess: string;
|
|
1087
|
+
textColorTextPressedSuccess: string; /**
|
|
1088
|
+
* 删除选中scan数据
|
|
1089
|
+
*/
|
|
1090
1090
|
textColorTextFocusSuccess: string;
|
|
1091
1091
|
textColorTextDisabledSuccess: string;
|
|
1092
1092
|
textColorGhostSuccess: string;
|
|
@@ -1100,12 +1100,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1100
1100
|
borderFocusSuccess: string;
|
|
1101
1101
|
borderDisabledSuccess: string;
|
|
1102
1102
|
rippleColorSuccess: string;
|
|
1103
|
-
colorWarning: string;
|
|
1104
|
-
* 判断是否渲染EditForm
|
|
1105
|
-
* @param {*} row
|
|
1106
|
-
* @param {*} column
|
|
1107
|
-
* @returns
|
|
1108
|
-
*/
|
|
1103
|
+
colorWarning: string;
|
|
1109
1104
|
colorHoverWarning: string;
|
|
1110
1105
|
colorPressedWarning: string;
|
|
1111
1106
|
colorFocusWarning: string;
|
|
@@ -1199,10 +1194,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1199
1194
|
colorSecondaryHover: string;
|
|
1200
1195
|
colorSecondaryPressed: string;
|
|
1201
1196
|
colorTertiary: string;
|
|
1202
|
-
/**
|
|
1203
|
-
* 避免每次点击都查询
|
|
1204
|
-
* 初始化查一次 行编辑 表单search用
|
|
1205
|
-
*/
|
|
1206
1197
|
colorTertiaryHover: string;
|
|
1207
1198
|
colorTertiaryPressed: string;
|
|
1208
1199
|
colorQuaternary: string;
|
|
@@ -1305,7 +1296,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1305
1296
|
textColorGhostSuccess: string;
|
|
1306
1297
|
textColorGhostHoverSuccess: string;
|
|
1307
1298
|
textColorGhostPressedSuccess: string;
|
|
1308
|
-
textColorGhostFocusSuccess: string;
|
|
1299
|
+
textColorGhostFocusSuccess: string;
|
|
1309
1300
|
textColorGhostDisabledSuccess: string;
|
|
1310
1301
|
borderSuccess: string;
|
|
1311
1302
|
borderHoverSuccess: string;
|
|
@@ -464,6 +464,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
464
464
|
}
|
|
465
465
|
},
|
|
466
466
|
default: (params) => {
|
|
467
|
+
var _a3;
|
|
467
468
|
if (!isEdit || item.columnName === "operatorColumn" || !item.isEdit) {
|
|
468
469
|
return formatter(params, item);
|
|
469
470
|
} else if (item.formType === "separate") {
|
|
@@ -472,7 +473,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
472
473
|
"row": params.row,
|
|
473
474
|
"col": item
|
|
474
475
|
}, null);
|
|
475
|
-
} else if (isEdit && item.isEdit && item.checkEditStatus
|
|
476
|
+
} else if (isEdit && item.isEdit && ((_a3 = item.checkEditStatus) == null ? void 0 : _a3.call(item, params))) {
|
|
476
477
|
return formatterEdit(params, item);
|
|
477
478
|
} else {
|
|
478
479
|
return createVNode("span", null, [getDefaultValue(params, item)]);
|
|
@@ -537,7 +538,15 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
537
538
|
row,
|
|
538
539
|
index: $rowIndex,
|
|
539
540
|
type: formType,
|
|
540
|
-
onFormChange
|
|
541
|
+
onFormChange,
|
|
542
|
+
onFocus: () => {
|
|
543
|
+
emit("formFocus", {
|
|
544
|
+
value: row[col.columnName],
|
|
545
|
+
row,
|
|
546
|
+
column: col,
|
|
547
|
+
index: $rowIndex
|
|
548
|
+
});
|
|
549
|
+
}
|
|
541
550
|
};
|
|
542
551
|
if (formType === "date") {
|
|
543
552
|
propsData.formattedValue = row[col.columnName];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../../es/src/types';
|
|
2
|
+
interface FormConfigLikePayload {
|
|
3
|
+
fieldList: AnyObject[];
|
|
4
|
+
rowGroupConfig: Partial<Record<'firstRowGroup' | 'secondRowGroup', AnyObject[]>>;
|
|
5
|
+
}
|
|
6
|
+
declare type EditRules = Record<string, AnyObject[]>;
|
|
7
|
+
export declare function useColumnConfigAdaptor(): {
|
|
8
|
+
formConfigLikeAdaptor: (payload: FormConfigLikePayload) => FormConfigLikePayload & {
|
|
9
|
+
editRules?: EditRules | undefined;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { isObject, cloneDeep, isString, isFunction, isArray } from 'lodash-es';
|
|
2
|
+
|
|
3
|
+
const REMOVE_PROPERTY = Symbol("remove property");
|
|
4
|
+
function useColumnConfigAdaptor() {
|
|
5
|
+
function formConfigLikeAdaptor(payload) {
|
|
6
|
+
if (!isObject(payload))
|
|
7
|
+
return { fieldList: [], rowGroupConfig: {} };
|
|
8
|
+
const editRules = {};
|
|
9
|
+
const fieldList = formConfigLikeFieldListTransfer(payload.fieldList);
|
|
10
|
+
const rowGroupConfig = payload.rowGroupConfig;
|
|
11
|
+
return { fieldList, rowGroupConfig, editRules };
|
|
12
|
+
function formConfigLikeFieldListTransfer(fieldList2) {
|
|
13
|
+
const fixedWayEnumValueMap = /* @__PURE__ */ new Map([
|
|
14
|
+
["NONE", 0],
|
|
15
|
+
["LEFT", 1],
|
|
16
|
+
["RIGHT", 2]
|
|
17
|
+
]);
|
|
18
|
+
const multipleValueMap = /* @__PURE__ */ new Map([
|
|
19
|
+
["0", false],
|
|
20
|
+
["1", true]
|
|
21
|
+
]);
|
|
22
|
+
const isEditValueMap = /* @__PURE__ */ new Map([
|
|
23
|
+
["0", 0],
|
|
24
|
+
["1", 1]
|
|
25
|
+
]);
|
|
26
|
+
const htmlTypeValueMap = new Map(["RADIO", "RADIO_BLOCK", "CHECKBOX", "CHECKBOX_BLOCK", "SELECT"].map((type) => [type, "select"]));
|
|
27
|
+
const settingMap = /* @__PURE__ */ new Map([
|
|
28
|
+
["multi_select_value", { property: "multiple", valueMap: multipleValueMap }],
|
|
29
|
+
[
|
|
30
|
+
"is_null",
|
|
31
|
+
(value, _fieldItem, _editRules) => {
|
|
32
|
+
if (value === "0")
|
|
33
|
+
return;
|
|
34
|
+
if (value === "1")
|
|
35
|
+
_editRules[_fieldItem.elementId] = [{ required: true, message: "\u5FC5\u586B" }];
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
["is_edit", { property: "isEdit", valueMap: isEditValueMap }],
|
|
39
|
+
["html_type", { property: "formType", valueMap: htmlTypeValueMap }],
|
|
40
|
+
["option", { fieldMap: /* @__PURE__ */ new Map([["text", "label"]]) }]
|
|
41
|
+
]);
|
|
42
|
+
const fieldMap = /* @__PURE__ */ new Map([
|
|
43
|
+
["sum", "isSum"],
|
|
44
|
+
["show", "isShow"],
|
|
45
|
+
["name", "title"],
|
|
46
|
+
["elementId", "columnName"],
|
|
47
|
+
["columnWidth", "colWidth"],
|
|
48
|
+
["fixedWayEnum", { property: "isFixed", valueMap: fixedWayEnumValueMap }],
|
|
49
|
+
["setting", { fieldMap: settingMap, assign: true }]
|
|
50
|
+
]);
|
|
51
|
+
return fieldList2.map((fieldItem) => transfer(fieldItem, editRules, fieldMap));
|
|
52
|
+
function transfer(fieldItem, _editRules, ruleMap) {
|
|
53
|
+
if (!ruleMap)
|
|
54
|
+
return cloneDeep(fieldItem);
|
|
55
|
+
const result = {};
|
|
56
|
+
Object.entries(fieldItem).forEach(([key, value]) => {
|
|
57
|
+
const rule = ruleMap.get(key);
|
|
58
|
+
if (!rule)
|
|
59
|
+
return result[key] = value;
|
|
60
|
+
if (rule === REMOVE_PROPERTY)
|
|
61
|
+
return;
|
|
62
|
+
if (isString(rule))
|
|
63
|
+
return result[rule] = value;
|
|
64
|
+
if (isFunction(rule))
|
|
65
|
+
return rule(value, fieldItem, _editRules);
|
|
66
|
+
if (isObject(rule)) {
|
|
67
|
+
if (rule.assign) {
|
|
68
|
+
Object.assign(result, valueTransfer(value, rule));
|
|
69
|
+
} else {
|
|
70
|
+
result[rule.property || key] = valueTransfer(value, rule);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return result;
|
|
75
|
+
function valueTransfer(value, rule) {
|
|
76
|
+
var _a, _b;
|
|
77
|
+
if (!isObject(rule) || isFunction(rule))
|
|
78
|
+
return value;
|
|
79
|
+
if (isArray(value))
|
|
80
|
+
return value.map((v) => valueTransfer(v, rule));
|
|
81
|
+
if (isObject(value))
|
|
82
|
+
return transfer(value, _editRules, rule.fieldMap);
|
|
83
|
+
return (_b = (_a = rule.valueMap) == null ? void 0 : _a.get(value)) != null ? _b : value;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return { formConfigLikeAdaptor };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { useColumnConfigAdaptor };
|
|
@@ -19,6 +19,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
19
19
|
default: string;
|
|
20
20
|
type: StringConstructor;
|
|
21
21
|
};
|
|
22
|
+
pdfLoadText: {
|
|
23
|
+
default: string;
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
};
|
|
22
26
|
formatEditText: {
|
|
23
27
|
default: string;
|
|
24
28
|
type: StringConstructor;
|
|
@@ -49,7 +53,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
49
53
|
};
|
|
50
54
|
}, {
|
|
51
55
|
$message: import("naive-ui").MessageApi;
|
|
52
|
-
printInstance:
|
|
56
|
+
printInstance: any;
|
|
53
57
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
54
58
|
printParams: {
|
|
55
59
|
type: ArrayConstructor;
|
|
@@ -70,6 +74,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
70
74
|
default: string;
|
|
71
75
|
type: StringConstructor;
|
|
72
76
|
};
|
|
77
|
+
pdfLoadText: {
|
|
78
|
+
default: string;
|
|
79
|
+
type: StringConstructor;
|
|
80
|
+
};
|
|
73
81
|
formatEditText: {
|
|
74
82
|
default: string;
|
|
75
83
|
type: StringConstructor;
|
|
@@ -133,6 +141,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
133
141
|
getOnceParams: () => string;
|
|
134
142
|
handleClickPrint: () => void;
|
|
135
143
|
handleClickPreview: () => Promise<void>;
|
|
144
|
+
handleClickPdf: () => Promise<void>;
|
|
136
145
|
handleClickEdit: () => void;
|
|
137
146
|
handleSelect: (key: any) => void;
|
|
138
147
|
handleClickOutside: () => void;
|
|
@@ -7311,6 +7320,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7311
7320
|
default: string;
|
|
7312
7321
|
type: StringConstructor;
|
|
7313
7322
|
};
|
|
7323
|
+
pdfLoadText: {
|
|
7324
|
+
default: string;
|
|
7325
|
+
type: StringConstructor;
|
|
7326
|
+
};
|
|
7314
7327
|
formatEditText: {
|
|
7315
7328
|
default: string;
|
|
7316
7329
|
type: StringConstructor;
|
|
@@ -7348,6 +7361,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7348
7361
|
btnText: string;
|
|
7349
7362
|
printText: string;
|
|
7350
7363
|
previewText: string;
|
|
7364
|
+
pdfLoadText: string;
|
|
7351
7365
|
formatEditText: string;
|
|
7352
7366
|
prevFn: Function;
|
|
7353
7367
|
queryPrintFormatByNumber: Function;
|