cnhis-design-vue 3.1.22-beta.1 → 3.1.22-beta.10
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/components/big-table/index2.js +0 -2
- package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +22 -30
- package/es/components/big-table/src/components/edit-form/edit-date.js +81 -10
- package/es/components/big-table/src/components/edit-form/edit-input.js +1 -0
- package/es/components/big-table/src/hooks/useEdit2.js +2 -2
- package/es/components/big-table/style/index.css +1 -1
- package/es/components/fabric-chart/index.d.ts +1 -0
- package/es/components/fabric-chart/src/FabricChart.js +3 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useCenter.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useCenter2.js +15 -3
- package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useLeft2.js +7 -5
- package/es/components/fabric-chart/src/interface.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/cascader.js +10 -7
- package/es/components/form-render/src/components/renderer/combination.d.ts +7 -0
- package/es/components/form-render/src/components/renderer/combination.js +4 -1
- package/es/components/form-render/src/components/renderer/date.js +11 -4
- package/es/components/form-render/src/components/renderer/input.js +2 -2
- package/es/components/form-render/src/components/renderer/inputNumber.js +2 -2
- package/es/components/form-render/src/components/renderer/search.js +3 -3
- package/es/components/form-render/src/components/renderer/select.js +3 -3
- package/es/components/form-render/src/components/renderer/textarea.js +2 -2
- package/es/components/form-render/src/hooks/useCommonInjection2.js +6 -2
- package/es/components/form-render/src/utils/schema.d.ts +4 -1
- package/es/components/form-render/src/utils/schema.js +1 -1
- package/es/components/form-render/src/utils/schema2.js +9 -2
- package/es/components/grid/index2.js +0 -2
- package/es/components/iho-table/index.d.ts +4266 -337
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/index2.js +9 -4
- package/es/components/iho-table/src/IhoTable.js +39 -13
- package/es/components/iho-table/src/IhoTable.vue.d.ts +4254 -326
- package/es/components/iho-table/src/components/IhoTableColumn.d.ts +2 -2
- package/es/components/iho-table/src/components/IhoTableColumn.js +25 -5
- package/es/components/iho-table/src/constants/index.d.ts +8 -1
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/constants/index2.js +79 -1
- package/es/components/iho-table/src/hooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +5 -0
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index2.js +71 -24
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +14 -0
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks2.js +39 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +61 -60
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks2.js +62 -60
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -1
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks2.js +4 -1
- package/es/components/iho-table/src/hooks/useTablePlugin.d.ts +2 -2
- package/es/components/iho-table/src/hooks/useTablePlugin2.js +2 -3
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index2.js +3 -2
- package/es/components/iho-table/src/plugins/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/index.js +8 -5
- package/es/components/iho-table/src/plugins/index2.js +8 -5
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +10 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/index.d.ts +2 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/index.js +7 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/inputRendererPlugins.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/inputRendererPlugins.js +49 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{checkRendererPlugin.d.ts → widgets/checkRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{checkRendererPlugin.js → widgets/checkRendererPlugin.js} +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/{colorRendererPlugin.d.ts → widgets/colorRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{colorRendererPlugin.js → widgets/colorRendererPlugin.js} +6 -8
- package/es/components/iho-table/src/plugins/rendererPlugins/{defaultRendererPlugin.d.ts → widgets/defaultRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{defaultRendererPlugin.js → widgets/defaultRendererPlugin.js} +4 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.d.ts +6 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.js +6 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{labelRendererPlugin.d.ts → widgets/labelRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{labelRendererPlugin.js → widgets/labelRendererPlugin.js} +3 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.d.ts +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +89 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{seqRendererPlugin.d.ts → widgets/seqRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{seqRendererPlugin.js → widgets/seqRendererPlugin.js} +3 -3
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index2.js +72 -0
- package/es/components/iho-table/src/types/index.d.ts +31 -8
- package/es/components/iho-table/src/types/pluginType.d.ts +91 -64
- package/es/components/iho-table/src/utils/index.d.ts +3 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/src/utils/index2.js +16 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/index2.js +1 -1
- package/package.json +4 -4
- package/es/components/form-render/src/components/index.d.ts +0 -0
- package/es/components/form-render/src/components/index.js +0 -1
- package/es/shared/utils/loadVxe.d.ts +0 -2
- package/es/shared/utils/loadVxe.js +0 -1
- package/es/shared/utils/loadVxe2.js +0 -12
|
@@ -6,7 +6,7 @@ import { format } from 'date-fns';
|
|
|
6
6
|
import { NDatePicker } from 'naive-ui';
|
|
7
7
|
import { useCommonInjection } from '../../hooks/useCommonInjection2.js';
|
|
8
8
|
import '../../utils/index.js';
|
|
9
|
-
import { assignUpdateValue,
|
|
9
|
+
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema2.js';
|
|
10
10
|
|
|
11
11
|
const script = defineComponent({
|
|
12
12
|
props: {
|
|
@@ -26,7 +26,11 @@ const script = defineComponent({
|
|
|
26
26
|
setup(props, {
|
|
27
27
|
emit
|
|
28
28
|
}) {
|
|
29
|
-
|
|
29
|
+
const {
|
|
30
|
+
injectValueValidate,
|
|
31
|
+
injectValueBindKey
|
|
32
|
+
} = useCommonInjection();
|
|
33
|
+
injectValueValidate(() => props.value);
|
|
30
34
|
function minCurrentDate() {
|
|
31
35
|
var _a;
|
|
32
36
|
return ((_a = props.validate) == null ? void 0 : _a.min_date) === "currTime";
|
|
@@ -115,12 +119,15 @@ const script = defineComponent({
|
|
|
115
119
|
get: () => formatDate(props.value),
|
|
116
120
|
set: (value) => emit("update:value", value)
|
|
117
121
|
});
|
|
118
|
-
|
|
122
|
+
const key = injectValueBindKey(valueRef);
|
|
123
|
+
return () => createVNode(NDatePicker, mergeProps({
|
|
124
|
+
"key": key.value
|
|
125
|
+
}, validateConfig.value, formatConfig.value, {
|
|
119
126
|
"formatted-value": valueRef.value,
|
|
120
127
|
"onUpdate:formatted-value": ($event) => valueRef.value = $event
|
|
121
128
|
}), null);
|
|
122
129
|
}
|
|
123
130
|
});
|
|
124
|
-
const DATE = connect(script, mapProps(assignUpdateValue,
|
|
131
|
+
const DATE = connect(script, mapProps(assignUpdateValue, assignClearBindVisited));
|
|
125
132
|
|
|
126
133
|
export { DATE };
|
|
@@ -3,7 +3,7 @@ import { useCommonInjection } from '../../hooks/useCommonInjection2.js';
|
|
|
3
3
|
import { createInputSlot } from '../../utils/index.js';
|
|
4
4
|
import { connect, mapProps } from '@formily/vue';
|
|
5
5
|
import { NInput } from 'naive-ui';
|
|
6
|
-
import { assignUpdateValue } from '../../utils/schema2.js';
|
|
6
|
+
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema2.js';
|
|
7
7
|
|
|
8
8
|
const script = defineComponent({
|
|
9
9
|
name: "FormInput",
|
|
@@ -41,6 +41,6 @@ const INPUT = connect(script, mapProps((props, field) => {
|
|
|
41
41
|
const _props = assignUpdateValue(props, field);
|
|
42
42
|
_props.allowInput = (value) => !value.startsWith(" ") && !value.endsWith(" ");
|
|
43
43
|
return _props;
|
|
44
|
-
}));
|
|
44
|
+
}, assignClearBindVisited));
|
|
45
45
|
|
|
46
46
|
export { INPUT };
|
|
@@ -4,7 +4,7 @@ import { useCommonInjection } from '../../hooks/useCommonInjection2.js';
|
|
|
4
4
|
import { createInputSlot, parseNumberFromMaybeString } from '../../utils/index.js';
|
|
5
5
|
import { connect, mapProps } from '@formily/vue';
|
|
6
6
|
import { NInputNumber } from 'naive-ui';
|
|
7
|
-
import { assignUpdateValue } from '../../utils/schema2.js';
|
|
7
|
+
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema2.js';
|
|
8
8
|
|
|
9
9
|
const script = defineComponent({
|
|
10
10
|
props: {
|
|
@@ -50,6 +50,6 @@ const script = defineComponent({
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
const INPUT_NUMBER = connect(script, mapProps(assignUpdateValue));
|
|
53
|
+
const INPUT_NUMBER = connect(script, mapProps(assignUpdateValue, assignClearBindVisited));
|
|
54
54
|
|
|
55
55
|
export { INPUT_NUMBER };
|
|
@@ -39,7 +39,7 @@ import './slider.js';
|
|
|
39
39
|
import './complex.js';
|
|
40
40
|
import './simpleComponent.js';
|
|
41
41
|
import { NSelect } from 'naive-ui';
|
|
42
|
-
import {
|
|
42
|
+
import { visitedDecorator, assignUpdateValue, assignClearBindVisited } from '../../utils/schema2.js';
|
|
43
43
|
|
|
44
44
|
const script = defineComponent({
|
|
45
45
|
name: "FormSearch",
|
|
@@ -157,10 +157,10 @@ const script = defineComponent({
|
|
|
157
157
|
"options": parsedOptions.value,
|
|
158
158
|
"onSearch": fetchData,
|
|
159
159
|
"onUpdate:show": (show) => show && fetchData(),
|
|
160
|
-
"onFocus":
|
|
160
|
+
"onFocus": visitedDecorator(field, props.onFocus)
|
|
161
161
|
}, slots);
|
|
162
162
|
}
|
|
163
163
|
});
|
|
164
|
-
const SEARCH = connect(script, mapProps(assignUpdateValue));
|
|
164
|
+
const SEARCH = connect(script, mapProps(assignUpdateValue, assignClearBindVisited));
|
|
165
165
|
|
|
166
166
|
export { SEARCH };
|
|
@@ -38,7 +38,7 @@ import './complex.js';
|
|
|
38
38
|
import './simpleComponent.js';
|
|
39
39
|
import './search.js';
|
|
40
40
|
import { NSelect } from 'naive-ui';
|
|
41
|
-
import { traverseDependKey,
|
|
41
|
+
import { traverseDependKey, visitedDecorator, assignUpdateValue, assignClearBindVisited } from '../../utils/schema2.js';
|
|
42
42
|
|
|
43
43
|
const script = defineComponent({
|
|
44
44
|
name: "FormSelect",
|
|
@@ -174,12 +174,12 @@ const script = defineComponent({
|
|
|
174
174
|
"options": parsedOptions.value,
|
|
175
175
|
"onSearch": fetchData,
|
|
176
176
|
"onUpdate:show": (show) => show && fetchData(),
|
|
177
|
-
"onFocus":
|
|
177
|
+
"onFocus": visitedDecorator(field, props.onFocus)
|
|
178
178
|
}, slots);
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
181
|
const SELECT = connect(script, mapProps({
|
|
182
182
|
dataSource: "options"
|
|
183
|
-
}, assignUpdateValue));
|
|
183
|
+
}, assignUpdateValue, assignClearBindVisited));
|
|
184
184
|
|
|
185
185
|
export { SELECT };
|
|
@@ -3,7 +3,7 @@ import { useCommonInjection } from '../../hooks/useCommonInjection2.js';
|
|
|
3
3
|
import '../../utils/index.js';
|
|
4
4
|
import { connect, mapProps } from '@formily/vue';
|
|
5
5
|
import { NInput } from 'naive-ui';
|
|
6
|
-
import { assignUpdateValue } from '../../utils/schema2.js';
|
|
6
|
+
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema2.js';
|
|
7
7
|
|
|
8
8
|
const script = defineComponent({
|
|
9
9
|
name: "FormTextarea",
|
|
@@ -31,6 +31,6 @@ const script = defineComponent({
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
const TEXTAREA = connect(script, mapProps(assignUpdateValue));
|
|
34
|
+
const TEXTAREA = connect(script, mapProps(assignUpdateValue, assignClearBindVisited));
|
|
35
35
|
|
|
36
36
|
export { TEXTAREA };
|
|
@@ -7,9 +7,13 @@ function useCommonInjection() {
|
|
|
7
7
|
function injectValueValidate(traverser) {
|
|
8
8
|
const { field } = useFormField();
|
|
9
9
|
watch(traverser, () => {
|
|
10
|
-
var _a, _b;
|
|
10
|
+
var _a, _b, _c;
|
|
11
11
|
try {
|
|
12
|
-
|
|
12
|
+
if (!isField(field.value))
|
|
13
|
+
return;
|
|
14
|
+
if (!field.value.visited && !((_a = field.value.selfErrors) == null ? void 0 : _a.length))
|
|
15
|
+
return;
|
|
16
|
+
(_c = (_b = field.value).validate) == null ? void 0 : _c.call(_b);
|
|
13
17
|
} catch (e) {
|
|
14
18
|
}
|
|
15
19
|
});
|
|
@@ -17,6 +17,9 @@ export declare function assignUpdateValue(props: AnyObject, field: GeneralField)
|
|
|
17
17
|
export declare function assignValueBindKey(props: AnyObject, field: GeneralField): {
|
|
18
18
|
[x: string]: any;
|
|
19
19
|
};
|
|
20
|
+
export declare function assignClearBindVisited(props: AnyObject, field: GeneralField): {
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
};
|
|
20
23
|
export declare function createObjSchema(properties: Record<string, ISchema>): {
|
|
21
24
|
type: string;
|
|
22
25
|
properties: Record<string, import("@formily/json-schema/esm/types").Stringify<{
|
|
@@ -77,4 +80,4 @@ export declare function createObjSchema(properties: Record<string, ISchema>): {
|
|
|
77
80
|
"x-compile-omitted"?: string[] | undefined;
|
|
78
81
|
}>>;
|
|
79
82
|
};
|
|
80
|
-
export declare function
|
|
83
|
+
export declare function visitedDecorator(field: Ref<GeneralField>, onFocus?: Func): (...args: unknown[]) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape,
|
|
1
|
+
export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema, visitedDecorator } from './schema2.js';
|
|
@@ -86,10 +86,17 @@ function assignValueBindKey(props, field) {
|
|
|
86
86
|
}
|
|
87
87
|
return _props;
|
|
88
88
|
}
|
|
89
|
+
function assignClearBindVisited(props, field) {
|
|
90
|
+
const _props = { ...props };
|
|
91
|
+
if (isField(field)) {
|
|
92
|
+
_props.onClear = () => field.visited = true;
|
|
93
|
+
}
|
|
94
|
+
return _props;
|
|
95
|
+
}
|
|
89
96
|
function createObjSchema(properties) {
|
|
90
97
|
return { type: "object", properties };
|
|
91
98
|
}
|
|
92
|
-
function
|
|
99
|
+
function visitedDecorator(field, onFocus) {
|
|
93
100
|
return (...args) => {
|
|
94
101
|
if (isField(field.value)) {
|
|
95
102
|
field.value.visited = true;
|
|
@@ -98,4 +105,4 @@ function focusDecorator(field, onFocus) {
|
|
|
98
105
|
};
|
|
99
106
|
}
|
|
100
107
|
|
|
101
|
-
export { assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape,
|
|
108
|
+
export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema, visitedDecorator };
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { COMPONENT_NAMESPACE } from '../../shared/global/variable2.js';
|
|
2
2
|
import { safeComponentRegister } from '../../shared/utils/index2.js';
|
|
3
|
-
import { loadVxeTable } from '../../shared/utils/loadVxe2.js';
|
|
4
3
|
import '../../shared/utils/utilExpand.js';
|
|
5
4
|
import script from './src/Grid.js';
|
|
6
5
|
|
|
7
6
|
const Grid = script;
|
|
8
7
|
Grid.install = function(app) {
|
|
9
8
|
safeComponentRegister(app, Grid, COMPONENT_NAMESPACE + "Grid");
|
|
10
|
-
loadVxeTable(app);
|
|
11
9
|
};
|
|
12
10
|
|
|
13
11
|
export { Grid as default };
|