cnhis-design-vue 3.1.34-beta.0 → 3.1.34-beta.1
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/README.md +123 -123
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.d.ts +1 -7
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +2 -5
- package/es/components/form-render/src/components/renderer/radio.js +2 -2
- package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +1 -7
- package/es/components/form-render/src/components/renderer/remoteSearch.js +2 -5
- package/es/components/form-render/src/components/renderer/searchCascade.js +4 -12
- package/es/components/form-render/src/components/renderer/select.d.ts +1 -7
- package/es/components/form-render/src/components/renderer/select.js +2 -5
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/src/utils/schema.d.ts +1 -1
- package/es/components/form-render/src/utils/schema.js +4 -4
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +12 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +3 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +2 -2
- package/es/components/iho-table/src/utils/index.d.ts +4 -2
- package/es/components/iho-table/src/utils/index.js +11 -3
- package/es/components/index.js +1 -1
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -20,7 +20,7 @@ export { combineExtendKey, createInputSlot, createSlot, createUrlConfigParams, f
|
|
|
20
20
|
export * from '@formily/core';
|
|
21
21
|
export { businessDateParser, isIdCard, isMobile, parseAge2Birthday, parseAge2FromContext, parseBirthday, parseIdCard, transformDateFormat } from './src/utils/business.js';
|
|
22
22
|
export { findNextWidget, queryDecorator, queryInput } from './src/utils/dom.js';
|
|
23
|
-
export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema
|
|
23
|
+
export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, createVisitedSetter, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema } from './src/utils/schema.js';
|
|
24
24
|
|
|
25
25
|
const FormRender = script;
|
|
26
26
|
FormRender.install = function(app) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject
|
|
1
|
+
import { AnyObject } from '../../../../../../es/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
declare type ValueType = string | AnyObject[];
|
|
4
4
|
export declare const LEVEL_SEARCH_CASCADER: import("vue").DefineComponent<{
|
|
@@ -6,9 +6,6 @@ export declare const LEVEL_SEARCH_CASCADER: import("vue").DefineComponent<{
|
|
|
6
6
|
type: PropType<AnyObject[]>;
|
|
7
7
|
default: () => never[];
|
|
8
8
|
};
|
|
9
|
-
onFocus: {
|
|
10
|
-
type: PropType<Func<any[], any>>;
|
|
11
|
-
};
|
|
12
9
|
autograph: {
|
|
13
10
|
type: StringConstructor;
|
|
14
11
|
required: true;
|
|
@@ -49,9 +46,6 @@ export declare const LEVEL_SEARCH_CASCADER: import("vue").DefineComponent<{
|
|
|
49
46
|
type: PropType<AnyObject[]>;
|
|
50
47
|
default: () => never[];
|
|
51
48
|
};
|
|
52
|
-
onFocus: {
|
|
53
|
-
type: PropType<Func<any[], any>>;
|
|
54
|
-
};
|
|
55
49
|
autograph: {
|
|
56
50
|
type: StringConstructor;
|
|
57
51
|
required: true;
|
|
@@ -8,7 +8,7 @@ import { formRenderLog } from '../../utils/index.js';
|
|
|
8
8
|
import { connect, mapProps } from '@formily/vue';
|
|
9
9
|
import SearchCascader from '../../../../search-cascader/index.js';
|
|
10
10
|
import script$1 from '../../../../../shared/components/no-data/NoData.vue.js';
|
|
11
|
-
import {
|
|
11
|
+
import { createVisitedSetter, assignUpdateValue } from '../../utils/schema.js';
|
|
12
12
|
import { useFormField } from '../../hooks/useFormField.js';
|
|
13
13
|
import { useFormRequest } from '../../hooks/useFormRequest.js';
|
|
14
14
|
|
|
@@ -19,9 +19,6 @@ const script = defineComponent({
|
|
|
19
19
|
type: Array,
|
|
20
20
|
default: () => []
|
|
21
21
|
},
|
|
22
|
-
onFocus: {
|
|
23
|
-
type: Function
|
|
24
|
-
},
|
|
25
22
|
autograph: {
|
|
26
23
|
type: String,
|
|
27
24
|
required: true
|
|
@@ -264,7 +261,7 @@ const script = defineComponent({
|
|
|
264
261
|
"labelKey": labelKey.value,
|
|
265
262
|
"valueKey": valueKey.value,
|
|
266
263
|
"search": fetchData,
|
|
267
|
-
"onFocus":
|
|
264
|
+
"onFocus": createVisitedSetter(field)
|
|
268
265
|
}, {
|
|
269
266
|
empty: () => createVNode(script$1, null, null)
|
|
270
267
|
});
|
|
@@ -6,7 +6,7 @@ import '../../../index.js';
|
|
|
6
6
|
import '../../utils/index.js';
|
|
7
7
|
import { useFormField } from '../../hooks/useFormField.js';
|
|
8
8
|
import { useAutographOptions } from '../../hooks/useFormRenderOptions.js';
|
|
9
|
-
import {
|
|
9
|
+
import { createVisitedSetter, assignUpdateValue } from '../../utils/schema.js';
|
|
10
10
|
import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
|
11
11
|
|
|
12
12
|
function _isSlot(s) {
|
|
@@ -78,7 +78,7 @@ const script = defineComponent({
|
|
|
78
78
|
"key": key.value,
|
|
79
79
|
"value": valueRef.value,
|
|
80
80
|
"onUpdate:value": ($event) => valueRef.value = $event,
|
|
81
|
-
"onClick":
|
|
81
|
+
"onClick": createVisitedSetter(field)
|
|
82
82
|
}, {
|
|
83
83
|
default: () => [createVNode(NSpace, {
|
|
84
84
|
"vertical": props.vertical
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject
|
|
1
|
+
import { AnyObject } from '../../../../../../es/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
import { UrlConfig } from '../../../../../../es/components/form-render';
|
|
4
4
|
export declare const REMOTE_SEARCH: import("vue").DefineComponent<{
|
|
@@ -16,9 +16,6 @@ export declare const REMOTE_SEARCH: import("vue").DefineComponent<{
|
|
|
16
16
|
urlConfig: {
|
|
17
17
|
type: PropType<UrlConfig>;
|
|
18
18
|
};
|
|
19
|
-
onFocus: {
|
|
20
|
-
type: PropType<Func<any[], any>>;
|
|
21
|
-
};
|
|
22
19
|
onChange: {};
|
|
23
20
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
21
|
value: {
|
|
@@ -35,9 +32,6 @@ export declare const REMOTE_SEARCH: import("vue").DefineComponent<{
|
|
|
35
32
|
urlConfig: {
|
|
36
33
|
type: PropType<UrlConfig>;
|
|
37
34
|
};
|
|
38
|
-
onFocus: {
|
|
39
|
-
type: PropType<Func<any[], any>>;
|
|
40
|
-
};
|
|
41
35
|
onChange: {};
|
|
42
36
|
}>> & {
|
|
43
37
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -8,7 +8,7 @@ import { InjectionAsyncQueue, InjectionChangeContextCollector, InjectionFormItem
|
|
|
8
8
|
import { createUrlConfigParams, formRenderLog } from '../../utils/index.js';
|
|
9
9
|
import { useCommonInjection, useSelectOptionProps } from '../../hooks/useCommonInjection.js';
|
|
10
10
|
import { useFormField } from '../../hooks/useFormField.js';
|
|
11
|
-
import {
|
|
11
|
+
import { createVisitedSetter, assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
|
|
12
12
|
|
|
13
13
|
const script = defineComponent({
|
|
14
14
|
name: "FormRemoteSearch",
|
|
@@ -27,9 +27,6 @@ const script = defineComponent({
|
|
|
27
27
|
urlConfig: {
|
|
28
28
|
type: Object
|
|
29
29
|
},
|
|
30
|
-
onFocus: {
|
|
31
|
-
type: Function
|
|
32
|
-
},
|
|
33
30
|
onChange: {}
|
|
34
31
|
},
|
|
35
32
|
emits: ["update:value"],
|
|
@@ -132,7 +129,7 @@ const script = defineComponent({
|
|
|
132
129
|
"onSearch": fetchData,
|
|
133
130
|
"onUpdate:show": (show) => show && fetchData(),
|
|
134
131
|
"options": parsedOptions.value,
|
|
135
|
-
"onFocus":
|
|
132
|
+
"onFocus": createVisitedSetter(field)
|
|
136
133
|
}, slots);
|
|
137
134
|
};
|
|
138
135
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, inject, watch, createVNode, nextTick } from 'vue';
|
|
2
|
-
import { isField } from '@formily/core';
|
|
3
2
|
import { isEqual, isArray } from 'lodash-es';
|
|
3
|
+
import '../../../index.js';
|
|
4
4
|
import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
|
5
5
|
import { InjectionAsyncQueue, InjectionFormUUID } from '../../constants/index.js';
|
|
6
6
|
import '../../../../../shared/utils/index.js';
|
|
7
|
-
import '../../../index.js';
|
|
8
7
|
import '../../utils/index.js';
|
|
9
8
|
import { useFormField } from '../../hooks/useFormField.js';
|
|
10
9
|
import '@vueuse/core';
|
|
@@ -19,12 +18,13 @@ import '../../../../../shared/utils/tapable/AsyncSeriesBailHook.js';
|
|
|
19
18
|
import '../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js';
|
|
20
19
|
import '../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
|
|
21
20
|
import '../../hooks/useFormValidator.js';
|
|
21
|
+
import '@formily/core';
|
|
22
22
|
import 'date-fns';
|
|
23
23
|
import '@vue/shared';
|
|
24
24
|
import { connect, mapProps } from '@formily/vue';
|
|
25
25
|
import './index.js';
|
|
26
26
|
import { NCascader } from 'naive-ui';
|
|
27
|
-
import { assignUpdateValue, traverseDependKey } from '../../utils/schema.js';
|
|
27
|
+
import { createVisitedSetter, assignUpdateValue, traverseDependKey } from '../../utils/schema.js';
|
|
28
28
|
|
|
29
29
|
const script = defineComponent({
|
|
30
30
|
name: "FormCascader",
|
|
@@ -210,14 +210,6 @@ const script = defineComponent({
|
|
|
210
210
|
const parsedOptions = computed(() => {
|
|
211
211
|
return remoteOptions.value || props.options || [];
|
|
212
212
|
});
|
|
213
|
-
function visitedDecorator(onFocus) {
|
|
214
|
-
return (...args) => {
|
|
215
|
-
if (isField(field.value)) {
|
|
216
|
-
field.value.visited = true;
|
|
217
|
-
}
|
|
218
|
-
onFocus == null ? void 0 : onFocus(...args);
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
213
|
const remote = computed(() => !props.filterable);
|
|
222
214
|
const key = injectValueBindKey(valueRef);
|
|
223
215
|
return () => {
|
|
@@ -238,7 +230,7 @@ const script = defineComponent({
|
|
|
238
230
|
"valueField": valueKey.value,
|
|
239
231
|
"options": parsedOptions.value,
|
|
240
232
|
"onLoad": fetchData,
|
|
241
|
-
"onFocus":
|
|
233
|
+
"onFocus": createVisitedSetter(field)
|
|
242
234
|
}, slots);
|
|
243
235
|
};
|
|
244
236
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject, ArrayAble
|
|
1
|
+
import { AnyObject, ArrayAble } from '../../../../../../es/shared/types';
|
|
2
2
|
import { RecommendItem } from '../../../../../../es/components/recommend-search/src/types';
|
|
3
3
|
import { RecommendIds } from '../../hooks';
|
|
4
4
|
import { UrlConfig } from '../../types';
|
|
@@ -19,9 +19,6 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
19
19
|
type: PropType<AnyObject[]>;
|
|
20
20
|
default: () => never[];
|
|
21
21
|
};
|
|
22
|
-
onFocus: {
|
|
23
|
-
type: PropType<Func<any[], any>>;
|
|
24
|
-
};
|
|
25
22
|
onChange: {};
|
|
26
23
|
urlConfig: {
|
|
27
24
|
type: PropType<UrlConfig>;
|
|
@@ -84,9 +81,6 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
84
81
|
type: PropType<AnyObject[]>;
|
|
85
82
|
default: () => never[];
|
|
86
83
|
};
|
|
87
|
-
onFocus: {
|
|
88
|
-
type: PropType<Func<any[], any>>;
|
|
89
|
-
};
|
|
90
84
|
onChange: {};
|
|
91
85
|
urlConfig: {
|
|
92
86
|
type: PropType<UrlConfig>;
|
|
@@ -25,7 +25,7 @@ import { connect, mapProps } from '@formily/vue';
|
|
|
25
25
|
import './index.js';
|
|
26
26
|
import { useUrlConfigOptions, useAutographOptions, useRecommendOptions } from '../../hooks/useFormRenderOptions.js';
|
|
27
27
|
import { NSelect } from 'naive-ui';
|
|
28
|
-
import {
|
|
28
|
+
import { createVisitedSetter, assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
|
|
29
29
|
|
|
30
30
|
const script = defineComponent({
|
|
31
31
|
name: "FormSelect",
|
|
@@ -45,9 +45,6 @@ const script = defineComponent({
|
|
|
45
45
|
type: Array,
|
|
46
46
|
default: () => []
|
|
47
47
|
},
|
|
48
|
-
onFocus: {
|
|
49
|
-
type: Function
|
|
50
|
-
},
|
|
51
48
|
onChange: {},
|
|
52
49
|
urlConfig: {
|
|
53
50
|
type: Object
|
|
@@ -147,7 +144,7 @@ const script = defineComponent({
|
|
|
147
144
|
"options": sortedOptions.value,
|
|
148
145
|
"onSearch": fetchData,
|
|
149
146
|
"onUpdate:show": (show) => show && fetchData(),
|
|
150
|
-
"onFocus":
|
|
147
|
+
"onFocus": createVisitedSetter(field)
|
|
151
148
|
}, slots);
|
|
152
149
|
}
|
|
153
150
|
});
|
|
@@ -9,7 +9,7 @@ import '../../index.js';
|
|
|
9
9
|
import { NESTED_FORM_ITEM_TYPE } from '../constants/index.js';
|
|
10
10
|
import 'date-fns';
|
|
11
11
|
import { traverseDependKey } from './schema.js';
|
|
12
|
-
export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema
|
|
12
|
+
export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, createVisitedSetter, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema } from './schema.js';
|
|
13
13
|
|
|
14
14
|
function formRenderLog(message) {
|
|
15
15
|
console.warn(`[FormRender]: ${message}`);
|
|
@@ -80,4 +80,4 @@ export declare function createObjSchema(properties: Record<string, ISchema>): {
|
|
|
80
80
|
"x-compile-omitted"?: string[] | undefined;
|
|
81
81
|
}>>;
|
|
82
82
|
};
|
|
83
|
-
export declare function
|
|
83
|
+
export declare function createVisitedSetter(field: Ref<GeneralField>, callback?: Func): (...args: unknown[]) => any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isField } from '@formily/core';
|
|
2
2
|
import { isObject } from '@vue/shared';
|
|
3
|
-
import { isString, isArray } from 'lodash-es';
|
|
3
|
+
import { isString, isArray, isFunction } from 'lodash-es';
|
|
4
4
|
|
|
5
5
|
function traverseSchema(schema, handler) {
|
|
6
6
|
handler(schema);
|
|
@@ -93,13 +93,13 @@ function assignClearBindVisited(props, field) {
|
|
|
93
93
|
function createObjSchema(properties) {
|
|
94
94
|
return { type: "object", properties };
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function createVisitedSetter(field, callback) {
|
|
97
97
|
return (...args) => {
|
|
98
98
|
if (isField(field.value)) {
|
|
99
99
|
field.value.visited = true;
|
|
100
100
|
}
|
|
101
|
-
return
|
|
101
|
+
return isFunction(callback) ? callback(...args) : void 0;
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema
|
|
105
|
+
export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, createVisitedSetter, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema };
|
|
@@ -16,7 +16,7 @@ function lowCodeFieldAdaptorPlugin() {
|
|
|
16
16
|
field: _field.columnName,
|
|
17
17
|
showOverflow: Reflect.has(_field, "showOverflow") ? _field.showOverflow : "tooltip",
|
|
18
18
|
visible: _field.isShow !== IHO_TABLE_NUMBER_STATUS.NEGATIVE,
|
|
19
|
-
|
|
19
|
+
minWidth: _field.colWidth,
|
|
20
20
|
slots: { ..._field.slots, default: _field.slotFn, header: _field.headerSlotFn },
|
|
21
21
|
...pick(_field, ["title", "treeNode", "resizable"])
|
|
22
22
|
};
|
|
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
41
41
|
}>> & {
|
|
42
42
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
43
43
|
}>>;
|
|
44
|
-
|
|
44
|
+
emitFormChangeWithParams: (params?: AnyObject) => void;
|
|
45
45
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
46
46
|
formRef: import("vue").Ref<HTMLElement | null>;
|
|
47
47
|
isShow: import("vue").Ref<boolean>;
|
|
@@ -18,13 +18,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
setup(__props, { emit }) {
|
|
19
19
|
const props = __props;
|
|
20
20
|
const attr = useAttrs();
|
|
21
|
-
const {
|
|
21
|
+
const { emitFormChangeWithParams } = useIhoTableFormEvent(props);
|
|
22
22
|
const { formRef, isShow } = useAutoFocus();
|
|
23
23
|
const formattedValue = ref();
|
|
24
24
|
const onConfirm = (value) => {
|
|
25
25
|
const oldValue = props.value;
|
|
26
26
|
emit("update:value", value);
|
|
27
|
-
|
|
27
|
+
emitFormChangeWithParams({ oldValue });
|
|
28
28
|
};
|
|
29
29
|
const { isStartDate = false, isEndDate = false } = attr;
|
|
30
30
|
const connectField = attr.connectField || "";
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js
CHANGED
|
@@ -10,23 +10,28 @@ function inputRendererPlugin() {
|
|
|
10
10
|
return defineTablePlugin({
|
|
11
11
|
name: pluginName,
|
|
12
12
|
vxe(instance) {
|
|
13
|
+
let oldValue = "";
|
|
13
14
|
instance.renderer.add(EDITABLE_WIDGET_TYPE.INPUT, {
|
|
14
15
|
renderCell: IhoTableRenderHelper.createDefaultRenderCell(),
|
|
15
16
|
renderEdit: IhoTableRenderHelper.createRenderEdit(({
|
|
16
17
|
fieldItem,
|
|
17
18
|
row,
|
|
18
19
|
column,
|
|
19
|
-
|
|
20
|
+
emitFormChangeWithParams,
|
|
20
21
|
emitFormClick
|
|
21
22
|
}) => {
|
|
22
23
|
return [createVNode(NInput, mergeProps({
|
|
23
24
|
"value": row[column.field],
|
|
24
|
-
"onUpdate:value": ($event) => row[column.field] = $event
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
"onUpdate:value": ($event) => row[column.field] = $event
|
|
26
|
+
}, fieldItem.componentProps, {
|
|
27
|
+
"onChange": () => {
|
|
28
|
+
emitFormChangeWithParams({
|
|
29
|
+
oldValue
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
"onClick": emitFormClick,
|
|
33
|
+
"onFocus": () => oldValue = row[column.field]
|
|
34
|
+
}), null)];
|
|
30
35
|
})
|
|
31
36
|
});
|
|
32
37
|
}
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js
CHANGED
|
@@ -17,7 +17,7 @@ function numberRendererPlugin() {
|
|
|
17
17
|
column,
|
|
18
18
|
fieldItem,
|
|
19
19
|
emitFormClick,
|
|
20
|
-
|
|
20
|
+
emitFormChangeWithParams
|
|
21
21
|
}) => {
|
|
22
22
|
const {
|
|
23
23
|
placeholder = "\u8BF7\u8F93\u5165"
|
|
@@ -26,14 +26,14 @@ function numberRendererPlugin() {
|
|
|
26
26
|
...fieldItem.componentProps || {},
|
|
27
27
|
clearable: true,
|
|
28
28
|
placeholder,
|
|
29
|
-
onBlur: () =>
|
|
29
|
+
onBlur: () => emitFormChangeWithParams({
|
|
30
30
|
type: "blur",
|
|
31
31
|
oldValue: row[column.field]
|
|
32
32
|
}),
|
|
33
33
|
onUpdateValue: (value) => {
|
|
34
34
|
const oldValue = row[column.field];
|
|
35
35
|
row[column.field] = value;
|
|
36
|
-
|
|
36
|
+
emitFormChangeWithParams({
|
|
37
37
|
oldValue
|
|
38
38
|
});
|
|
39
39
|
},
|
|
@@ -37,12 +37,12 @@ var EditSelect = defineComponent({
|
|
|
37
37
|
setRef
|
|
38
38
|
} = useAutoFocus();
|
|
39
39
|
const {
|
|
40
|
-
|
|
40
|
+
emitFormChangeWithParams
|
|
41
41
|
} = useIhoTableFormEvent(props);
|
|
42
42
|
function onUpdateValue(value) {
|
|
43
43
|
const oldValue = props.value;
|
|
44
44
|
emit("update:value", value);
|
|
45
|
-
|
|
45
|
+
emitFormChangeWithParams({
|
|
46
46
|
oldValue
|
|
47
47
|
});
|
|
48
48
|
}
|
|
@@ -57,7 +57,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
57
57
|
setShow: (v: boolean) => void;
|
|
58
58
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
59
59
|
onShow: () => Promise<void>;
|
|
60
|
-
|
|
60
|
+
emitFormChangeWithParams: (params?: AnyObject) => void;
|
|
61
61
|
onClose: () => Promise<void>;
|
|
62
62
|
updateShow: (show: boolean) => void;
|
|
63
63
|
style: import("vue").ComputedRef<CSSProperties>;
|
|
@@ -36,7 +36,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
(_a = popoverRef.value) == null ? void 0 : _a.syncPosition();
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
const {
|
|
39
|
+
const { emitFormChangeWithParams } = useIhoTableFormEvent(props);
|
|
40
40
|
async function onClose() {
|
|
41
41
|
if (!isObject(editContent.value) && !isArray(editContent.value)) {
|
|
42
42
|
if (props.value === editContent.value)
|
|
@@ -44,7 +44,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
44
|
}
|
|
45
45
|
const oldValue = props.value;
|
|
46
46
|
emit("update:value", editContent.value);
|
|
47
|
-
|
|
47
|
+
emitFormChangeWithParams({ oldValue });
|
|
48
48
|
tableHandler.updateTableDataRef();
|
|
49
49
|
}
|
|
50
50
|
function updateShow(show2) {
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js
CHANGED
|
@@ -16,7 +16,7 @@ function timeRendererPlugin() {
|
|
|
16
16
|
fieldItem,
|
|
17
17
|
row,
|
|
18
18
|
column,
|
|
19
|
-
|
|
19
|
+
emitFormChangeWithParams,
|
|
20
20
|
emitFormClick
|
|
21
21
|
}) => {
|
|
22
22
|
const {
|
|
@@ -31,7 +31,7 @@ function timeRendererPlugin() {
|
|
|
31
31
|
onUpdateFormattedValue: (value) => {
|
|
32
32
|
const oldValue = row[column.field];
|
|
33
33
|
row[column.field] = value;
|
|
34
|
-
|
|
34
|
+
emitFormChangeWithParams({
|
|
35
35
|
oldValue
|
|
36
36
|
});
|
|
37
37
|
},
|
|
@@ -16,8 +16,10 @@ export declare function useUUIDMap<T>(creator: () => T, isReactive?: boolean): {
|
|
|
16
16
|
};
|
|
17
17
|
export declare function getColumnRenderWidth(column: AnyObject, $table: MaybeRef<Nullable<VxeTableInstance>>): Promise<number>;
|
|
18
18
|
export declare function useIhoTableFormEvent(payload: Pick<VxeGlobalRendererHandles.RenderEditParams, 'row' | 'rowIndex' | 'column'>): {
|
|
19
|
-
emitFormChange: (
|
|
20
|
-
emitFormClick: (
|
|
19
|
+
emitFormChange: () => void;
|
|
20
|
+
emitFormClick: () => void;
|
|
21
|
+
emitFormChangeWithParams: (params?: AnyObject) => void;
|
|
22
|
+
emitFormClickWithParams: (params?: AnyObject) => void;
|
|
21
23
|
};
|
|
22
24
|
export declare function getLowCodeFieldFromField(field: IhoTableFieldItem): LowCodeTableFieldItem | undefined;
|
|
23
25
|
declare function createDefaultRenderCell(): ((renderOpts: import("vxe-table").VxeColumnPropTypes.EditRender, params: VxeGlobalRendererHandles.RenderCellParams) => VxeGlobalRendererHandles.RenderResult) | undefined;
|
|
@@ -60,21 +60,29 @@ function useIhoTableFormEvent(payload) {
|
|
|
60
60
|
index: payload.rowIndex
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function emitFormChangeWithParams(params = {}) {
|
|
64
64
|
emit("formChange", {
|
|
65
65
|
...getPayload(),
|
|
66
66
|
...cloneDeep(toRaw(params))
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function emitFormClickWithParams(params = {}) {
|
|
70
70
|
emit("formClick", {
|
|
71
71
|
...getPayload(),
|
|
72
72
|
...cloneDeep(toRaw(params))
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
+
function emitFormChange() {
|
|
76
|
+
emitFormChangeWithParams();
|
|
77
|
+
}
|
|
78
|
+
function emitFormClick() {
|
|
79
|
+
emitFormClickWithParams();
|
|
80
|
+
}
|
|
75
81
|
return {
|
|
76
82
|
emitFormChange,
|
|
77
|
-
emitFormClick
|
|
83
|
+
emitFormClick,
|
|
84
|
+
emitFormChangeWithParams,
|
|
85
|
+
emitFormClickWithParams
|
|
78
86
|
};
|
|
79
87
|
}
|
|
80
88
|
function getLowCodeFieldFromField(field) {
|
package/es/components/index.js
CHANGED
|
@@ -64,7 +64,7 @@ export { useCommonInjection, useSelectOptionProps } from './form-render/src/hook
|
|
|
64
64
|
export { useAutographOptions, useRecommendOptions, useUrlConfigOptions } from './form-render/src/hooks/useFormRenderOptions.js';
|
|
65
65
|
export { businessDateParser, isIdCard, isMobile, parseAge2Birthday, parseAge2FromContext, parseBirthday, parseIdCard, transformDateFormat } from './form-render/src/utils/business.js';
|
|
66
66
|
export { findNextWidget, queryDecorator, queryInput } from './form-render/src/utils/dom.js';
|
|
67
|
-
export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema
|
|
67
|
+
export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, createVisitedSetter, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema } from './form-render/src/utils/schema.js';
|
|
68
68
|
export { combineExtendKey, createInputSlot, createSlot, createUrlConfigParams, formRenderLog, injectOrProvide, isNestedFieldType, isNestedType, mergeDeepProperties, optionMatcherWithKeyword, parseNumberFromMaybeString, presetRequestHandler, splitExtendKey, validateMessageParser } from './form-render/src/utils/index.js';
|
|
69
69
|
export * from '@formily/core';
|
|
70
70
|
export { GlobalShortcutProvider, ShortcutManager, useShortcuts } from './shortcut-provider/src/hooks/useShortcuts.js';
|