cnhis-design-vue 3.1.14-beta.16 → 3.1.14-beta.17
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/index.d.ts +13 -0
- package/es/packages/big-table/src/BigTable.vue.d.ts +18 -19
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +3 -0
- package/es/packages/big-table/src/bigTableProps.d.ts +4 -0
- package/es/packages/big-table/src/bigTableProps.js +1 -0
- package/es/packages/big-table/src/components/edit-form/edit-date.js +11 -3
- package/es/packages/big-table/src/components/edit-form/edit-input.js +15 -4
- package/es/packages/big-table/src/components/edit-form/edit-time.d.ts +43 -0
- package/es/packages/big-table/src/components/edit-form/edit-time.js +52 -0
- package/es/packages/big-table/src/hooks/useColumnConfigAdaptor.js +51 -12
- package/es/packages/big-table/src/hooks/useEdit.d.ts +42 -0
- package/es/packages/big-table/src/hooks/useEdit.js +2 -0
- package/es/packages/big-table/src/hooks/useFormat.js +8 -1
- package/es/packages/big-table/style/index.css +11 -0
- package/es/packages/button-print/src/utils/print.d.ts +1 -1
- package/es/packages/button-print/src/utils/print.js +4 -4
- package/es/packages/form-render/index.d.ts +0 -1
- package/es/packages/form-render/src/FormRender.js +2 -2
- package/es/packages/form-render/src/FormRender.vue.d.ts +0 -1
- package/es/packages/form-render/src/components/renderer/cascader.d.ts +4 -4
- package/es/packages/form-render/src/components/renderer/cascader.js +44 -45
- package/es/packages/form-render/src/components/renderer/combination.js +9 -9
- package/es/packages/form-render/src/components/renderer/formItem.js +1 -1
- package/es/packages/form-render/src/components/renderer/radio.d.ts +12 -4
- package/es/packages/form-render/src/components/renderer/radio.js +23 -5
- package/es/packages/form-render/src/components/renderer/select.js +45 -49
- package/es/packages/form-render/src/components/renderer/simpleComponent.d.ts +3 -2
- package/es/packages/form-render/src/hooks/useAsyncQueue.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useChangeContext.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useChangeContext.js +1 -1
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +2 -2
- package/es/packages/form-render/src/hooks/useFormItemDeps.d.ts +4 -3
- package/es/packages/form-render/src/hooks/useFormRequest.d.ts +2 -2
- package/es/packages/form-render/src/types/fieldItem.d.ts +122 -35
- package/es/packages/form-render/src/types/index.d.ts +4 -2
- package/es/packages/form-render/src/utils/index.d.ts +3 -6
- package/es/packages/index.css +14 -0
- package/es/packages/info-header/style/index.css +3 -0
- package/es/packages/shortcut-setter/index.d.ts +0 -1
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +0 -1
- package/es/src/utils/anime.d.ts +1 -1
- package/global.d.ts +8 -8
- package/package.json +1 -1
|
@@ -9,6 +9,10 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
9
9
|
type: NumberConstructor;
|
|
10
10
|
default: number;
|
|
11
11
|
};
|
|
12
|
+
checkboxBindRowClick: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
12
16
|
showFooter: BooleanConstructor;
|
|
13
17
|
sumData: {
|
|
14
18
|
type: ObjectConstructor;
|
|
@@ -2591,6 +2595,10 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2591
2595
|
type: NumberConstructor;
|
|
2592
2596
|
default: number;
|
|
2593
2597
|
};
|
|
2598
|
+
checkboxBindRowClick: {
|
|
2599
|
+
type: BooleanConstructor;
|
|
2600
|
+
default: boolean;
|
|
2601
|
+
};
|
|
2594
2602
|
showFooter: BooleanConstructor;
|
|
2595
2603
|
sumData: {
|
|
2596
2604
|
type: ObjectConstructor;
|
|
@@ -4074,6 +4082,10 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4074
4082
|
type: NumberConstructor;
|
|
4075
4083
|
default: number;
|
|
4076
4084
|
};
|
|
4085
|
+
checkboxBindRowClick: {
|
|
4086
|
+
type: BooleanConstructor;
|
|
4087
|
+
default: boolean;
|
|
4088
|
+
};
|
|
4077
4089
|
showFooter: BooleanConstructor;
|
|
4078
4090
|
sumData: {
|
|
4079
4091
|
type: ObjectConstructor;
|
|
@@ -4269,6 +4281,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4269
4281
|
columnConfig: Record<string, any>;
|
|
4270
4282
|
menuConfig: Record<string, any>;
|
|
4271
4283
|
maxCheckSize: number;
|
|
4284
|
+
checkboxBindRowClick: boolean;
|
|
4272
4285
|
sumData: Record<string, any>;
|
|
4273
4286
|
avgData: Record<string, any>;
|
|
4274
4287
|
refreshRow: number;
|
|
@@ -7,6 +7,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
type: NumberConstructor;
|
|
8
8
|
default: number;
|
|
9
9
|
};
|
|
10
|
+
checkboxBindRowClick: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
10
14
|
showFooter: BooleanConstructor;
|
|
11
15
|
sumData: {
|
|
12
16
|
type: ObjectConstructor;
|
|
@@ -1109,9 +1113,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1109
1113
|
textColorFocusWarning: string;
|
|
1110
1114
|
textColorDisabledWarning: string;
|
|
1111
1115
|
textColorTextWarning: string;
|
|
1112
|
-
textColorTextHoverWarning: string;
|
|
1113
|
-
* 删除选中scan数据
|
|
1114
|
-
*/
|
|
1116
|
+
textColorTextHoverWarning: string;
|
|
1115
1117
|
textColorTextPressedWarning: string;
|
|
1116
1118
|
textColorTextFocusWarning: string;
|
|
1117
1119
|
textColorTextDisabledWarning: string;
|
|
@@ -1155,14 +1157,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1155
1157
|
waveOpacity: string;
|
|
1156
1158
|
fontWeight: string;
|
|
1157
1159
|
fontWeightStrong: string;
|
|
1158
|
-
/**
|
|
1159
|
-
* 初始化props
|
|
1160
|
-
* @param {*} unionItem
|
|
1161
|
-
* @param {*} row
|
|
1162
|
-
* @param {*} column
|
|
1163
|
-
* @param {*} $rowIndex
|
|
1164
|
-
* @returns
|
|
1165
|
-
*/
|
|
1166
1160
|
paddingTiny: string;
|
|
1167
1161
|
paddingSmall: string;
|
|
1168
1162
|
paddingMedium: string;
|
|
@@ -1214,10 +1208,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1214
1208
|
colorDisabled: string;
|
|
1215
1209
|
textColor: string;
|
|
1216
1210
|
textColorTertiary: string;
|
|
1217
|
-
textColorHover: string;
|
|
1218
|
-
* 单个form提交成功数据
|
|
1219
|
-
* @param {*} obj formData
|
|
1220
|
-
*/
|
|
1211
|
+
textColorHover: string;
|
|
1221
1212
|
textColorPressed: string;
|
|
1222
1213
|
textColorFocus: string;
|
|
1223
1214
|
textColorDisabled: string;
|
|
@@ -1259,12 +1250,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1259
1250
|
textColorGhostDisabledPrimary: string;
|
|
1260
1251
|
borderPrimary: string;
|
|
1261
1252
|
borderHoverPrimary: string;
|
|
1262
|
-
/**
|
|
1263
|
-
* tsx渲染表格
|
|
1264
|
-
*/
|
|
1265
1253
|
borderPressedPrimary: string;
|
|
1266
1254
|
borderFocusPrimary: string;
|
|
1267
|
-
borderDisabledPrimary: string;
|
|
1255
|
+
borderDisabledPrimary: string; /**
|
|
1256
|
+
* tsx渲染表格
|
|
1257
|
+
*/
|
|
1268
1258
|
rippleColorPrimary: string;
|
|
1269
1259
|
colorInfo: string;
|
|
1270
1260
|
colorHoverInfo: string;
|
|
@@ -2605,6 +2595,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2605
2595
|
type: NumberConstructor;
|
|
2606
2596
|
default: number;
|
|
2607
2597
|
};
|
|
2598
|
+
checkboxBindRowClick: {
|
|
2599
|
+
type: BooleanConstructor;
|
|
2600
|
+
default: boolean;
|
|
2601
|
+
};
|
|
2608
2602
|
showFooter: BooleanConstructor;
|
|
2609
2603
|
sumData: {
|
|
2610
2604
|
type: ObjectConstructor;
|
|
@@ -4103,6 +4097,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4103
4097
|
type: NumberConstructor;
|
|
4104
4098
|
default: number;
|
|
4105
4099
|
};
|
|
4100
|
+
checkboxBindRowClick: {
|
|
4101
|
+
type: BooleanConstructor;
|
|
4102
|
+
default: boolean;
|
|
4103
|
+
};
|
|
4106
4104
|
showFooter: BooleanConstructor;
|
|
4107
4105
|
sumData: {
|
|
4108
4106
|
type: ObjectConstructor;
|
|
@@ -4298,6 +4296,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4298
4296
|
columnConfig: Record<string, any>;
|
|
4299
4297
|
menuConfig: Record<string, any>;
|
|
4300
4298
|
maxCheckSize: number;
|
|
4299
|
+
checkboxBindRowClick: boolean;
|
|
4301
4300
|
sumData: Record<string, any>;
|
|
4302
4301
|
avgData: Record<string, any>;
|
|
4303
4302
|
refreshRow: number;
|
|
@@ -1341,6 +1341,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1341
1341
|
}
|
|
1342
1342
|
isAboutNestTable.value && emit("setNestLastClickTable", table, props.isNestTable, row[handleRowId.value], row);
|
|
1343
1343
|
emit("setNestTableClick", false);
|
|
1344
|
+
if (!props.checkboxBindRowClick) {
|
|
1345
|
+
return;
|
|
1346
|
+
}
|
|
1344
1347
|
if (props.isNestTable) {
|
|
1345
1348
|
table == null ? void 0 : table.setAllCheckboxRow(false);
|
|
1346
1349
|
nestHandleClickRow(table, data);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const bigTableProps = {
|
|
2
2
|
data: { type: Array, default: () => [] },
|
|
3
3
|
maxCheckSize: { type: Number, default: 0 },
|
|
4
|
+
checkboxBindRowClick: { type: Boolean, default: true },
|
|
4
5
|
showFooter: Boolean,
|
|
5
6
|
sumData: { type: Object, default: () => ({}) },
|
|
6
7
|
avgData: { type: Object, default: () => ({}) },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode, mergeProps } from 'vue';
|
|
2
|
+
import { isFunction } from 'lodash-es';
|
|
2
3
|
import { NDatePicker } from 'naive-ui';
|
|
3
4
|
|
|
4
5
|
var EditDate = defineComponent({
|
|
@@ -94,16 +95,23 @@ var EditDate = defineComponent({
|
|
|
94
95
|
}
|
|
95
96
|
};
|
|
96
97
|
};
|
|
98
|
+
function customDateDisabledDecorator(customDateDisabled) {
|
|
99
|
+
if (!isFunction(customDateDisabled))
|
|
100
|
+
return null;
|
|
101
|
+
return (ts) => {
|
|
102
|
+
return customDateDisabled(ts, props.row);
|
|
103
|
+
};
|
|
104
|
+
}
|
|
97
105
|
const config = {
|
|
98
|
-
type: props.col.type || "datetime",
|
|
106
|
+
type: props.col.type || props.col.dateType || "datetime",
|
|
99
107
|
clearable: props.col.clearable || true,
|
|
100
108
|
disabled: props.col.disabled || false,
|
|
101
109
|
valueFormat: props.col.valueFormat || "yyyy-MM-dd HH:mm:ss",
|
|
102
|
-
isDateDisabled: props.col.isDateDisabled || isDateDisabled,
|
|
110
|
+
isDateDisabled: customDateDisabledDecorator(props.col.isDateDisabled) || isDateDisabled,
|
|
103
111
|
placeholder: props.col.placeholder || "\u8BF7\u9009\u62E9"
|
|
104
112
|
};
|
|
105
113
|
if (config.type.includes("time")) {
|
|
106
|
-
config.isTimeDisabled = props.col.isTimeDisabled || isTimeDisabled;
|
|
114
|
+
config.isTimeDisabled = customDateDisabledDecorator(props.col.isTimeDisabled) || isTimeDisabled;
|
|
107
115
|
}
|
|
108
116
|
return () => createVNode(NDatePicker, mergeProps(attrs, config, {
|
|
109
117
|
"onUpdateFormattedValue": onConfirm
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createVNode, mergeProps } from 'vue';
|
|
1
|
+
import { defineComponent, ref, createVNode, mergeProps } from 'vue';
|
|
2
2
|
import { NInput, NInputNumber } from 'naive-ui';
|
|
3
3
|
|
|
4
4
|
var EditInput = defineComponent({
|
|
@@ -29,9 +29,9 @@ var EditInput = defineComponent({
|
|
|
29
29
|
emits: ["formChange"],
|
|
30
30
|
setup(props, {
|
|
31
31
|
attrs,
|
|
32
|
-
slots,
|
|
33
32
|
emit
|
|
34
33
|
}) {
|
|
34
|
+
const __value = ref(attrs.value);
|
|
35
35
|
const onUpdateValue = (value) => {
|
|
36
36
|
emit("formChange", {
|
|
37
37
|
value,
|
|
@@ -40,11 +40,22 @@ var EditInput = defineComponent({
|
|
|
40
40
|
index: props.index
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
|
+
function onBlur() {
|
|
44
|
+
emit("formChange", {
|
|
45
|
+
value: __value.value,
|
|
46
|
+
row: props.row,
|
|
47
|
+
column: props.col,
|
|
48
|
+
index: props.index
|
|
49
|
+
});
|
|
50
|
+
}
|
|
43
51
|
const config = {
|
|
44
|
-
placeholder: props.col.placeholder || "\u8BF7\u8F93\u5165"
|
|
52
|
+
placeholder: props.col.placeholder || "\u8BF7\u8F93\u5165",
|
|
53
|
+
...props.col.componentProps || {}
|
|
45
54
|
};
|
|
46
55
|
return () => props.type === "input" ? createVNode(NInput, mergeProps(attrs, config, {
|
|
47
|
-
"
|
|
56
|
+
"value": __value.value,
|
|
57
|
+
"onUpdate:value": ($event) => __value.value = $event,
|
|
58
|
+
"onBlur": onBlur
|
|
48
59
|
}), null) : createVNode(NInputNumber, mergeProps(attrs, config, {
|
|
49
60
|
"onUpdateValue": onUpdateValue
|
|
50
61
|
}), null);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
type: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
col: {
|
|
7
|
+
type: ObjectConstructor;
|
|
8
|
+
default: () => {};
|
|
9
|
+
};
|
|
10
|
+
row: {
|
|
11
|
+
type: ObjectConstructor;
|
|
12
|
+
default: () => {};
|
|
13
|
+
};
|
|
14
|
+
index: {
|
|
15
|
+
type: (NumberConstructor | ObjectConstructor)[];
|
|
16
|
+
default: number;
|
|
17
|
+
};
|
|
18
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
type: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
col: {
|
|
24
|
+
type: ObjectConstructor;
|
|
25
|
+
default: () => {};
|
|
26
|
+
};
|
|
27
|
+
row: {
|
|
28
|
+
type: ObjectConstructor;
|
|
29
|
+
default: () => {};
|
|
30
|
+
};
|
|
31
|
+
index: {
|
|
32
|
+
type: (NumberConstructor | ObjectConstructor)[];
|
|
33
|
+
default: number;
|
|
34
|
+
};
|
|
35
|
+
}>> & {
|
|
36
|
+
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
type: string;
|
|
39
|
+
col: Record<string, any>;
|
|
40
|
+
row: Record<string, any>;
|
|
41
|
+
index: number | Record<string, any>;
|
|
42
|
+
}>;
|
|
43
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent, createVNode, mergeProps } from 'vue';
|
|
2
|
+
import { NTimePicker } from 'naive-ui';
|
|
3
|
+
|
|
4
|
+
var editTime = defineComponent({
|
|
5
|
+
name: "EditTime",
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
components: {
|
|
8
|
+
NTimePicker
|
|
9
|
+
},
|
|
10
|
+
props: {
|
|
11
|
+
type: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "input"
|
|
14
|
+
},
|
|
15
|
+
col: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default: () => ({})
|
|
18
|
+
},
|
|
19
|
+
row: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: () => ({})
|
|
22
|
+
},
|
|
23
|
+
index: {
|
|
24
|
+
type: [Number, Object],
|
|
25
|
+
default: 0
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
emits: ["formChange"],
|
|
29
|
+
setup(props, {
|
|
30
|
+
attrs,
|
|
31
|
+
emit
|
|
32
|
+
}) {
|
|
33
|
+
const onUpdateValue = (value) => {
|
|
34
|
+
emit("formChange", {
|
|
35
|
+
value,
|
|
36
|
+
row: props.row,
|
|
37
|
+
column: props.col,
|
|
38
|
+
index: props.index
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const config = {
|
|
42
|
+
placeholder: props.col.placeholder || "\u8BF7\u9009\u62E9",
|
|
43
|
+
valueFormat: props.col.valueFormat || "HH:mm",
|
|
44
|
+
...props.col.componentProps || {}
|
|
45
|
+
};
|
|
46
|
+
return () => createVNode(NTimePicker, mergeProps(attrs, config, {
|
|
47
|
+
"onUpdateValue": onUpdateValue
|
|
48
|
+
}), null);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export { editTime as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cloneDeep, isString, isFunction, isArray } from 'lodash-es';
|
|
2
|
+
import { isObject } from '@vue/shared';
|
|
2
3
|
|
|
3
4
|
const REMOVE_PROPERTY = Symbol("remove property");
|
|
4
5
|
function useColumnConfigAdaptor() {
|
|
@@ -23,21 +24,59 @@ function useColumnConfigAdaptor() {
|
|
|
23
24
|
["1", 1]
|
|
24
25
|
]);
|
|
25
26
|
const htmlTypeValueMap = new Map([
|
|
26
|
-
...["RADIO", "RADIO_BLOCK", "CHECKBOX", "CHECKBOX_BLOCK", "SELECT"].map((type) => [
|
|
27
|
+
...["RADIO", "RADIO_BLOCK", "CHECKBOX", "CHECKBOX_BLOCK", "SELECT", "SWITCH_COMPONENT"].map((type) => [
|
|
28
|
+
type,
|
|
29
|
+
"select"
|
|
30
|
+
]),
|
|
27
31
|
...["INPUT"].map((type) => [type, "input"]),
|
|
28
32
|
...["DIGITAL"].map((type) => [type, "number"])
|
|
29
33
|
]);
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
const isNullHandler = (value, result, _fieldItem, _editRules) => {
|
|
35
|
+
if (value === "1")
|
|
36
|
+
return;
|
|
37
|
+
if (value === "0")
|
|
38
|
+
_editRules[_fieldItem.val_key] = [{ required: true, message: "\u5FC5\u586B" }];
|
|
39
|
+
};
|
|
40
|
+
const validateHandler = (value, result) => {
|
|
41
|
+
if (!isObject(value))
|
|
42
|
+
return;
|
|
43
|
+
result.componentProps = Object.assign({}, result.comonentProps, {
|
|
44
|
+
maxlength: value.max_length,
|
|
45
|
+
minlength: value.min_length,
|
|
46
|
+
max: value.max_value,
|
|
47
|
+
min: value.min_value,
|
|
48
|
+
precision: value.decimal_length
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
const dateRangeValidate = (value, result) => {
|
|
52
|
+
if (!isObject(value))
|
|
53
|
+
return;
|
|
54
|
+
result.isDateDisabled = (ts, row) => {
|
|
55
|
+
if (!isObject(row))
|
|
56
|
+
return;
|
|
57
|
+
const { startDate, endDate } = value;
|
|
58
|
+
let invalid = false;
|
|
59
|
+
if (startDate) {
|
|
60
|
+
invalid = new Date(row[startDate]).getTime() > ts;
|
|
39
61
|
}
|
|
40
|
-
|
|
62
|
+
if (endDate) {
|
|
63
|
+
invalid = invalid || new Date(row[endDate]).getTime() < ts;
|
|
64
|
+
}
|
|
65
|
+
return invalid;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
const switchOptionHandler = (value, result) => {
|
|
69
|
+
if (!isObject(value))
|
|
70
|
+
return;
|
|
71
|
+
const option = { label: value.describe, ...value };
|
|
72
|
+
result.options = isArray(result.options) ? [...result.options, option] : [option];
|
|
73
|
+
};
|
|
74
|
+
const settingMap = new Map([
|
|
75
|
+
["multi_select_value", { property: "multiple", valueMap: multipleValueMap }],
|
|
76
|
+
["is_null", isNullHandler],
|
|
77
|
+
["validate", validateHandler],
|
|
78
|
+
["dateValidate", dateRangeValidate],
|
|
79
|
+
...["open", "close"].map((key) => [key, switchOptionHandler]),
|
|
41
80
|
["is_edit", { property: "isEdit", valueMap: isEditValueMap }],
|
|
42
81
|
["html_type", { property: "formType", valueMap: htmlTypeValueMap }],
|
|
43
82
|
["option", { property: "options", fieldMap: /* @__PURE__ */ new Map([["text", "label"]]) }]
|
|
@@ -150,6 +150,48 @@ export declare const comps: {
|
|
|
150
150
|
row: Record<string, any>;
|
|
151
151
|
index: number | Record<string, any>;
|
|
152
152
|
}>;
|
|
153
|
+
time: import("vue").DefineComponent<{
|
|
154
|
+
type: {
|
|
155
|
+
type: StringConstructor;
|
|
156
|
+
default: string;
|
|
157
|
+
};
|
|
158
|
+
col: {
|
|
159
|
+
type: ObjectConstructor;
|
|
160
|
+
default: () => {};
|
|
161
|
+
};
|
|
162
|
+
row: {
|
|
163
|
+
type: ObjectConstructor;
|
|
164
|
+
default: () => {};
|
|
165
|
+
};
|
|
166
|
+
index: {
|
|
167
|
+
type: (NumberConstructor | ObjectConstructor)[];
|
|
168
|
+
default: number;
|
|
169
|
+
};
|
|
170
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
171
|
+
type: {
|
|
172
|
+
type: StringConstructor;
|
|
173
|
+
default: string;
|
|
174
|
+
};
|
|
175
|
+
col: {
|
|
176
|
+
type: ObjectConstructor;
|
|
177
|
+
default: () => {};
|
|
178
|
+
};
|
|
179
|
+
row: {
|
|
180
|
+
type: ObjectConstructor;
|
|
181
|
+
default: () => {};
|
|
182
|
+
};
|
|
183
|
+
index: {
|
|
184
|
+
type: (NumberConstructor | ObjectConstructor)[];
|
|
185
|
+
default: number;
|
|
186
|
+
};
|
|
187
|
+
}>> & {
|
|
188
|
+
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
189
|
+
}, {
|
|
190
|
+
type: string;
|
|
191
|
+
col: Record<string, any>;
|
|
192
|
+
row: Record<string, any>;
|
|
193
|
+
index: number | Record<string, any>;
|
|
194
|
+
}>;
|
|
153
195
|
separate: import("vue").DefineComponent<{
|
|
154
196
|
col: {
|
|
155
197
|
type: import("vue").PropType<import("../../../../src/types").AnyObject>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import EditTime from '../../../../packages/big-table/src/components/edit-form/edit-time';
|
|
1
2
|
import EditInput from '../components/edit-form/edit-input.js';
|
|
2
3
|
import EditSelect from '../components/edit-form/edit-select.js';
|
|
3
4
|
import EditDate from '../components/edit-form/edit-date.js';
|
|
@@ -8,6 +9,7 @@ const comps = {
|
|
|
8
9
|
number: EditInput,
|
|
9
10
|
select: EditSelect,
|
|
10
11
|
date: EditDate,
|
|
12
|
+
time: EditTime,
|
|
11
13
|
separate: EditSeparate
|
|
12
14
|
};
|
|
13
15
|
const useEdit = (props, state, emit, xGrid) => {
|
|
@@ -133,7 +133,14 @@ const useFormat = (state) => {
|
|
|
133
133
|
item[key] = temp.change_text;
|
|
134
134
|
} else {
|
|
135
135
|
if (temp.background != "#ffffff") {
|
|
136
|
-
|
|
136
|
+
const reg = /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/;
|
|
137
|
+
let color = temp.background;
|
|
138
|
+
let iconHtml = `<span class="${temp.icon}"></span>`;
|
|
139
|
+
if (reg.test(temp.icon)) {
|
|
140
|
+
color = temp.icon;
|
|
141
|
+
iconHtml = `<span class="icon-dot-custom" style="--table-icon-color:${temp.icon};--table-icon-shadow:${temp.icon}80"></span>`;
|
|
142
|
+
}
|
|
143
|
+
item[key] = `<span class="field-span" style="color:${color}">${iconHtml}${temp.change_text || ""}</span>`;
|
|
137
144
|
} else {
|
|
138
145
|
item[key] = temp.change_text;
|
|
139
146
|
}
|
|
@@ -396,6 +396,17 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
396
396
|
height: var(--tableImageHeight);
|
|
397
397
|
width: var(--tableImageWidth);
|
|
398
398
|
}
|
|
399
|
+
.custom-big-table .domPropsInnerHTML-span .icon-dot-custom {
|
|
400
|
+
width: 8px;
|
|
401
|
+
height: 8px;
|
|
402
|
+
-webkit-border-radius: 50%;
|
|
403
|
+
-moz-border-radius: 50%;
|
|
404
|
+
border-radius: 50%;
|
|
405
|
+
background: var(--table-icon-color);
|
|
406
|
+
display: inline-block;
|
|
407
|
+
margin-right: 6px;
|
|
408
|
+
box-shadow: 0px 2px 4px 0px var(--table-icon-shadow);
|
|
409
|
+
}
|
|
399
410
|
.custom-big-table .domPropsInnerHTML-span .icon-dot-red {
|
|
400
411
|
width: 8px;
|
|
401
412
|
height: 8px;
|
|
@@ -13,7 +13,7 @@ const testHttpFn = axios.create({
|
|
|
13
13
|
const httpFn = axios.create({ withCredentials: false });
|
|
14
14
|
class Print {
|
|
15
15
|
constructor() {
|
|
16
|
-
this.
|
|
16
|
+
this.messageHandlerQueue = [];
|
|
17
17
|
var _a;
|
|
18
18
|
const _window = window;
|
|
19
19
|
this.webview = (_a = _window.chrome) == null ? void 0 : _a.webview;
|
|
@@ -23,13 +23,13 @@ class Print {
|
|
|
23
23
|
this.webview.addEventListener("message", this.currentMessageHandler);
|
|
24
24
|
}
|
|
25
25
|
messageHandler(e) {
|
|
26
|
-
const handler = this.
|
|
26
|
+
const handler = this.messageHandlerQueue.pop();
|
|
27
27
|
if (!handler)
|
|
28
28
|
return console.log("\u5F53\u524D\u56DE\u6267", e, "\u6CA1\u6709\u53EF\u7528\u7684handler");
|
|
29
29
|
const { resolve, reject } = handler;
|
|
30
30
|
try {
|
|
31
31
|
console.log(e);
|
|
32
|
-
resolve(JSON.parse(e.data));
|
|
32
|
+
resolve(JSON.parse(e.data.res));
|
|
33
33
|
} catch (e2) {
|
|
34
34
|
reject(e2);
|
|
35
35
|
}
|
|
@@ -38,7 +38,7 @@ class Print {
|
|
|
38
38
|
if (!this.webview)
|
|
39
39
|
return Promise.reject();
|
|
40
40
|
return new Promise((resolve, reject) => {
|
|
41
|
-
this.
|
|
41
|
+
this.messageHandlerQueue.push({ resolve, reject });
|
|
42
42
|
this.webview.postMessage(data);
|
|
43
43
|
});
|
|
44
44
|
}
|
|
@@ -408,7 +408,6 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
408
408
|
title: string;
|
|
409
409
|
}[]>;
|
|
410
410
|
formHeight: import("vue").ComputedRef<any>;
|
|
411
|
-
scrollTo: (id: string) => Promise<void>;
|
|
412
411
|
onScroll: () => void;
|
|
413
412
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: import("./src/types").FieldItem[]) => Promise<{
|
|
414
413
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -74,7 +74,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
74
74
|
}
|
|
75
75
|
return { type: "object", properties: {} };
|
|
76
76
|
});
|
|
77
|
-
const { currentAnchor, scrollbarRef, generateAnchorList, anchorIdList, formHeight,
|
|
77
|
+
const { currentAnchor, scrollbarRef, generateAnchorList, anchorIdList, formHeight, onScroll } = useAnchor(props, formItemDepsCollector);
|
|
78
78
|
watch(parsedSchema, generateAnchorList, { immediate: true });
|
|
79
79
|
async function queryWidget(key, wrapperElement, fieldList) {
|
|
80
80
|
if (!scrollbarRef.value)
|
|
@@ -111,7 +111,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
111
111
|
formModel.setFieldState(path, handler);
|
|
112
112
|
},
|
|
113
113
|
resetFields(path = "*") {
|
|
114
|
-
formModel.setFieldState(path,
|
|
114
|
+
formModel.setFieldState(path, (field) => {
|
|
115
115
|
var _a;
|
|
116
116
|
if (isField(field)) {
|
|
117
117
|
field.modified = false;
|
|
@@ -408,7 +408,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
408
408
|
title: string;
|
|
409
409
|
}[]>;
|
|
410
410
|
formHeight: import("vue").ComputedRef<any>;
|
|
411
|
-
scrollTo: (id: string) => Promise<void>;
|
|
412
411
|
onScroll: () => void;
|
|
413
412
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: FieldItem[]) => Promise<{
|
|
414
413
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -6,11 +6,11 @@ declare type DependKeyObj = {
|
|
|
6
6
|
paramValue: string;
|
|
7
7
|
};
|
|
8
8
|
declare type UrlConfig = {
|
|
9
|
-
method
|
|
10
|
-
nameKey
|
|
11
|
-
|
|
9
|
+
method?: FormRequestType;
|
|
10
|
+
nameKey?: string;
|
|
11
|
+
valueKey?: string;
|
|
12
|
+
dependKey?: ArrayAble<string> | Record<string, string> | ArrayAble<DependKeyObj>;
|
|
12
13
|
url: string;
|
|
13
|
-
valueKey: string;
|
|
14
14
|
};
|
|
15
15
|
export declare const SEARCH_CASCADE: import("vue").DefineComponent<{
|
|
16
16
|
options: {
|