cnhis-design-vue 3.1.40-beta.7 → 3.1.40-beta.8
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-config/index.d.ts +38 -142
- package/es/components/form-config/src/FormConfig.vue.d.ts +38 -142
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +19 -71
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +19 -71
- package/es/components/form-render/index.d.ts +19 -71
- package/es/components/form-render/src/FormRender.vue.d.ts +19 -71
- package/es/components/form-render/src/FormRender.vue.js +31 -22
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +19 -71
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -0
- package/es/components/form-render/src/hooks/useAnchor.d.ts +6 -3
- package/es/components/form-render/src/hooks/useAnchor.js +26 -26
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +7 -10
- package/es/components/form-render/src/hooks/useBusinessBinding.js +38 -36
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +2 -6
- package/es/components/form-render/src/hooks/useFormContext.d.ts +1 -2
- package/es/components/form-render/src/hooks/useFormContext.js +2 -2
- package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -0
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +19 -71
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +19 -71
- package/es/env.d.ts +24 -24
- 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
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import { doAnimation } from '../../../../shared/utils/anime.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ref,
|
|
2
|
+
import { untracked } from '@formily/reactive';
|
|
3
|
+
import { useDebounceFn, watchOnce } from '@vueuse/core';
|
|
4
|
+
import { ref, nextTick, computed } from 'vue';
|
|
5
5
|
import { FormItemLineBarDepKeyPrepend } from '../constants/index.js';
|
|
6
6
|
import '../utils/index.js';
|
|
7
|
-
import { createLinebarId
|
|
7
|
+
import { createLinebarId } from '../utils/schema.js';
|
|
8
8
|
|
|
9
9
|
function useAnchor(props, emit, scrollbarRef, collector) {
|
|
10
|
+
const anchorBarRef = ref();
|
|
10
11
|
const __currentAnchor = ref("");
|
|
11
|
-
const formHeight = computed(() => {
|
|
12
|
-
if (isNumber(props.maxHeight))
|
|
13
|
-
return props.maxHeight + "px";
|
|
14
|
-
return props.maxHeight;
|
|
15
|
-
});
|
|
16
12
|
const anchorIdList = ref([]);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
anchorIdList.value.push({ title: _schema.title, name: ((_a = _schema.name) == null ? void 0 : _a.toString()) || "" });
|
|
13
|
+
const generateAnchorList = useDebounceFn(async function(formModel) {
|
|
14
|
+
var _a;
|
|
15
|
+
anchorIdList.value = Object.values(formModel.fields).reduce((res, field) => {
|
|
16
|
+
if (field.componentType === "LINEBAR" && field.selfDisplay === "visible") {
|
|
17
|
+
res.push({ title: field.title, name: field.address.toString() });
|
|
23
18
|
}
|
|
24
|
-
|
|
19
|
+
return res;
|
|
20
|
+
}, []);
|
|
21
|
+
await nextTick();
|
|
22
|
+
(_a = anchorBarRef.value) == null ? void 0 : _a.syncBarPosition();
|
|
23
|
+
}, 100);
|
|
24
|
+
function updateAnchorList(field) {
|
|
25
|
+
if (field.componentType !== "LINEBAR" || !field.selfDisplay)
|
|
26
|
+
return;
|
|
27
|
+
untracked(() => generateAnchorList(field.form));
|
|
25
28
|
}
|
|
26
29
|
let scrollLock = false;
|
|
27
30
|
async function scrollTo(id) {
|
|
@@ -68,14 +71,10 @@ function useAnchor(props, emit, scrollbarRef, collector) {
|
|
|
68
71
|
__currentAnchor.value = (_a = result == null ? void 0 : result.name) != null ? _a : "";
|
|
69
72
|
emit("scroll", scrollEvent);
|
|
70
73
|
}, 300);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
(_anchorIdList)
|
|
74
|
-
|
|
75
|
-
__currentAnchor.value = (_b = (_a = _anchorIdList[0]) == null ? void 0 : _a.name) != null ? _b : "";
|
|
76
|
-
},
|
|
77
|
-
{ deep: true, immediate: true }
|
|
78
|
-
);
|
|
74
|
+
watchOnce(anchorIdList, (_anchorIdList) => {
|
|
75
|
+
var _a, _b;
|
|
76
|
+
__currentAnchor.value = (_b = (_a = _anchorIdList[0]) == null ? void 0 : _a.name) != null ? _b : "";
|
|
77
|
+
});
|
|
79
78
|
const currentAnchor = computed({
|
|
80
79
|
get() {
|
|
81
80
|
return __currentAnchor.value;
|
|
@@ -89,10 +88,11 @@ function useAnchor(props, emit, scrollbarRef, collector) {
|
|
|
89
88
|
return {
|
|
90
89
|
currentAnchor,
|
|
91
90
|
onScroll,
|
|
92
|
-
formHeight,
|
|
93
91
|
anchorIdList,
|
|
94
92
|
generateAnchorList,
|
|
95
|
-
|
|
93
|
+
updateAnchorList,
|
|
94
|
+
scrollTo,
|
|
95
|
+
anchorBarRef
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -2,26 +2,23 @@ import { Form } from '@formily/core';
|
|
|
2
2
|
import { FieldItem, FormBusinessFormatter } from '../../../../../es/components/form-render';
|
|
3
3
|
import { FIELD_BUSINESS_TYPE } from '../constants';
|
|
4
4
|
export declare class BusinessCollector {
|
|
5
|
-
private formModel;
|
|
6
5
|
private businessFormatter?;
|
|
7
6
|
private readonly typeLockMap;
|
|
8
7
|
private readonly typeCollector;
|
|
9
8
|
private readonly fieldNameCollector;
|
|
10
|
-
constructor(
|
|
9
|
+
constructor(businessFormatter?: FormBusinessFormatter | undefined);
|
|
11
10
|
private formatter;
|
|
12
11
|
collect(type: FIELD_BUSINESS_TYPE, fieldItem: FieldItem): void;
|
|
13
12
|
getField(type: FIELD_BUSINESS_TYPE): FieldItem | undefined;
|
|
14
|
-
getFieldInstanceByType(type: FIELD_BUSINESS_TYPE): import("@formily/core").GeneralField | null;
|
|
13
|
+
getFieldInstanceByType(formModel: Form, type: FIELD_BUSINESS_TYPE): import("@formily/core").GeneralField | null;
|
|
15
14
|
private getType;
|
|
16
15
|
private getValueByField;
|
|
17
|
-
getValueByType(type: FIELD_BUSINESS_TYPE): unknown;
|
|
18
|
-
setValueByType(type: FIELD_BUSINESS_TYPE, value: unknown): void;
|
|
19
|
-
registerChangeBusiness(type: FIELD_BUSINESS_TYPE, handler: () => void): this;
|
|
20
|
-
registerBlurBusiness(type: FIELD_BUSINESS_TYPE, handler: () => void): this;
|
|
16
|
+
getValueByType(formModel: Form, type: FIELD_BUSINESS_TYPE): unknown;
|
|
17
|
+
setValueByType(formModel: Form, type: FIELD_BUSINESS_TYPE, value: unknown): void;
|
|
18
|
+
registerChangeBusiness(type: FIELD_BUSINESS_TYPE, handler: (formModel: Form) => void): this;
|
|
21
19
|
private changeHandlerMap;
|
|
22
|
-
|
|
23
|
-
trigger(fieldName: string, triggerType?: 'change' | 'blur'): Map<FIELD_BUSINESS_TYPE, number> | undefined;
|
|
20
|
+
trigger(formModel: Form, fieldName: string, triggerType?: 'change' | 'blur'): Map<FIELD_BUSINESS_TYPE, number> | undefined;
|
|
24
21
|
}
|
|
25
22
|
export declare function useBusinessBinding(): {
|
|
26
|
-
create: (
|
|
23
|
+
create: (formatter?: FormBusinessFormatter) => BusinessCollector;
|
|
27
24
|
};
|
|
@@ -7,14 +7,12 @@ import '../utils/index.js';
|
|
|
7
7
|
import { isIdCard, parseIdCard, parseAgeFromContext, parseBirthday, parseAge2Birthday } from '../utils/business.js';
|
|
8
8
|
|
|
9
9
|
class BusinessCollector {
|
|
10
|
-
constructor(
|
|
11
|
-
this.formModel = formModel;
|
|
10
|
+
constructor(businessFormatter) {
|
|
12
11
|
this.businessFormatter = businessFormatter;
|
|
13
12
|
this.typeLockMap = /* @__PURE__ */ new Map();
|
|
14
13
|
this.typeCollector = /* @__PURE__ */ new Map();
|
|
15
14
|
this.fieldNameCollector = /* @__PURE__ */ new Map();
|
|
16
15
|
this.changeHandlerMap = /* @__PURE__ */ new Map([]);
|
|
17
|
-
this.blurHandlerMap = /* @__PURE__ */ new Map([]);
|
|
18
16
|
}
|
|
19
17
|
formatter(...args) {
|
|
20
18
|
return isFunction(this.businessFormatter) ? this.businessFormatter(...args) : args[0].value;
|
|
@@ -26,24 +24,24 @@ class BusinessCollector {
|
|
|
26
24
|
getField(type) {
|
|
27
25
|
return this.typeCollector.get(type);
|
|
28
26
|
}
|
|
29
|
-
getFieldInstanceByType(type) {
|
|
27
|
+
getFieldInstanceByType(formModel, type) {
|
|
30
28
|
const field = this.getField(type);
|
|
31
|
-
return field ?
|
|
29
|
+
return field ? formModel.query(field.val_key).take() : null;
|
|
32
30
|
}
|
|
33
31
|
getType(fieldName) {
|
|
34
32
|
return this.fieldNameCollector.get(fieldName);
|
|
35
33
|
}
|
|
36
|
-
getValueByField(fieldName) {
|
|
37
|
-
const _field =
|
|
34
|
+
getValueByField(formModel, fieldName) {
|
|
35
|
+
const _field = formModel.query(fieldName).take();
|
|
38
36
|
return isField(_field) ? _field.value : null;
|
|
39
37
|
}
|
|
40
|
-
getValueByType(type) {
|
|
38
|
+
getValueByType(formModel, type) {
|
|
41
39
|
const field = this.getField(type);
|
|
42
|
-
return field ? this.getValueByField(field.val_key) : null;
|
|
40
|
+
return field ? this.getValueByField(formModel, field.val_key) : null;
|
|
43
41
|
}
|
|
44
|
-
setValueByType(type, value) {
|
|
42
|
+
setValueByType(formModel, type, value) {
|
|
45
43
|
const field = this.getField(type);
|
|
46
|
-
field &&
|
|
44
|
+
field && formModel.setFieldState(field.val_key, (state) => {
|
|
47
45
|
if (state.value === value)
|
|
48
46
|
return;
|
|
49
47
|
const lock = this.typeLockMap.get(type);
|
|
@@ -55,11 +53,7 @@ class BusinessCollector {
|
|
|
55
53
|
this.changeHandlerMap.set(type, handler);
|
|
56
54
|
return this;
|
|
57
55
|
}
|
|
58
|
-
|
|
59
|
-
this.blurHandlerMap.set(type, handler);
|
|
60
|
-
return this;
|
|
61
|
-
}
|
|
62
|
-
trigger(fieldName, triggerType = "change") {
|
|
56
|
+
trigger(formModel, fieldName, triggerType = "change") {
|
|
63
57
|
var _a;
|
|
64
58
|
const type = this.getType(fieldName);
|
|
65
59
|
if (!type)
|
|
@@ -67,10 +61,10 @@ class BusinessCollector {
|
|
|
67
61
|
if (triggerType === "change" && this.typeLockMap.get(type) > 0) {
|
|
68
62
|
return this.typeLockMap.set(type, this.typeLockMap.get(type) - 1);
|
|
69
63
|
}
|
|
70
|
-
const handler = triggerType === "change" ? this.changeHandlerMap :
|
|
64
|
+
const handler = triggerType === "change" ? this.changeHandlerMap : null;
|
|
71
65
|
if (!handler)
|
|
72
66
|
return;
|
|
73
|
-
(_a = handler.get(type)) == null ? void 0 : _a.call(this);
|
|
67
|
+
(_a = handler.get(type)) == null ? void 0 : _a.call(this, formModel);
|
|
74
68
|
}
|
|
75
69
|
}
|
|
76
70
|
function useBusinessBinding() {
|
|
@@ -79,37 +73,45 @@ function useBusinessBinding() {
|
|
|
79
73
|
const birthdayField = this.getField(FIELD_BUSINESS_TYPE.BIRTHDAY);
|
|
80
74
|
return (_a = birthdayField == null ? void 0 : birthdayField.date_format) != null ? _a : "yyyy-MM-dd HH:mm";
|
|
81
75
|
}
|
|
82
|
-
function handlerIdCardType() {
|
|
83
|
-
const idCard = this.getValueByType(FIELD_BUSINESS_TYPE.ID_CARD);
|
|
76
|
+
function handlerIdCardType(formModel) {
|
|
77
|
+
const idCard = this.getValueByType(formModel, FIELD_BUSINESS_TYPE.ID_CARD);
|
|
84
78
|
if (!idCard || !isString(idCard) || !isIdCard(idCard)) {
|
|
85
79
|
return;
|
|
86
80
|
}
|
|
87
81
|
const info = parseIdCard(idCard);
|
|
88
82
|
const { age, ageUnit } = parseAgeFromContext(info);
|
|
89
|
-
this.setValueByType(FIELD_BUSINESS_TYPE.AGE_UNIT, ageUnit);
|
|
90
|
-
this.setValueByType(FIELD_BUSINESS_TYPE.AGE, age);
|
|
91
|
-
this.setValueByType(FIELD_BUSINESS_TYPE.SEX, info.sex);
|
|
92
|
-
this.setValueByType(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
83
|
+
this.setValueByType(formModel, FIELD_BUSINESS_TYPE.AGE_UNIT, ageUnit);
|
|
84
|
+
this.setValueByType(formModel, FIELD_BUSINESS_TYPE.AGE, age);
|
|
85
|
+
this.setValueByType(formModel, FIELD_BUSINESS_TYPE.SEX, info.sex);
|
|
86
|
+
this.setValueByType(
|
|
87
|
+
formModel,
|
|
88
|
+
FIELD_BUSINESS_TYPE.BIRTHDAY,
|
|
89
|
+
format(new Date(info.birthday), getBirthdayFormat.call(this))
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
function handlerBirthdayType(formModel) {
|
|
93
|
+
const birthday = this.getValueByType(formModel, FIELD_BUSINESS_TYPE.BIRTHDAY);
|
|
96
94
|
if (!isString(birthday))
|
|
97
95
|
return;
|
|
98
96
|
const { age, ageUnit } = parseAgeFromContext(parseBirthday(birthday));
|
|
99
|
-
this.setValueByType(FIELD_BUSINESS_TYPE.AGE_UNIT, ageUnit);
|
|
100
|
-
this.setValueByType(FIELD_BUSINESS_TYPE.AGE, age);
|
|
97
|
+
this.setValueByType(formModel, FIELD_BUSINESS_TYPE.AGE_UNIT, ageUnit);
|
|
98
|
+
this.setValueByType(formModel, FIELD_BUSINESS_TYPE.AGE, age);
|
|
101
99
|
}
|
|
102
|
-
function handlerAgeType() {
|
|
103
|
-
const age = this.getValueByType(FIELD_BUSINESS_TYPE.AGE);
|
|
104
|
-
const ageUnit = this.getValueByType(FIELD_BUSINESS_TYPE.AGE_UNIT);
|
|
100
|
+
function handlerAgeType(formModel) {
|
|
101
|
+
const age = this.getValueByType(formModel, FIELD_BUSINESS_TYPE.AGE);
|
|
102
|
+
const ageUnit = this.getValueByType(formModel, FIELD_BUSINESS_TYPE.AGE_UNIT);
|
|
105
103
|
if (!isString(age) && !isNumber(age) || age === "")
|
|
106
104
|
return;
|
|
107
105
|
if (!isString(ageUnit) || ageUnit === "")
|
|
108
106
|
return;
|
|
109
|
-
this.setValueByType(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
this.setValueByType(
|
|
108
|
+
formModel,
|
|
109
|
+
FIELD_BUSINESS_TYPE.BIRTHDAY,
|
|
110
|
+
parseAge2Birthday(+age, ageUnit, getBirthdayFormat.call(this))
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
function create(formatter) {
|
|
114
|
+
return new BusinessCollector(formatter).registerChangeBusiness(FIELD_BUSINESS_TYPE.ID_CARD, handlerIdCardType).registerChangeBusiness(FIELD_BUSINESS_TYPE.AGE_UNIT, handlerAgeType).registerChangeBusiness(FIELD_BUSINESS_TYPE.AGE, handlerAgeType).registerChangeBusiness(FIELD_BUSINESS_TYPE.BIRTHDAY, handlerBirthdayType);
|
|
113
115
|
}
|
|
114
116
|
return { create };
|
|
115
117
|
}
|
|
@@ -30,12 +30,7 @@ function useFieldListAdaptor(collector) {
|
|
|
30
30
|
"x-component-props": {
|
|
31
31
|
placeholder: item.placeholder,
|
|
32
32
|
clearable: item.is_empty === "0",
|
|
33
|
-
...item.componentProps || {}
|
|
34
|
-
onBlur(...args) {
|
|
35
|
-
var _a2, _b;
|
|
36
|
-
collector.trigger(item.val_key, "blur");
|
|
37
|
-
(_b = (_a2 = item.componentProps) == null ? void 0 : _a2.onBlur) == null ? void 0 : _b.call(_a2, ...args);
|
|
38
|
-
}
|
|
33
|
+
...item.componentProps || {}
|
|
39
34
|
},
|
|
40
35
|
"x-content": item.slots,
|
|
41
36
|
"x-display": item.is_show === "0" ? "hidden" : "visible",
|
|
@@ -180,6 +175,7 @@ function useFieldListAdaptor(collector) {
|
|
|
180
175
|
type: "void",
|
|
181
176
|
title: item.alias || item.name,
|
|
182
177
|
"x-component": "LINEBAR",
|
|
178
|
+
"x-display": "visible",
|
|
183
179
|
"x-component-props": {
|
|
184
180
|
disabled: item.is_not_fold === "1",
|
|
185
181
|
id: createLinebarId(item.val_key),
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Func } from '../../../../../es/shared/types';
|
|
2
|
-
import { Form } from '@formily/core';
|
|
3
2
|
import { ShallowReactive } from 'vue';
|
|
4
3
|
import { FormRenderProps } from '../../../../../es/components/form-render';
|
|
5
|
-
export declare function useFormContext(props: ShallowReactive<FormRenderProps>,
|
|
4
|
+
export declare function useFormContext(props: ShallowReactive<FormRenderProps>, emit: Func): {
|
|
6
5
|
asyncQueue: import("../../../../../es/components/form-render").FormAsyncQueue;
|
|
7
6
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
8
7
|
businessCollector: import("../../../../../es/components/form-render").BusinessCollector;
|
|
@@ -14,7 +14,7 @@ import { useBusinessBinding } from './useBusinessBinding.js';
|
|
|
14
14
|
import { useChangeContext } from './useChangeContext.js';
|
|
15
15
|
import { useFormItemDeps } from './useFormItemDeps.js';
|
|
16
16
|
|
|
17
|
-
function useFormContext(props,
|
|
17
|
+
function useFormContext(props, emit) {
|
|
18
18
|
const { callLifeCycle } = useFormRenderLifeCycle(props);
|
|
19
19
|
const asyncQueue = injectOrProvide(
|
|
20
20
|
InjectionAsyncQueue,
|
|
@@ -34,7 +34,7 @@ function useFormContext(props, formModel, emit) {
|
|
|
34
34
|
scope: Object.assign({}, usePresetScope(), props.scope)
|
|
35
35
|
}).SchemaField
|
|
36
36
|
);
|
|
37
|
-
const businessCollector = useBusinessBinding().create(
|
|
37
|
+
const businessCollector = useBusinessBinding().create(props.businessFormatter);
|
|
38
38
|
provide(InjectionBusinessCollector, businessCollector);
|
|
39
39
|
const changeContextCollector = useChangeContext().create();
|
|
40
40
|
provide(InjectionChangeContextCollector, changeContextCollector);
|
|
@@ -499,6 +499,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
499
499
|
getTotalLen: () => void;
|
|
500
500
|
countdown: (startTime: any) => void;
|
|
501
501
|
clearTimer: () => void;
|
|
502
|
+
/**
|
|
503
|
+
* wacth
|
|
504
|
+
*/
|
|
502
505
|
init: () => void;
|
|
503
506
|
checkType: (val: any) => string;
|
|
504
507
|
diffAnswered: (form: any) => void;
|
|
@@ -315,7 +315,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
315
315
|
return openBlock(), createElementBlock("div", {
|
|
316
316
|
class: normalizeClass(["c-scale", { "c-scale-nobtn": unref(showSaveBtn) }])
|
|
317
317
|
}, [
|
|
318
|
-
createCommentVNode(' <template v-if="state.spinning">\
|
|
318
|
+
createCommentVNode(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="\u52A0\u8F7D\u4E2D"></n-spin>\n </template> '),
|
|
319
319
|
!state.spinning && !state.hasFrontAddress ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
320
320
|
unref(noDataState).noData ? (openBlock(), createBlock(NoData, {
|
|
321
321
|
key: 0,
|
|
@@ -1984,18 +1984,30 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1984
1984
|
}>>;
|
|
1985
1985
|
emit: (event: "scroll" | "formChange" | "annotationChange", ...args: any[]) => void;
|
|
1986
1986
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
1987
|
+
formRenderRef: import("vue").Ref<HTMLElement | undefined>;
|
|
1988
|
+
formHeight: import("vue").ComputedRef<string>;
|
|
1989
|
+
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
1990
|
+
businessCollector: import("..").BusinessCollector;
|
|
1991
|
+
formItemDepsCollector: import("..").FormItemDepsCollector;
|
|
1992
|
+
changeContextCollector: import("..").ContextCollector;
|
|
1993
|
+
formUUID: string;
|
|
1994
|
+
anchorBarRef: import("vue").Ref<{
|
|
1995
|
+
syncBarPosition: import("../../../es/shared/types").Func<any[], any>;
|
|
1996
|
+
} | undefined>;
|
|
1997
|
+
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
1998
|
+
generateAnchorList: (formModel: import("@formily/core").Form<any>) => Promise<void>;
|
|
1999
|
+
updateAnchorList: (field: import("@formily/core").GeneralField) => void;
|
|
2000
|
+
anchorIdList: import("vue").Ref<{
|
|
2001
|
+
name: string;
|
|
2002
|
+
title: string;
|
|
2003
|
+
}[]>;
|
|
2004
|
+
onScroll: (scrollEvent: Event) => void;
|
|
1987
2005
|
triggerAutoHidden: (field: import("@formily/core").GeneralField) => Promise<void>;
|
|
1988
2006
|
formModel: import("@formily/core").Form<{
|
|
1989
2007
|
[x: string]: any;
|
|
1990
2008
|
}>;
|
|
1991
2009
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
1992
2010
|
triggerAllReactionsHandler: () => void;
|
|
1993
|
-
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
1994
|
-
businessCollector: import("..").BusinessCollector;
|
|
1995
|
-
formItemDepsCollector: import("..").FormItemDepsCollector;
|
|
1996
|
-
changeContextCollector: import("..").ContextCollector;
|
|
1997
|
-
formUUID: string;
|
|
1998
|
-
formRenderRef: import("vue").Ref<HTMLElement | undefined>;
|
|
1999
2011
|
schemaAdaptor: (fieldList: import("..").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
2000
2012
|
[key: symbol]: any;
|
|
2001
2013
|
[key: `x-${string}`]: any;
|
|
@@ -2111,70 +2123,6 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2111
2123
|
"x-read-pretty"?: boolean | undefined;
|
|
2112
2124
|
"x-compile-omitted"?: string[] | undefined;
|
|
2113
2125
|
}>>;
|
|
2114
|
-
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
2115
|
-
generateAnchorList: (schema: import("@formily/json-schema").Stringify<{
|
|
2116
|
-
[key: symbol]: any;
|
|
2117
|
-
[key: `x-${string}`]: any;
|
|
2118
|
-
[key: `x-${number}`]: any;
|
|
2119
|
-
version?: string | undefined;
|
|
2120
|
-
name?: import("@formily/json-schema").SchemaKey | undefined;
|
|
2121
|
-
title?: any;
|
|
2122
|
-
description?: any;
|
|
2123
|
-
default?: any;
|
|
2124
|
-
readOnly?: boolean | undefined;
|
|
2125
|
-
writeOnly?: boolean | undefined;
|
|
2126
|
-
type?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
2127
|
-
enum?: import("@formily/json-schema").SchemaEnum<any> | undefined;
|
|
2128
|
-
const?: any;
|
|
2129
|
-
multipleOf?: number | undefined;
|
|
2130
|
-
maximum?: number | undefined;
|
|
2131
|
-
exclusiveMaximum?: number | undefined;
|
|
2132
|
-
minimum?: number | undefined;
|
|
2133
|
-
exclusiveMinimum?: number | undefined;
|
|
2134
|
-
maxLength?: number | undefined;
|
|
2135
|
-
minLength?: number | undefined;
|
|
2136
|
-
pattern?: string | RegExp | undefined;
|
|
2137
|
-
maxItems?: number | undefined;
|
|
2138
|
-
minItems?: number | undefined;
|
|
2139
|
-
uniqueItems?: boolean | undefined;
|
|
2140
|
-
maxProperties?: number | undefined;
|
|
2141
|
-
minProperties?: number | undefined;
|
|
2142
|
-
required?: string | boolean | string[] | undefined;
|
|
2143
|
-
format?: string | undefined;
|
|
2144
|
-
$ref?: string | undefined;
|
|
2145
|
-
$namespace?: string | undefined;
|
|
2146
|
-
definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
2147
|
-
properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
2148
|
-
items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any> | undefined;
|
|
2149
|
-
additionalItems?: import("@formily/json-schema").Stringify<any> | undefined;
|
|
2150
|
-
patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
2151
|
-
additionalProperties?: import("@formily/json-schema").Stringify<any> | undefined;
|
|
2152
|
-
"x-value"?: any;
|
|
2153
|
-
"x-index"?: number | undefined;
|
|
2154
|
-
"x-pattern"?: any;
|
|
2155
|
-
"x-display"?: any;
|
|
2156
|
-
"x-validator"?: any;
|
|
2157
|
-
"x-decorator"?: any;
|
|
2158
|
-
"x-decorator-props"?: any;
|
|
2159
|
-
"x-component"?: any;
|
|
2160
|
-
"x-component-props"?: any;
|
|
2161
|
-
"x-reactions"?: import("@formily/json-schema").SchemaReactions<any> | undefined;
|
|
2162
|
-
"x-content"?: any;
|
|
2163
|
-
"x-data"?: any;
|
|
2164
|
-
"x-visible"?: boolean | undefined;
|
|
2165
|
-
"x-hidden"?: boolean | undefined;
|
|
2166
|
-
"x-disabled"?: boolean | undefined;
|
|
2167
|
-
"x-editable"?: boolean | undefined;
|
|
2168
|
-
"x-read-only"?: boolean | undefined;
|
|
2169
|
-
"x-read-pretty"?: boolean | undefined;
|
|
2170
|
-
"x-compile-omitted"?: string[] | undefined;
|
|
2171
|
-
}>) => void;
|
|
2172
|
-
anchorIdList: import("vue").Ref<{
|
|
2173
|
-
name: string;
|
|
2174
|
-
title: string;
|
|
2175
|
-
}[]>;
|
|
2176
|
-
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
2177
|
-
onScroll: (scrollEvent: Event) => void;
|
|
2178
2126
|
onKeydown: (event: KeyboardEvent) => void;
|
|
2179
2127
|
clearSpan: (uuid: string) => void;
|
|
2180
2128
|
exposeEvent: {
|
|
@@ -2214,6 +2162,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2214
2162
|
editable: boolean;
|
|
2215
2163
|
component: import("@formily/core").FieldComponent<any, any>;
|
|
2216
2164
|
decorator: import("@formily/core").FieldDecorator<any, any>;
|
|
2165
|
+
readPretty: boolean;
|
|
2217
2166
|
validating: boolean;
|
|
2218
2167
|
submitting: boolean;
|
|
2219
2168
|
visited: boolean;
|
|
@@ -2257,7 +2206,6 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2257
2206
|
designable: boolean;
|
|
2258
2207
|
locate: (address: import("@formily/path").Pattern) => void;
|
|
2259
2208
|
readonly parent: import("@formily/core").GeneralField;
|
|
2260
|
-
readPretty: boolean;
|
|
2261
2209
|
setTitle: (title?: string | undefined) => void;
|
|
2262
2210
|
setDescription: (description?: string | undefined) => void;
|
|
2263
2211
|
setDisplay: (type?: import("@formily/core").FieldDisplayTypes | undefined) => void;
|
|
@@ -1986,18 +1986,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1986
1986
|
}>>;
|
|
1987
1987
|
emit: (event: "scroll" | "formChange" | "annotationChange", ...args: any[]) => void;
|
|
1988
1988
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
1989
|
+
formRenderRef: import("vue").Ref<HTMLElement | undefined>;
|
|
1990
|
+
formHeight: import("vue").ComputedRef<string>;
|
|
1991
|
+
SchemaField: Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
1992
|
+
businessCollector: import("../../../../es/components/form-render").BusinessCollector;
|
|
1993
|
+
formItemDepsCollector: import("../../../../es/components/form-render").FormItemDepsCollector;
|
|
1994
|
+
changeContextCollector: import("../../../../es/components/form-render").ContextCollector;
|
|
1995
|
+
formUUID: string;
|
|
1996
|
+
anchorBarRef: import("vue").Ref<{
|
|
1997
|
+
syncBarPosition: Func<any[], any>;
|
|
1998
|
+
} | undefined>;
|
|
1999
|
+
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
2000
|
+
generateAnchorList: (formModel: import("../../../../es/components/form-render").Form<any>) => Promise<void>;
|
|
2001
|
+
updateAnchorList: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
2002
|
+
anchorIdList: import("vue").Ref<{
|
|
2003
|
+
name: string;
|
|
2004
|
+
title: string;
|
|
2005
|
+
}[]>;
|
|
2006
|
+
onScroll: (scrollEvent: Event) => void;
|
|
1989
2007
|
triggerAutoHidden: (field: import("../../../../es/components/form-render").GeneralField) => Promise<void>;
|
|
1990
2008
|
formModel: import("../../../../es/components/form-render").Form<{
|
|
1991
2009
|
[x: string]: any;
|
|
1992
2010
|
}>;
|
|
1993
2011
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
1994
2012
|
triggerAllReactionsHandler: () => void;
|
|
1995
|
-
SchemaField: Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
1996
|
-
businessCollector: import("../../../../es/components/form-render").BusinessCollector;
|
|
1997
|
-
formItemDepsCollector: import("../../../../es/components/form-render").FormItemDepsCollector;
|
|
1998
|
-
changeContextCollector: import("../../../../es/components/form-render").ContextCollector;
|
|
1999
|
-
formUUID: string;
|
|
2000
|
-
formRenderRef: import("vue").Ref<HTMLElement | undefined>;
|
|
2001
2013
|
schemaAdaptor: (fieldList: FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
2002
2014
|
[key: symbol]: any;
|
|
2003
2015
|
[key: `x-${string}`]: any;
|
|
@@ -2113,70 +2125,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2113
2125
|
"x-read-pretty"?: boolean | undefined;
|
|
2114
2126
|
"x-compile-omitted"?: string[] | undefined;
|
|
2115
2127
|
}>>;
|
|
2116
|
-
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
2117
|
-
generateAnchorList: (schema: import("@formily/json-schema").Stringify<{
|
|
2118
|
-
[key: symbol]: any;
|
|
2119
|
-
[key: `x-${string}`]: any;
|
|
2120
|
-
[key: `x-${number}`]: any;
|
|
2121
|
-
version?: string | undefined;
|
|
2122
|
-
name?: import("@formily/json-schema").SchemaKey | undefined;
|
|
2123
|
-
title?: any;
|
|
2124
|
-
description?: any;
|
|
2125
|
-
default?: any;
|
|
2126
|
-
readOnly?: boolean | undefined;
|
|
2127
|
-
writeOnly?: boolean | undefined;
|
|
2128
|
-
type?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
2129
|
-
enum?: import("@formily/json-schema").SchemaEnum<any> | undefined;
|
|
2130
|
-
const?: any;
|
|
2131
|
-
multipleOf?: number | undefined;
|
|
2132
|
-
maximum?: number | undefined;
|
|
2133
|
-
exclusiveMaximum?: number | undefined;
|
|
2134
|
-
minimum?: number | undefined;
|
|
2135
|
-
exclusiveMinimum?: number | undefined;
|
|
2136
|
-
maxLength?: number | undefined;
|
|
2137
|
-
minLength?: number | undefined;
|
|
2138
|
-
pattern?: string | RegExp | undefined;
|
|
2139
|
-
maxItems?: number | undefined;
|
|
2140
|
-
minItems?: number | undefined;
|
|
2141
|
-
uniqueItems?: boolean | undefined;
|
|
2142
|
-
maxProperties?: number | undefined;
|
|
2143
|
-
minProperties?: number | undefined;
|
|
2144
|
-
required?: string | boolean | string[] | undefined;
|
|
2145
|
-
format?: string | undefined;
|
|
2146
|
-
$ref?: string | undefined;
|
|
2147
|
-
$namespace?: string | undefined;
|
|
2148
|
-
definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
2149
|
-
properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
2150
|
-
items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any> | undefined;
|
|
2151
|
-
additionalItems?: import("@formily/json-schema").Stringify<any> | undefined;
|
|
2152
|
-
patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
2153
|
-
additionalProperties?: import("@formily/json-schema").Stringify<any> | undefined;
|
|
2154
|
-
"x-value"?: any;
|
|
2155
|
-
"x-index"?: number | undefined;
|
|
2156
|
-
"x-pattern"?: any;
|
|
2157
|
-
"x-display"?: any;
|
|
2158
|
-
"x-validator"?: any;
|
|
2159
|
-
"x-decorator"?: any;
|
|
2160
|
-
"x-decorator-props"?: any;
|
|
2161
|
-
"x-component"?: any;
|
|
2162
|
-
"x-component-props"?: any;
|
|
2163
|
-
"x-reactions"?: import("@formily/json-schema").SchemaReactions<any> | undefined;
|
|
2164
|
-
"x-content"?: any;
|
|
2165
|
-
"x-data"?: any;
|
|
2166
|
-
"x-visible"?: boolean | undefined;
|
|
2167
|
-
"x-hidden"?: boolean | undefined;
|
|
2168
|
-
"x-disabled"?: boolean | undefined;
|
|
2169
|
-
"x-editable"?: boolean | undefined;
|
|
2170
|
-
"x-read-only"?: boolean | undefined;
|
|
2171
|
-
"x-read-pretty"?: boolean | undefined;
|
|
2172
|
-
"x-compile-omitted"?: string[] | undefined;
|
|
2173
|
-
}>) => void;
|
|
2174
|
-
anchorIdList: import("vue").Ref<{
|
|
2175
|
-
name: string;
|
|
2176
|
-
title: string;
|
|
2177
|
-
}[]>;
|
|
2178
|
-
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
2179
|
-
onScroll: (scrollEvent: Event) => void;
|
|
2180
2128
|
onKeydown: (event: KeyboardEvent) => void;
|
|
2181
2129
|
clearSpan: (uuid: string) => void;
|
|
2182
2130
|
exposeEvent: {
|
|
@@ -2216,6 +2164,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2216
2164
|
editable: boolean;
|
|
2217
2165
|
component: import("../../../../es/components/form-render").FieldComponent<any, any>;
|
|
2218
2166
|
decorator: import("../../../../es/components/form-render").FieldDecorator<any, any>;
|
|
2167
|
+
readPretty: boolean;
|
|
2219
2168
|
validating: boolean;
|
|
2220
2169
|
submitting: boolean;
|
|
2221
2170
|
visited: boolean;
|
|
@@ -2259,7 +2208,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2259
2208
|
designable: boolean;
|
|
2260
2209
|
locate: (address: import("@formily/path").Pattern) => void;
|
|
2261
2210
|
readonly parent: import("../../../../es/components/form-render").GeneralField;
|
|
2262
|
-
readPretty: boolean;
|
|
2263
2211
|
setTitle: (title?: string | undefined) => void;
|
|
2264
2212
|
setDescription: (description?: string | undefined) => void;
|
|
2265
2213
|
setDisplay: (type?: import("../../../../es/components/form-render").FieldDisplayTypes | undefined) => void;
|
package/es/env.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
interface ImportMetaEnv {
|
|
4
|
-
readonly VITE_APP_TYPE: string;
|
|
5
|
-
// 更多环境变量...
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface ImportMeta {
|
|
9
|
-
readonly env: ImportMetaEnv;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module '*.vue' {
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
import type { App, defineComponent } from 'vue';
|
|
15
|
-
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
-
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
-
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
-
install(app: App): void;
|
|
19
|
-
};
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
export default component;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare module '*.js';
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
interface ImportMetaEnv {
|
|
4
|
+
readonly VITE_APP_TYPE: string;
|
|
5
|
+
// 更多环境变量...
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ImportMeta {
|
|
9
|
+
readonly env: ImportMetaEnv;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.vue' {
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import type { App, defineComponent } from 'vue';
|
|
15
|
+
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
+
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
+
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
+
install(app: App): void;
|
|
19
|
+
};
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
export default component;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.js';
|