cnhis-design-vue 3.1.21-beta.6 → 3.1.21-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/big-table/index.d.ts +1 -1
- package/es/components/big-table/src/BigTable.vue.d.ts +1 -1
- 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/button-print/index.d.ts +1 -1
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -1
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +1 -1
- package/es/components/drag-layout/index.d.ts +1 -1
- package/es/components/drag-layout/src/DragLayout.vue.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useCenter2.js +2 -1
- package/es/components/fabric-chart/src/hooks/useLeft2.js +2 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-config/index.d.ts +3 -2
- package/es/components/form-config/src/FormConfig.vue.d.ts +3 -2
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +2 -1
- package/es/components/form-render/index.d.ts +1 -1
- package/es/components/form-render/index2.js +4 -5
- package/es/components/form-render/src/FormRender.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/cascader.js +3 -4
- package/es/components/form-render/src/components/renderer/checkbox.js +2 -5
- package/es/components/form-render/src/components/renderer/combination.js +2 -4
- package/es/components/form-render/src/components/renderer/complex.js +1 -4
- package/es/components/form-render/src/components/renderer/date.js +1 -3
- package/es/components/form-render/src/components/renderer/formItem.js +1 -4
- package/es/components/form-render/src/components/renderer/inputGroup.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/radio.js +1 -3
- package/es/components/form-render/src/components/renderer/search.js +6 -11
- package/es/components/form-render/src/components/renderer/select.js +8 -13
- package/es/components/form-render/src/components/renderer/switch.js +2 -5
- package/es/components/form-render/src/components/renderer/textarea.js +2 -5
- package/es/components/form-render/src/hooks/useAnchor2.js +1 -3
- package/es/components/form-render/src/hooks/useBusinessBinding2.js +1 -3
- package/es/components/form-render/src/hooks/useFormItemDeps2.js +1 -4
- package/es/components/form-render/src/hooks/usePresetScope2.js +1 -4
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/components/form-render/src/utils/index.d.ts +4 -1
- package/es/components/form-render/src/utils/index.js +27 -1
- package/es/components/info-header/index.d.ts +1 -1
- package/es/components/info-header/src/InfoHeader.vue.d.ts +1 -1
- package/es/components/scale-view/index.d.ts +1 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +2 -2
- package/es/components/select-label/index.d.ts +4 -4
- package/es/components/select-label/src/LabelFormContent.vue.d.ts +2 -2
- package/es/components/select-label/src/SelectLabel.vue.d.ts +2 -2
- package/es/components/select-person/index.d.ts +1 -1
- package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
- package/es/components/shortcut-setter/index.d.ts +2 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +2 -1
- package/es/components/time-line/index.d.ts +1 -1
- package/es/components/time-line/src/TimeLine.vue.d.ts +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -609,7 +609,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
609
609
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
610
610
|
class: import("vue").Ref<string | undefined>;
|
|
611
611
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
612
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
612
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
613
613
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
614
614
|
[key: string]: any;
|
|
615
615
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -927,6 +927,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
927
927
|
option?: {
|
|
928
928
|
text: string;
|
|
929
929
|
value: any;
|
|
930
|
+
keyword?: string | undefined;
|
|
930
931
|
children?: any[] | undefined;
|
|
931
932
|
}[] | undefined;
|
|
932
933
|
multi_select?: import("..").FormCommonState | undefined;
|
|
@@ -3031,7 +3032,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3031
3032
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
3032
3033
|
class: import("vue").Ref<string | undefined>;
|
|
3033
3034
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
3034
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
3035
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
3035
3036
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
3036
3037
|
[key: string]: any;
|
|
3037
3038
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -611,7 +611,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
611
611
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
612
612
|
class: import("vue").Ref<string | undefined>;
|
|
613
613
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
614
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
614
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
615
615
|
readonly tab: PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
616
616
|
[key: string]: any;
|
|
617
617
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -929,6 +929,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
929
929
|
option?: {
|
|
930
930
|
text: string;
|
|
931
931
|
value: any;
|
|
932
|
+
keyword?: string | undefined;
|
|
932
933
|
children?: any[] | undefined;
|
|
933
934
|
}[] | undefined;
|
|
934
935
|
multi_select?: import("../..").FormCommonState | undefined;
|
|
@@ -3033,7 +3034,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3033
3034
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
3034
3035
|
class: import("vue").Ref<string | undefined>;
|
|
3035
3036
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
3036
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
3037
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
3037
3038
|
readonly tab: PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
3038
3039
|
[key: string]: any;
|
|
3039
3040
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -471,7 +471,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
471
471
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
472
472
|
class: import("vue").Ref<string | undefined>;
|
|
473
473
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
474
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
474
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
475
475
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
476
476
|
[key: string]: any;
|
|
477
477
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -56,6 +56,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
56
56
|
option?: {
|
|
57
57
|
text: string;
|
|
58
58
|
value: any;
|
|
59
|
+
keyword?: string | undefined;
|
|
59
60
|
children?: any[] | undefined;
|
|
60
61
|
}[] | undefined;
|
|
61
62
|
multi_select?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
@@ -2160,7 +2161,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
2160
2161
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
2161
2162
|
class: import("vue").Ref<string | undefined>;
|
|
2162
2163
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
2163
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
2164
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2164
2165
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2165
2166
|
[key: string]: any;
|
|
2166
2167
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -457,7 +457,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
457
457
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
458
458
|
class: import("vue").Ref<string | undefined>;
|
|
459
459
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
460
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
460
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
461
461
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
462
462
|
[key: string]: any;
|
|
463
463
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -3,12 +3,9 @@ import { safeComponentRegister } from '../../shared/utils/index2.js';
|
|
|
3
3
|
import script from './src/FormRender.js';
|
|
4
4
|
import '@vueuse/core';
|
|
5
5
|
import 'lodash-es';
|
|
6
|
-
import '
|
|
7
|
-
import '@formily/path';
|
|
8
|
-
import '@vue/shared';
|
|
9
|
-
import 'date-fns';
|
|
10
|
-
export * from '@formily/core';
|
|
6
|
+
import './src/utils/index.js';
|
|
11
7
|
import '@formily/vue';
|
|
8
|
+
import 'vue';
|
|
12
9
|
import '../../shared/utils/tapable/SyncHook.js';
|
|
13
10
|
import '../../shared/utils/tapable/SyncBailHook.js';
|
|
14
11
|
import '../../shared/utils/tapable/SyncWaterfallHook.js';
|
|
@@ -19,6 +16,8 @@ import '../../shared/utils/tapable/AsyncSeriesHook.js';
|
|
|
19
16
|
import '../../shared/utils/tapable/AsyncSeriesBailHook.js';
|
|
20
17
|
import '../../shared/utils/tapable/AsyncSeriesLoopHook.js';
|
|
21
18
|
import '../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
|
|
19
|
+
export * from '@formily/core';
|
|
20
|
+
import '@vue/shared';
|
|
22
21
|
import './src/components/renderer/input.js';
|
|
23
22
|
import './src/components/renderer/select.js';
|
|
24
23
|
import './src/components/renderer/formItem.js';
|
|
@@ -457,7 +457,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
457
457
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
458
458
|
class: import("vue").Ref<string | undefined>;
|
|
459
459
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
460
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
460
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
461
461
|
readonly tab: PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
462
462
|
[key: string]: any;
|
|
463
463
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -5,10 +5,7 @@ import { useCommonInjection } from '../../hooks/useCommonInjection2.js';
|
|
|
5
5
|
import { InjectAsyncQueue } from '../../constants/index2.js';
|
|
6
6
|
import '@vueuse/core';
|
|
7
7
|
import '../../../index2.js';
|
|
8
|
-
import '
|
|
9
|
-
import '@vue/shared';
|
|
10
|
-
import 'date-fns';
|
|
11
|
-
import { assignUpdateValue, assignValueBindKey, traverseDependKey } from '../../utils/schema2.js';
|
|
8
|
+
import '../../utils/index.js';
|
|
12
9
|
import { useFormField } from '../../hooks/useFormField2.js';
|
|
13
10
|
import '../../../../../shared/utils/tapable/SyncHook.js';
|
|
14
11
|
import '../../../../../shared/utils/tapable/SyncBailHook.js';
|
|
@@ -20,6 +17,7 @@ import '../../../../../shared/utils/tapable/AsyncSeriesHook.js';
|
|
|
20
17
|
import '../../../../../shared/utils/tapable/AsyncSeriesBailHook.js';
|
|
21
18
|
import '../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js';
|
|
22
19
|
import '../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
|
|
20
|
+
import '@vue/shared';
|
|
23
21
|
import { connect, mapProps } from '@formily/vue';
|
|
24
22
|
import './input.js';
|
|
25
23
|
import './select.js';
|
|
@@ -40,6 +38,7 @@ import './complex.js';
|
|
|
40
38
|
import './simpleComponent.js';
|
|
41
39
|
import './search.js';
|
|
42
40
|
import { NCascader } from 'naive-ui';
|
|
41
|
+
import { assignUpdateValue, assignValueBindKey, traverseDependKey } from '../../utils/schema2.js';
|
|
43
42
|
|
|
44
43
|
const script = defineComponent({
|
|
45
44
|
name: "FormCascader",
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
|
2
|
-
import '
|
|
3
|
-
import '@vue/shared';
|
|
4
|
-
import 'lodash-es';
|
|
5
|
-
import 'date-fns';
|
|
6
|
-
import { assignUpdateValue, assignValueBindKey } from '../../utils/schema2.js';
|
|
2
|
+
import '../../utils/index.js';
|
|
7
3
|
import { connect, mapProps } from '@formily/vue';
|
|
8
4
|
import { NCheckboxGroup, NSpace, NCheckbox } from 'naive-ui';
|
|
5
|
+
import { assignUpdateValue, assignValueBindKey } from '../../utils/schema2.js';
|
|
9
6
|
|
|
10
7
|
const script = defineComponent({
|
|
11
8
|
name: "FormCheckbox",
|
|
@@ -4,12 +4,10 @@ import '../../../index2.js';
|
|
|
4
4
|
import { useField, RecursionField, connect } from '@formily/vue';
|
|
5
5
|
import { NButton, NIcon } from 'naive-ui';
|
|
6
6
|
import { InjectionBusinessCollector } from '../../constants/index2.js';
|
|
7
|
-
import '
|
|
8
|
-
import '@vue/shared';
|
|
9
|
-
import 'date-fns';
|
|
10
|
-
import { createObjSchema } from '../../utils/schema2.js';
|
|
7
|
+
import '../../utils/index.js';
|
|
11
8
|
import { AddCircleOutline, RemoveCircle } from '@vicons/ionicons5';
|
|
12
9
|
import { useFieldListAdaptor } from '../../hooks/useFieldListAdaptor2.js';
|
|
10
|
+
import { createObjSchema } from '../../utils/schema2.js';
|
|
13
11
|
|
|
14
12
|
const script = defineComponent({
|
|
15
13
|
name: "FormCombination",
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
|
2
2
|
import { connect, mapProps } from '@formily/vue';
|
|
3
|
-
import '
|
|
4
|
-
import '@vue/shared';
|
|
5
|
-
import 'lodash-es';
|
|
6
|
-
import 'date-fns';
|
|
3
|
+
import '../../utils/index.js';
|
|
7
4
|
import { assignUpdateValue } from '../../utils/schema2.js';
|
|
8
5
|
|
|
9
6
|
const script = defineComponent({
|
|
@@ -5,9 +5,7 @@ import { isObject } from '@vueuse/core';
|
|
|
5
5
|
import { format } from 'date-fns';
|
|
6
6
|
import { NDatePicker } from 'naive-ui';
|
|
7
7
|
import { useCommonInjection } from '../../hooks/useCommonInjection2.js';
|
|
8
|
-
import '
|
|
9
|
-
import '@vue/shared';
|
|
10
|
-
import 'lodash-es';
|
|
8
|
+
import '../../utils/index.js';
|
|
11
9
|
import { assignUpdateValue, assignValueBindKey } from '../../utils/schema2.js';
|
|
12
10
|
|
|
13
11
|
const script = defineComponent({
|
|
@@ -4,10 +4,7 @@ import { useField, connect, mapProps } from '@formily/vue';
|
|
|
4
4
|
import { NFormItem } from 'naive-ui';
|
|
5
5
|
import Annotation from '../../../../annotation-edit/index2.js';
|
|
6
6
|
import { InjectionAnnotation, InjectionFormUUID } from '../../constants/index2.js';
|
|
7
|
-
import '
|
|
8
|
-
import '@vue/shared';
|
|
9
|
-
import 'lodash-es';
|
|
10
|
-
import 'date-fns';
|
|
7
|
+
import '../../utils/index.js';
|
|
11
8
|
import { dotEscape } from '../../utils/schema2.js';
|
|
12
9
|
|
|
13
10
|
const script = defineComponent({
|
|
@@ -4,7 +4,7 @@ export declare const INPUT_GROUP: import("vue").DefineComponent<{
|
|
|
4
4
|
[x: symbol]: never;
|
|
5
5
|
}, {
|
|
6
6
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
7
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
7
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
8
|
[x: string]: never;
|
|
9
9
|
[x: number]: never;
|
|
10
10
|
[x: symbol]: never;
|
|
@@ -2,9 +2,7 @@ import { defineComponent, computed, createVNode } from 'vue';
|
|
|
2
2
|
import { connect, mapProps } from '@formily/vue';
|
|
3
3
|
import { isNumber } from 'lodash-es';
|
|
4
4
|
import { NRadioGroup, NSpace, NRadio } from 'naive-ui';
|
|
5
|
-
import '
|
|
6
|
-
import '@vue/shared';
|
|
7
|
-
import 'date-fns';
|
|
5
|
+
import '../../utils/index.js';
|
|
8
6
|
import { assignUpdateValue, assignValueBindKey } from '../../utils/schema2.js';
|
|
9
7
|
|
|
10
8
|
const script = defineComponent({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, inject, watch, createVNode } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { useDebounceFn } from '@vueuse/core';
|
|
3
|
+
import { isString, cloneDeep, isEqual } from 'lodash-es';
|
|
3
4
|
import { useCommonInjection } from '../../hooks/useCommonInjection2.js';
|
|
4
5
|
import { InjectAsyncQueue, InjectionChangeContextCollector } from '../../constants/index2.js';
|
|
5
|
-
import '@vueuse/core';
|
|
6
6
|
import '../../../index2.js';
|
|
7
|
-
import { formRenderLog } from '../../utils/index.js';
|
|
7
|
+
import { formRenderLog, optionMatcher } from '../../utils/index.js';
|
|
8
8
|
import { useFormRequest } from '../../hooks/useFormRequest2.js';
|
|
9
9
|
import { useFormField } from '../../hooks/useFormField2.js';
|
|
10
10
|
import '../../../../../shared/utils/tapable/SyncHook.js';
|
|
@@ -91,7 +91,7 @@ const script = defineComponent({
|
|
|
91
91
|
const {
|
|
92
92
|
getSearchRequestInfo
|
|
93
93
|
} = useFormRequest();
|
|
94
|
-
async function
|
|
94
|
+
const fetchData = useDebounceFn(async function(content) {
|
|
95
95
|
lastSearch.value = content || "";
|
|
96
96
|
if (remoteOptions.value)
|
|
97
97
|
return;
|
|
@@ -115,14 +115,9 @@ const script = defineComponent({
|
|
|
115
115
|
key: key2
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
}
|
|
118
|
+
}, 300);
|
|
119
119
|
const parsedOptions = computed(() => {
|
|
120
|
-
return remoteOptions.value ?
|
|
121
|
-
function filterOption(options, searchContent) {
|
|
122
|
-
return options.filter((option) => {
|
|
123
|
-
return !searchContent || String(option[labelKey.value]).includes(searchContent);
|
|
124
|
-
});
|
|
125
|
-
}
|
|
120
|
+
return remoteOptions.value ? optionMatcher(remoteOptions.value, lastSearch.value, labelKey.value) : [];
|
|
126
121
|
});
|
|
127
122
|
const changeContextCollector = inject(InjectionChangeContextCollector);
|
|
128
123
|
changeContextCollector.setContext(fieldKey.value, (v) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, inject, watch, createVNode } from 'vue';
|
|
2
2
|
import { isField } from '@formily/core';
|
|
3
|
-
import {
|
|
3
|
+
import { useDebounceFn } from '@vueuse/core';
|
|
4
|
+
import { isString, cloneDeep, isEqual } from 'lodash-es';
|
|
4
5
|
import { useCommonInjection } from '../../hooks/useCommonInjection2.js';
|
|
5
6
|
import { InjectAsyncQueue, InjectionChangeContextCollector, InjectionFormItemDepsCollector } from '../../constants/index2.js';
|
|
6
|
-
import '@vueuse/core';
|
|
7
7
|
import '../../../index2.js';
|
|
8
|
-
import { formRenderLog } from '../../utils/index.js';
|
|
8
|
+
import { formRenderLog, optionMatcher } from '../../utils/index.js';
|
|
9
9
|
import { useFormField } from '../../hooks/useFormField2.js';
|
|
10
10
|
import '../../../../../shared/utils/tapable/SyncHook.js';
|
|
11
11
|
import '../../../../../shared/utils/tapable/SyncBailHook.js';
|
|
@@ -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 { focusDecorator, assignUpdateValue
|
|
41
|
+
import { traverseDependKey, focusDecorator, assignUpdateValue } from '../../utils/schema2.js';
|
|
42
42
|
|
|
43
43
|
const script = defineComponent({
|
|
44
44
|
name: "FormSelect",
|
|
@@ -86,7 +86,7 @@ const script = defineComponent({
|
|
|
86
86
|
fieldKey
|
|
87
87
|
} = useFormField();
|
|
88
88
|
const asyncQueue = inject(InjectAsyncQueue);
|
|
89
|
-
async function
|
|
89
|
+
const fetchData = useDebounceFn(async function(content) {
|
|
90
90
|
lastSearch.value = content || "";
|
|
91
91
|
if (!configFor(props)) {
|
|
92
92
|
return remoteOptions.value = null;
|
|
@@ -122,18 +122,13 @@ const script = defineComponent({
|
|
|
122
122
|
function configFor(target) {
|
|
123
123
|
return target.urlConfig;
|
|
124
124
|
}
|
|
125
|
-
}
|
|
125
|
+
}, 300);
|
|
126
126
|
const parsedOptions = computed(() => {
|
|
127
127
|
if (remoteOptions.value)
|
|
128
|
-
return
|
|
128
|
+
return optionMatcher(remoteOptions.value, lastSearch.value, labelKey.value);
|
|
129
129
|
if (!Array.isArray(props.options))
|
|
130
130
|
return [];
|
|
131
|
-
return
|
|
132
|
-
function filterOption(options, searchContent) {
|
|
133
|
-
return options.filter((option) => {
|
|
134
|
-
return !searchContent || String(option[labelKey.value]).includes(searchContent);
|
|
135
|
-
});
|
|
136
|
-
}
|
|
131
|
+
return optionMatcher(props.options, lastSearch.value, labelKey.value);
|
|
137
132
|
});
|
|
138
133
|
const changeContextCollector = inject(InjectionChangeContextCollector);
|
|
139
134
|
changeContextCollector.setContext(fieldKey.value, (v) => {
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { defineComponent, computed, createVNode, createTextVNode } from 'vue';
|
|
2
2
|
import { NSwitch } from 'naive-ui';
|
|
3
|
-
import '
|
|
4
|
-
import '@vue/shared';
|
|
5
|
-
import 'lodash-es';
|
|
6
|
-
import 'date-fns';
|
|
7
|
-
import { assignUpdateValue, assignValueBindKey } from '../../utils/schema2.js';
|
|
3
|
+
import '../../utils/index.js';
|
|
8
4
|
import { connect, mapProps } from '@formily/vue';
|
|
5
|
+
import { assignUpdateValue, assignValueBindKey } from '../../utils/schema2.js';
|
|
9
6
|
|
|
10
7
|
const script = defineComponent({
|
|
11
8
|
name: "FormSwitch",
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { defineComponent, computed, createVNode } from 'vue';
|
|
2
2
|
import { useCommonInjection } from '../../hooks/useCommonInjection2.js';
|
|
3
|
-
import '
|
|
4
|
-
import '@vue/shared';
|
|
5
|
-
import 'lodash-es';
|
|
6
|
-
import 'date-fns';
|
|
7
|
-
import { assignUpdateValue } from '../../utils/schema2.js';
|
|
3
|
+
import '../../utils/index.js';
|
|
8
4
|
import { connect, mapProps } from '@formily/vue';
|
|
9
5
|
import { NInput } from 'naive-ui';
|
|
6
|
+
import { assignUpdateValue } from '../../utils/schema2.js';
|
|
10
7
|
|
|
11
8
|
const script = defineComponent({
|
|
12
9
|
name: "FormTextarea",
|
|
@@ -3,9 +3,7 @@ import { useDebounceFn } from '@vueuse/core';
|
|
|
3
3
|
import { isNumber } from 'lodash-es';
|
|
4
4
|
import { ref, computed, watch, nextTick } from 'vue';
|
|
5
5
|
import { FormItemLineBarDepKeyPrepend } from '../constants/index2.js';
|
|
6
|
-
import '
|
|
7
|
-
import '@vue/shared';
|
|
8
|
-
import 'date-fns';
|
|
6
|
+
import '../utils/index.js';
|
|
9
7
|
import { createLinebarId, traverseSchema } from '../utils/schema2.js';
|
|
10
8
|
|
|
11
9
|
function useAnchor(props, scrollbarRef, collector) {
|
|
@@ -2,9 +2,7 @@ import { isField } from '@formily/core';
|
|
|
2
2
|
import { isString } from '@vueuse/core';
|
|
3
3
|
import { isFunction, isNumber } from 'lodash-es';
|
|
4
4
|
import { FIELD_BUSINESS_TYPE } from '../constants/index2.js';
|
|
5
|
-
import '
|
|
6
|
-
import '@formily/path';
|
|
7
|
-
import '@vue/shared';
|
|
5
|
+
import '../utils/index.js';
|
|
8
6
|
import { isIdCard, parseIdCard, parseAge2FromContext, parseBirthday, parseAge2Birthday } from '../utils/business2.js';
|
|
9
7
|
|
|
10
8
|
class BusinessCollector {
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { isString } from 'lodash-es';
|
|
2
|
-
import '
|
|
3
|
-
import '@formily/path';
|
|
4
|
-
import '@vue/shared';
|
|
2
|
+
import '../utils/index.js';
|
|
5
3
|
import { isIdCard, isMobile } from '../utils/business2.js';
|
|
6
|
-
import '@formily/core';
|
|
7
4
|
|
|
8
5
|
function usePresetScope() {
|
|
9
6
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject, ArrayAble } from '../../../../../es/shared/types';
|
|
1
|
+
import { AnyObject, ArrayAble, Nullable } from '../../../../../es/shared/types';
|
|
2
2
|
import { FunctionalComponent, InjectionKey, VNode } from 'vue';
|
|
3
3
|
import { FieldItem } from '../types';
|
|
4
4
|
export * from './business';
|
|
@@ -15,3 +15,6 @@ export declare function createSlot(renderer: unknown, props: AnyObject): Record<
|
|
|
15
15
|
};
|
|
16
16
|
export declare function createInputSlot(props: AnyObject): import("vue").ComputedRef<Record<string, FunctionalComponent<{}, {}>>>;
|
|
17
17
|
export declare function presetRequestHandler(res: unknown): any;
|
|
18
|
+
export declare function optionMatcher(options: AnyObject[], input: Nullable<string>, key: string, matcherOption?: {
|
|
19
|
+
keyword?: string;
|
|
20
|
+
}): AnyObject[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { computed, createVNode, Fragment, inject, provide } from 'vue';
|
|
2
2
|
import { Path } from '@formily/path';
|
|
3
3
|
import { isObject } from '@vue/shared';
|
|
4
|
+
import { useMemoize } from '@vueuse/core';
|
|
4
5
|
import { isString, isFunction } from 'lodash-es';
|
|
5
6
|
import 'date-fns';
|
|
6
7
|
import '@formily/core';
|
|
@@ -111,5 +112,30 @@ function presetRequestHandler(res) {
|
|
|
111
112
|
return map.rows;
|
|
112
113
|
}
|
|
113
114
|
}
|
|
115
|
+
const keywordMatcher = useMemoize(function(text, keyword) {
|
|
116
|
+
if (!isString(keyword) || !isString(text))
|
|
117
|
+
return false;
|
|
118
|
+
return keyword.split(",").some((k) => k.trim().includes(text));
|
|
119
|
+
}, {
|
|
120
|
+
getKey(...args) {
|
|
121
|
+
return args.reduce((res, arg) => {
|
|
122
|
+
return String(res) + "_" + String(arg);
|
|
123
|
+
}, "");
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
function optionMatcher(options, input, key, matcherOption = {
|
|
127
|
+
keyword: "keyword"
|
|
128
|
+
}) {
|
|
129
|
+
if (!input)
|
|
130
|
+
return options;
|
|
131
|
+
return options.filter((option) => {
|
|
132
|
+
if (!isString(keyFor(option)))
|
|
133
|
+
return;
|
|
134
|
+
return keyFor(option).includes(input) || matcherOption.keyword && keywordMatcher(input, option[matcherOption.keyword]);
|
|
135
|
+
});
|
|
136
|
+
function keyFor(option) {
|
|
137
|
+
return option[key];
|
|
138
|
+
}
|
|
139
|
+
}
|
|
114
140
|
|
|
115
|
-
export { arrayed, createInputSlot, createSlot, formRenderLog, injectOrProvide, mergeDeepProperties, parseNumberFromMaybeString, presetRequestHandler, uuidGenerator };
|
|
141
|
+
export { arrayed, createInputSlot, createSlot, formRenderLog, injectOrProvide, mergeDeepProperties, optionMatcher, parseNumberFromMaybeString, presetRequestHandler, uuidGenerator };
|
|
@@ -124,7 +124,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
124
124
|
};
|
|
125
125
|
readonly labelStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
126
126
|
readonly contentStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
127
|
-
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
127
|
+
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
128
128
|
readonly label: StringConstructor;
|
|
129
129
|
readonly span: {
|
|
130
130
|
readonly type: NumberConstructor;
|
|
@@ -125,7 +125,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
125
125
|
};
|
|
126
126
|
readonly labelStyle: PropType<string | CSSProperties>;
|
|
127
127
|
readonly contentStyle: PropType<string | CSSProperties>;
|
|
128
|
-
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
128
|
+
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
129
129
|
readonly label: StringConstructor;
|
|
130
130
|
readonly span: {
|
|
131
131
|
readonly type: NumberConstructor;
|
|
@@ -952,7 +952,7 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
952
952
|
key: string;
|
|
953
953
|
render: () => import("vue").VNodeChild;
|
|
954
954
|
}[]>;
|
|
955
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
955
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
956
956
|
readonly label: StringConstructor;
|
|
957
957
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
958
958
|
readonly labelStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
@@ -951,7 +951,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
951
951
|
key: string;
|
|
952
952
|
render: () => import("vue").VNodeChild;
|
|
953
953
|
}[]>;
|
|
954
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
954
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
955
955
|
readonly label: StringConstructor;
|
|
956
956
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
957
957
|
readonly labelStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
@@ -804,7 +804,7 @@ export declare const componentMap: {
|
|
|
804
804
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
805
805
|
class: import("vue").Ref<string | undefined>;
|
|
806
806
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
807
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
807
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
808
808
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
809
809
|
[key: string]: any;
|
|
810
810
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -834,7 +834,7 @@ export declare const componentMap: {
|
|
|
834
834
|
NAnchorLink: import("vue").DefineComponent<{
|
|
835
835
|
readonly title: StringConstructor;
|
|
836
836
|
readonly href: StringConstructor;
|
|
837
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
837
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
838
838
|
readonly title: StringConstructor;
|
|
839
839
|
readonly href: StringConstructor;
|
|
840
840
|
}>>, {}>;
|
|
@@ -307,7 +307,7 @@ declare const SelectLabel: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
307
307
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
308
308
|
class: import("vue").Ref<string | undefined>;
|
|
309
309
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
310
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
310
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
311
311
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
312
312
|
[key: string]: any;
|
|
313
313
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -337,7 +337,7 @@ declare const SelectLabel: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
337
337
|
NAnchorLink: import("vue").DefineComponent<{
|
|
338
338
|
readonly title: StringConstructor;
|
|
339
339
|
readonly href: StringConstructor;
|
|
340
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
340
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
341
341
|
readonly title: StringConstructor;
|
|
342
342
|
readonly href: StringConstructor;
|
|
343
343
|
}>>, {}>;
|
|
@@ -754,7 +754,7 @@ declare const LabelFormContent: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
754
754
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
755
755
|
class: import("vue").Ref<string | undefined>;
|
|
756
756
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
757
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
757
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
758
758
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
759
759
|
[key: string]: any;
|
|
760
760
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -784,7 +784,7 @@ declare const LabelFormContent: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
784
784
|
NAnchorLink: import("vue").DefineComponent<{
|
|
785
785
|
readonly title: StringConstructor;
|
|
786
786
|
readonly href: StringConstructor;
|
|
787
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
787
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
788
788
|
readonly title: StringConstructor;
|
|
789
789
|
readonly href: StringConstructor;
|
|
790
790
|
}>>, {}>;
|
|
@@ -135,7 +135,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
135
135
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
136
136
|
class: import("vue").Ref<string | undefined>;
|
|
137
137
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
138
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
138
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
139
139
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
140
140
|
[key: string]: any;
|
|
141
141
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -165,7 +165,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
165
165
|
NAnchorLink: import("vue").DefineComponent<{
|
|
166
166
|
readonly title: StringConstructor;
|
|
167
167
|
readonly href: StringConstructor;
|
|
168
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
168
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
169
169
|
readonly title: StringConstructor;
|
|
170
170
|
readonly href: StringConstructor;
|
|
171
171
|
}>>, {}>;
|