@jt-home/mfe-components 8.0.0 → 10.0.0

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.
Files changed (32) hide show
  1. package/dist/package/globalInfo/index.cjs +1 -1
  2. package/dist/package/globalInfo/index.mjs +1 -1
  3. package/dist/package/index-C0I6Ft6Z.cjs +1 -0
  4. package/dist/package/{index-DImDpEoU.js → index-ENX8_eTS.js} +210 -188
  5. package/dist/package/index.cjs +2 -2
  6. package/dist/package/index.mjs +1826 -1412
  7. package/dist/package/style.css +1 -1
  8. package/dist/package/types/src/components/JtConfirmDialog/index.d.ts +1 -1
  9. package/dist/package/types/src/components/JtConfirmDialog/index.vue.d.ts +9 -1
  10. package/dist/package/types/src/components/JtConfirmDialog/types.d.ts +18 -1
  11. package/dist/package/types/src/components/JtDialog/index.vue.d.ts +9 -6
  12. package/dist/package/types/src/components/JtDialog/types.d.ts +6 -0
  13. package/dist/package/types/src/components/JtDrawer/index.vue.d.ts +6 -5
  14. package/dist/package/types/src/components/form/JtForm.vue.d.ts +24 -0
  15. package/dist/package/types/src/components/form/JtFormItem.vue.d.ts +114 -0
  16. package/dist/package/types/src/components/form/JtFormItems.vue.d.ts +33 -2
  17. package/dist/package/types/src/components/form/formChange.d.ts +5 -0
  18. package/dist/package/types/src/components/form/formControl.d.ts +5 -0
  19. package/dist/package/types/src/components/form/formOption.d.ts +18 -0
  20. package/dist/package/types/src/components/form/index.d.ts +6 -4
  21. package/dist/package/types/src/components/form/item/JtPersonSelect/index.d.ts +2 -0
  22. package/dist/package/types/src/components/form/item/JtPersonSelect/index.vue.d.ts +53 -0
  23. package/dist/package/types/src/components/form/item/JtPersonSelect/types.d.ts +21 -0
  24. package/dist/package/types/src/components/form/item/JtSearchSelect/index.vue.d.ts +4 -0
  25. package/dist/package/types/src/components/form/item/JtSearchSelect/types.d.ts +1 -0
  26. package/dist/package/types/src/components/form/item/index.d.ts +2 -0
  27. package/dist/package/types/src/components/form/types.d.ts +86 -5
  28. package/dist/package/types/src/components/index.d.ts +3 -2
  29. package/dist/package/types/src/components/table/JtCrudTable.vue.d.ts +2 -2
  30. package/dist/package/types/src/main.d.ts +2 -2
  31. package/package.json +1 -1
  32. package/dist/package/index-D9uUSmTc.cjs +0 -1
@@ -1,9 +1,7 @@
1
1
  import type { DrawerProps } from "element-plus";
2
- declare const drawerSizeMap: {
3
- readonly default: "838px";
4
- readonly large: "1242px";
5
- };
6
- type JtDrawerSize = keyof typeof drawerSizeMap;
2
+ type JtDrawerSize = "default" | "large";
3
+ /** JtButton 的 size 取值保持一致。 */
4
+ type JtDrawerButtonSize = "small" | "default" | "middle" | "large";
7
5
  type JtDrawerProps = Omit<Partial<DrawerProps>, "size"> & {
8
6
  /** Drawer width preset. */
9
7
  size?: JtDrawerSize;
@@ -15,6 +13,8 @@ type JtDrawerProps = Omit<Partial<DrawerProps>, "size"> & {
15
13
  confirmLoading?: boolean;
16
14
  /** Whether to render the default footer area. */
17
15
  showFooter?: boolean;
16
+ /** Size of the default footer buttons, passed through to JtButton. */
17
+ buttonSize?: JtDrawerButtonSize;
18
18
  };
19
19
  declare var __VLS_8: {}, __VLS_10: {}, __VLS_13: {};
20
20
  type __VLS_Slots = {} & {
@@ -39,6 +39,7 @@ declare const __VLS_base: import("vue").DefineComponent<JtDrawerProps, {}, {}, {
39
39
  confirmText: string;
40
40
  confirmLoading: boolean;
41
41
  direction: "ltr" | "rtl" | "ttb" | "btt";
42
+ buttonSize: JtDrawerButtonSize;
42
43
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
43
44
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
44
45
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,24 @@
1
+ import type { JTFormExpose, JTFormItemsForm, JTFormOption } from './types';
2
+ type __VLS_Props = {
3
+ /** 兼容原 ElForm 别名的 :model 和手写插槽用法。 */
4
+ model?: JTFormItemsForm;
5
+ /** 整表属性和字段配置;提供 default 插槽时由调用方自行渲染字段。 */
6
+ option?: JTFormOption;
7
+ };
8
+ declare var __VLS_9: {
9
+ formData: JTFormItemsForm | undefined;
10
+ }, __VLS_19: string, __VLS_20: any;
11
+ type __VLS_Slots = {} & {
12
+ [K in NonNullable<typeof __VLS_19>]?: (props: typeof __VLS_20) => any;
13
+ } & {
14
+ default?: (props: typeof __VLS_9) => any;
15
+ };
16
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, JTFormExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,114 @@
1
+ import type { PropType } from 'vue';
2
+ import type { FormItemInstance, FormItemProps } from 'element-plus';
3
+ import type { JTFormItemType, JTFormItemsForm } from './types';
4
+ import type { JTFormOptionProps } from './formOption';
5
+ declare function validate(...args: Parameters<FormItemInstance['validate']>): import("element-plus").FormValidationResult | undefined;
6
+ declare function resetField(): void;
7
+ declare function clearValidate(): void;
8
+ declare var __VLS_10: {
9
+ label: string;
10
+ }, __VLS_12: {}, __VLS_31: {
11
+ option: Partial<{
12
+ disabled: boolean;
13
+ created: boolean;
14
+ }> & Omit<{
15
+ readonly value: import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(StringConstructor | ObjectConstructor | BooleanConstructor | NumberConstructor)[], unknown, unknown>;
16
+ readonly disabled: boolean;
17
+ readonly created: boolean;
18
+ readonly label?: import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown> | undefined;
19
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
20
+ value: {
21
+ readonly type: PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>>;
22
+ readonly required: true;
23
+ readonly validator: ((val: unknown) => boolean) | undefined;
24
+ __epPropKey: true;
25
+ };
26
+ label: {
27
+ readonly type: PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
28
+ readonly required: false;
29
+ readonly validator: ((val: unknown) => boolean) | undefined;
30
+ __epPropKey: true;
31
+ };
32
+ created: BooleanConstructor;
33
+ disabled: BooleanConstructor;
34
+ }>> & Readonly<{}>, "disabled" | "created"> & Record<string, unknown>;
35
+ }, __VLS_34: any, __VLS_37: any;
36
+ type __VLS_Slots = {} & {
37
+ label?: (props: typeof __VLS_10) => any;
38
+ } & {
39
+ default?: (props: typeof __VLS_12) => any;
40
+ } & {
41
+ option?: (props: typeof __VLS_31) => any;
42
+ } & {
43
+ option?: (props: typeof __VLS_34) => any;
44
+ } & {
45
+ header?: (props: typeof __VLS_37) => any;
46
+ };
47
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
48
+ formData: PropType<JTFormItemsForm>;
49
+ prop: {
50
+ type: StringConstructor;
51
+ required: true;
52
+ };
53
+ label: {
54
+ type: StringConstructor;
55
+ required: true;
56
+ };
57
+ itemType: PropType<JTFormItemType>;
58
+ /** 统一字典入口;props 映射字段,默认使用 label/value。 */
59
+ dicData: PropType<object[]>;
60
+ props: PropType<JTFormOptionProps | Record<string, unknown>>;
61
+ options: PropType<object[]>;
62
+ /** 控件原生属性,保留顶层透传并允许显式覆盖。 */
63
+ componentProps: PropType<Record<string, unknown>>;
64
+ optionProps: PropType<JTFormOptionProps>;
65
+ rules: PropType<FormItemProps["rules"]>;
66
+ formItemProps: PropType<Record<string, unknown>>;
67
+ span: NumberConstructor;
68
+ show: {
69
+ type: BooleanConstructor;
70
+ default: boolean;
71
+ };
72
+ showSlot: BooleanConstructor;
73
+ }>, {
74
+ validate: typeof validate;
75
+ resetField: typeof resetField;
76
+ clearValidate: typeof clearValidate;
77
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
78
+ formData: PropType<JTFormItemsForm>;
79
+ prop: {
80
+ type: StringConstructor;
81
+ required: true;
82
+ };
83
+ label: {
84
+ type: StringConstructor;
85
+ required: true;
86
+ };
87
+ itemType: PropType<JTFormItemType>;
88
+ /** 统一字典入口;props 映射字段,默认使用 label/value。 */
89
+ dicData: PropType<object[]>;
90
+ props: PropType<JTFormOptionProps | Record<string, unknown>>;
91
+ options: PropType<object[]>;
92
+ /** 控件原生属性,保留顶层透传并允许显式覆盖。 */
93
+ componentProps: PropType<Record<string, unknown>>;
94
+ optionProps: PropType<JTFormOptionProps>;
95
+ rules: PropType<FormItemProps["rules"]>;
96
+ formItemProps: PropType<Record<string, unknown>>;
97
+ span: NumberConstructor;
98
+ show: {
99
+ type: BooleanConstructor;
100
+ default: boolean;
101
+ };
102
+ showSlot: BooleanConstructor;
103
+ }>> & Readonly<{}>, {
104
+ show: boolean;
105
+ showSlot: boolean;
106
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
107
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
108
+ declare const _default: typeof __VLS_export;
109
+ export default _default;
110
+ type __VLS_WithSlots<T, S> = T & {
111
+ new (): {
112
+ $slots: S;
113
+ };
114
+ };
@@ -1,11 +1,42 @@
1
1
  import type { JTFormItemsExpose, JTFormItemsProps } from './types';
2
- declare var __VLS_9: `${string}-label`, __VLS_10: any, __VLS_13: string, __VLS_14: {}, __VLS_31: {};
2
+ declare var __VLS_9: `${string}-label`, __VLS_10: any, __VLS_13: string, __VLS_14: {}, __VLS_34: string, __VLS_35: {
3
+ option: Partial<{
4
+ disabled: boolean;
5
+ created: boolean;
6
+ }> & Omit<{
7
+ readonly value: import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(StringConstructor | ObjectConstructor | BooleanConstructor | NumberConstructor)[], unknown, unknown>;
8
+ readonly disabled: boolean;
9
+ readonly created: boolean;
10
+ readonly label?: import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown> | undefined;
11
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
12
+ value: {
13
+ readonly type: import("vue").PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>>;
14
+ readonly required: true;
15
+ readonly validator: ((val: unknown) => boolean) | undefined;
16
+ __epPropKey: true;
17
+ };
18
+ label: {
19
+ readonly type: import("vue").PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
20
+ readonly required: false;
21
+ readonly validator: ((val: unknown) => boolean) | undefined;
22
+ __epPropKey: true;
23
+ };
24
+ created: BooleanConstructor;
25
+ disabled: BooleanConstructor;
26
+ }>> & Readonly<{}>, "disabled" | "created"> & Record<string, unknown>;
27
+ }, __VLS_39: string, __VLS_40: any, __VLS_44: string, __VLS_45: any, __VLS_53: {};
3
28
  type __VLS_Slots = {} & {
4
29
  [K in NonNullable<typeof __VLS_9>]?: (props: typeof __VLS_10) => any;
5
30
  } & {
6
31
  [K in NonNullable<typeof __VLS_13>]?: (props: typeof __VLS_14) => any;
7
32
  } & {
8
- actions?: (props: typeof __VLS_31) => any;
33
+ [K in NonNullable<typeof __VLS_34>]?: (props: typeof __VLS_35) => any;
34
+ } & {
35
+ [K in NonNullable<typeof __VLS_39>]?: (props: typeof __VLS_40) => any;
36
+ } & {
37
+ [K in NonNullable<typeof __VLS_44>]?: (props: typeof __VLS_45) => any;
38
+ } & {
39
+ actions?: (props: typeof __VLS_53) => any;
9
40
  };
10
41
  declare const __VLS_base: import("vue").DefineComponent<JTFormItemsProps, JTFormItemsExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<JTFormItemsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
42
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,3 +1,8 @@
1
1
  import type { JTFormItemConfig, JTFormItemsForm } from './types';
2
2
  /** 只比较 JtFormItems configs 声明的字段,避免业务对象上的附加数据误报变化。 */
3
3
  export declare function hasJtFormItemsChanged(configs: readonly JTFormItemConfig[], formData: JTFormItemsForm, originalFormData: JTFormItemsForm): boolean;
4
+ /**
5
+ * 表单组件内部复用的值比较,不作为 npm 包级公共出口。
6
+ * JtForm 比较完整 model;JtFormItems 仍由上方方法限定为 configs 声明的字段。
7
+ */
8
+ export declare function isFormValueEqual(current: unknown, original: unknown): boolean;
@@ -0,0 +1,5 @@
1
+ import type { Component } from 'vue';
2
+ import type { JTFormItemType } from './types';
3
+ export declare function resolveJtFormControl(itemType?: JTFormItemType): Component;
4
+ export declare function getJtFormControlProps(config: Record<string, unknown>, formDisabled?: boolean): import("@/utils/componentAttrs").ComponentAttrRecord;
5
+ export declare function getJtFormControlEvents(config: Record<string, unknown>): import("@/utils/componentAttrs").ComponentEventRecord;
@@ -0,0 +1,18 @@
1
+ import type { JTFormColumn, JTFormItemConfig } from './types';
2
+ /** 原始接口选项字段到控件标准字段的映射。 */
3
+ export interface JTFormOptionProps {
4
+ label?: string;
5
+ value?: string;
6
+ disabled?: string;
7
+ children?: string;
8
+ }
9
+ /**
10
+ * 将接口原始选项复制为控件标准选项,保留原始字段供 option slot 或业务读取。
11
+ * 未配置映射时直接使用原选项,不改变原有 label/value 写法。
12
+ */
13
+ export declare function normalizeJtFormOptions(options: Record<string, unknown>[] | undefined, optionProps?: JTFormOptionProps): Record<string, unknown>[];
14
+ /**
15
+ * 把整表配置转换为已有渲染器的 itemType/options,不修改调用方数据。
16
+ * options 使用 optionProps 映射;兼容 dicData + props,保持原有选项优先级。
17
+ */
18
+ export declare function resolveJtFormColumns(columns?: JTFormColumn[]): JTFormItemConfig[];
@@ -1,5 +1,7 @@
1
1
  export { default as JtFormItems } from './JtFormItems.vue';
2
- export { JtCascader, JtDatePicker, JtHeaderSearchSelect, JtInput, JtSearchSelect, JtSelect, } from './item/index';
3
- export type { JTCascaderFormItemConfig, JTCompatibleFormItemType, JTElementFormItemType, JTFormItemCascaderOption, JTFormItemConfig, JTFormItemEventHandler, JTFormItemType, JTFormItemsExpose, JTFormItemsForm, JTFormItemsProps, } from './types';
4
- export type { JtOptionItem } from './item/index';
5
- export type { JtHeaderSearchSelectProps, JtHeaderSearchSelectRemoteMethod, JtHeaderSearchSelectSearchMethod, JtHeaderSearchSelectSearchPayload, JtSearchSelectHighlightSegment, JtSearchSelectOption, JtSearchSelectOptionValue, JtSearchSelectProps, } from './item/index';
2
+ export { default as JtFormItem } from './JtFormItem.vue';
3
+ export { default as JtForm } from './JtForm.vue';
4
+ export { JtCascader, JtDatePicker, JtHeaderSearchSelect, JtInput, JtPersonSelect, JtSearchSelect, JtSelect, } from './item/index';
5
+ export type { JTCascaderFormItemConfig, JTCompatibleFormItemType, JTElementFormItemType, JTFormProps, JTFormExpose, JTFormItemCascaderOption, JTFormItemConfig, JTFormItemEventHandler, JTFormItemExpose, JTFormItemProps, JTFormItemType, JTFormItemsExpose, JTFormItemsForm, JTFormItemsProps, } from './types';
6
+ export type { JTFormOptionProps } from './formOption';
7
+ export type { JtPersonOption, JtPersonOptionValue, JtPersonRequestMethod, JtPersonSelectProps, JtPersonSelectValue, JtPersonSelection, JtOptionItem, JtHeaderSearchSelectProps, JtHeaderSearchSelectRemoteMethod, JtHeaderSearchSelectSearchMethod, JtHeaderSearchSelectSearchPayload, JtSearchSelectHighlightSegment, JtSearchSelectOption, JtSearchSelectOptionValue, JtSearchSelectProps, } from './item/index';
@@ -0,0 +1,2 @@
1
+ export { default as JtPersonSelect } from './index.vue';
2
+ export type { JtPersonOption, JtPersonOptionValue, JtPersonRequestMethod, JtPersonSelectOwnProps, JtPersonSelectProps, JtPersonSelectValue, JtPersonSelection, } from './types';
@@ -0,0 +1,53 @@
1
+ import type { JtPersonOption, JtPersonRequestMethod, JtPersonRequestParams, JtPersonSelectValue, JtPersonSelection } from "./types";
2
+ type __VLS_Props = {
3
+ modelValue?: JtPersonSelectValue;
4
+ /** 是否允许同时选择多个人员。 */
5
+ multiple?: boolean;
6
+ /** 人员查询接口,由业务页面传入。 */
7
+ requestMethod: JtPersonRequestMethod;
8
+ /** 除 searchText 外一起透传给 requestMethod 的固定参数,例如组织/部门/状态等过滤条件。 */
9
+ requestParams?: JtPersonRequestParams;
10
+ /** 响应中人员数组的解析路径,按顺序查找第一个为数组的值;支持 `data`、`data.list`、`result.list`、`result` 等以 `.` 分段的多级路径。 */
11
+ responsePaths?: string[];
12
+ /** 接口返回项的展示字段。 */
13
+ labelKey?: string;
14
+ /** 自定义下拉项展示文本。 */
15
+ labelFormatter?: (person: JtPersonOption) => string;
16
+ /** 接口返回项的值字段。 */
17
+ valueKey?: string;
18
+ /** 输入停止后的请求等待时间,设为 0 可立即请求。 */
19
+ debounce?: number;
20
+ };
21
+ declare var __VLS_13: {
22
+ person: JtPersonOption | undefined;
23
+ };
24
+ type __VLS_Slots = {} & {
25
+ option?: (props: typeof __VLS_13) => any;
26
+ };
27
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
28
+ clearOptions: () => void;
29
+ refresh: (query: string) => void;
30
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ "update:modelValue": (value: JtPersonSelectValue) => any;
32
+ personChange: (person: JtPersonSelection) => any;
33
+ loadError: (error: unknown) => any;
34
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
35
+ "onUpdate:modelValue"?: ((value: JtPersonSelectValue) => any) | undefined;
36
+ onPersonChange?: ((person: JtPersonSelection) => any) | undefined;
37
+ onLoadError?: ((error: unknown) => any) | undefined;
38
+ }>, {
39
+ debounce: number;
40
+ multiple: boolean;
41
+ valueKey: string;
42
+ requestParams: JtPersonRequestParams;
43
+ responsePaths: string[];
44
+ labelKey: string;
45
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
47
+ declare const _default: typeof __VLS_export;
48
+ export default _default;
49
+ type __VLS_WithSlots<T, S> = T & {
50
+ new (): {
51
+ $slots: S;
52
+ };
53
+ };
@@ -0,0 +1,21 @@
1
+ import type { SelectProps } from 'element-plus';
2
+ export type JtPersonOption = Record<string, any>;
3
+ export type JtPersonOptionValue = string | number;
4
+ export type JtPersonRequestParams = Record<string, any>;
5
+ export type JtPersonRequestMethod = (args: {
6
+ searchText: string;
7
+ } & JtPersonRequestParams) => Promise<unknown>;
8
+ export type JtPersonSelectValue = JtPersonOptionValue | JtPersonOptionValue[] | null | undefined;
9
+ export type JtPersonSelection = JtPersonOption | JtPersonOption[] | undefined;
10
+ export interface JtPersonSelectOwnProps {
11
+ modelValue?: JtPersonSelectValue;
12
+ multiple?: boolean;
13
+ requestMethod: JtPersonRequestMethod;
14
+ requestParams?: JtPersonRequestParams;
15
+ responsePaths?: string[];
16
+ labelKey?: string;
17
+ labelFormatter?: (person: JtPersonOption) => string;
18
+ valueKey?: string;
19
+ debounce?: number;
20
+ }
21
+ export type JtPersonSelectProps = Omit<Partial<SelectProps>, 'modelValue' | 'remoteMethod' | 'filterMethod'> & JtPersonSelectOwnProps;
@@ -3,6 +3,8 @@ declare function setSecondaryKeyword(keyword: string | number): void;
3
3
  declare function clearSecondaryKeyword(): void;
4
4
  declare var __VLS_9: {
5
5
  keyword: string;
6
+ placeholder: string;
7
+ loading: boolean;
6
8
  setKeyword: typeof setSecondaryKeyword;
7
9
  clearKeyword: typeof clearSecondaryKeyword;
8
10
  };
@@ -23,6 +25,7 @@ declare const __VLS_base: import("vue").DefineComponent<JtSearchSelectProps, {},
23
25
  scrollLeft: number;
24
26
  }) => void;
25
27
  "end-reached": (direction: import("element-plus").ScrollbarDirection) => void;
28
+ "secondary-search": (query: string) => void;
26
29
  }, string, import("vue").PublicProps, Readonly<JtSearchSelectProps> & Readonly<{
27
30
  onClear?: (() => any) | undefined;
28
31
  onSearch?: ((query: string) => any) | undefined;
@@ -37,6 +40,7 @@ declare const __VLS_base: import("vue").DefineComponent<JtSearchSelectProps, {},
37
40
  scrollLeft: number;
38
41
  }) => any) | undefined;
39
42
  "onEnd-reached"?: ((direction: import("element-plus").ScrollbarDirection) => any) | undefined;
43
+ "onSecondary-search"?: ((query: string) => any) | undefined;
40
44
  }>, {
41
45
  options: import("./types").JtSearchSelectOption[];
42
46
  clearable: boolean;
@@ -9,6 +9,7 @@ export interface JtSearchSelectOption {
9
9
  }
10
10
  export interface JtSearchSelectProps extends Omit<Partial<SelectProps>, 'filterMethod'> {
11
11
  options?: JtSearchSelectOption[];
12
+ secondaryOptions?: JtSearchSelectOption[];
12
13
  secondaryPlaceholder?: string;
13
14
  }
14
15
  export interface JtSearchSelectHighlightSegment {
@@ -2,8 +2,10 @@ export { JtCascader } from './JtCascader/index';
2
2
  export { JtDatePicker } from './JtDatePicker/index';
3
3
  export { JtHeaderSearchSelect } from './JtHeaderSearchSelect/index';
4
4
  export { JtInput } from './JtInput/index';
5
+ export { JtPersonSelect } from './JtPersonSelect/index';
5
6
  export { JtSearchSelect } from './JtSearchSelect/index';
6
7
  export { JtSelect } from './JtSelect/index';
7
8
  export type { JtOptionItem } from './JtSelect/index';
9
+ export type { JtPersonOption, JtPersonOptionValue, JtPersonRequestMethod, JtPersonSelectProps, JtPersonSelectValue, JtPersonSelection, } from './JtPersonSelect/index';
8
10
  export type { JtHeaderSearchSelectProps, JtHeaderSearchSelectRemoteMethod, JtHeaderSearchSelectSearchMethod, JtHeaderSearchSelectSearchPayload, } from './JtHeaderSearchSelect/index';
9
11
  export type { JtSearchSelectHighlightSegment, JtSearchSelectOption, JtSearchSelectOptionValue, JtSearchSelectProps, } from './JtSearchSelect/index';
@@ -1,13 +1,17 @@
1
1
  import type { Component } from 'vue';
2
- import type { DatePickerProps, CascaderComponentProps, CascaderOption, FormItemProps, InputProps, SelectOptionProps, SelectProps } from 'element-plus';
2
+ import type { DatePickerProps, CascaderComponentProps, CascaderOption, FormItemInstance, FormInstance, FormProps, FormItemProps, InputProps, InputNumberProps, SwitchProps, ElOption, SelectProps } from 'element-plus';
3
+ import type { JTFormOptionProps } from './formOption.js';
4
+ import type { JtSearchSelectProps } from './item/JtSearchSelect/types';
5
+ import type { JtHeaderSearchSelectProps } from './item/JtHeaderSearchSelect/types';
6
+ import type { JtChoiceCardGroupProps } from '../JtChoiceCardGroup/types';
3
7
  /** 对应 Element Plus 控件能力的标准表单项类型 */
4
- export type JTElementFormItemType = 'input' | 'select' | 'cascader' | 'date-picker';
8
+ export type JTElementFormItemType = 'input' | 'select' | 'cascader' | 'date-picker' | 'input-number' | 'switch';
5
9
  /** 业务历史兼容类型,不直接对应 Element Plus 组件名 */
6
10
  export type JTCompatibleFormItemType = 'remote-select' | 'date' | 'daterange' | 'date-range' | 'dateRange';
7
11
  /** 表单项类型,支持预置字符串、兼容别名或自定义组件 */
8
- export type JTFormItemType = JTElementFormItemType | JTCompatibleFormItemType | Component;
12
+ export type JTFormItemType = JTElementFormItemType | JTCompatibleFormItemType | 'search-select' | 'header-search-select' | 'choice-card-group' | Component;
9
13
  /** 下拉选项 */
10
- export type JTFormItemOption = Partial<SelectOptionProps>;
14
+ export type JTFormItemOption = Partial<Pick<InstanceType<typeof ElOption>['$props'], 'label' | 'value' | 'disabled'>> & Record<string, unknown>;
11
15
  export type JTFormItemCascaderOption = CascaderOption;
12
16
  /** 事件处理函数 */
13
17
  export type JTFormItemEventHandler = (...args: any[]) => void;
@@ -31,6 +35,8 @@ interface JTFormItemBaseConfig {
31
35
  rules?: FormItemProps['rules'];
32
36
  /** 传递给 ElFormItem 的额外属性 */
33
37
  formItemProps?: Record<string, any>;
38
+ /** 底层控件属性与事件,同名配置优先于顶层;modelValue 由表单管理。 */
39
+ componentProps?: Record<string, unknown>;
34
40
  /** 是否使用插槽渲染,插槽名为 prop 值 */
35
41
  showSlot?: boolean;
36
42
  /** 其他属性会透传给子组件 */
@@ -59,7 +65,34 @@ export type JTCustomFormItemConfig = JTFormItemBaseConfig & {
59
65
  itemType: Component;
60
66
  };
61
67
  /** 表单项配置 */
62
- export type JTFormItemConfig = JTInputFormItemConfig | JTSelectFormItemConfig | JTCascaderFormItemConfig | JTDatePickerFormItemConfig | JTCustomFormItemConfig;
68
+ export type JTFormItemConfig = JTInputFormItemConfig | JTSelectFormItemConfig | JTCascaderFormItemConfig | JTDatePickerFormItemConfig | (JTFormItemBaseConfig & JtSearchSelectProps & {
69
+ itemType: 'search-select';
70
+ }) | (JTFormItemBaseConfig & JtHeaderSearchSelectProps & {
71
+ itemType: 'header-search-select';
72
+ }) | (JTFormItemBaseConfig & JtChoiceCardGroupProps & {
73
+ itemType: 'choice-card-group';
74
+ }) | (JTFormItemBaseConfig & Partial<InputNumberProps> & {
75
+ itemType: 'input-number';
76
+ }) | (JTFormItemBaseConfig & Partial<SwitchProps> & {
77
+ itemType: 'switch';
78
+ }) | JTCustomFormItemConfig;
79
+ /** 为新增的单项组件放宽接口选项类型,不改变 JtFormItems 的既有配置契约。 */
80
+ type JTFormItemDirectConfig<T> = T extends JTFormItemConfig ? Omit<T, 'options' | 'props'> & {
81
+ /** 单项字典入口;不扩展 JtFormItems.configs 的契约。 */
82
+ dicData?: object[];
83
+ /** 传 dicData 时映射字段;否则兼容单项控件原生 props。 */
84
+ props?: JTFormOptionProps | Record<string, unknown>;
85
+ /** 可直接传入接口返回的下拉或级联选项。 */
86
+ options?: object[];
87
+ /** 接口选项字段到 label、value 等标准字段的映射。 */
88
+ optionProps?: JTFormOptionProps;
89
+ } : never;
90
+ /** JtFormItem 直接接收一项配置;formData 用于响应式读取并写回对应字段。 */
91
+ export type JTFormItemProps = JTFormItemDirectConfig<JTFormItemConfig> & {
92
+ formData?: JTFormItemsForm;
93
+ };
94
+ /** JtFormItem 通过组件 ref 暴露的字段校验方法。 */
95
+ export type JTFormItemExpose = Pick<FormItemInstance, 'validate' | 'resetField' | 'clearValidate'>;
63
96
  /** JtFormItems 组件 Props */
64
97
  export interface JTFormItemsProps {
65
98
  /** 表单项配置列表 */
@@ -76,4 +109,52 @@ export interface JTFormItemsExpose {
76
109
  /** 比较 configs 声明的字段与调用方保存的原始数据。 */
77
110
  hasChanges(originalFormData: JTFormItemsForm): boolean;
78
111
  }
112
+ /** 配置式整表字段:type 选择控件,dicData + props 提供选项及字段映射。 */
113
+ export interface JTFormColumn {
114
+ /** model 的直接对象键;配置式渲染不解析 a.b 形式的嵌套路径。 */
115
+ prop: string;
116
+ /** 字段标签,沿用 JtFormItems 的标签渲染和插槽约定。 */
117
+ label: string;
118
+ /** 控件类型或自定义组件;未传时按 input 渲染。 */
119
+ type?: JTFormItemType;
120
+ /** 下拉或级联的选项数组,由调用方加载;默认读取 label/value。 */
121
+ options?: object[];
122
+ /** 对实际生效的 options 映射 label/value/disabled/children,保留原始业务字段。 */
123
+ optionProps?: JTFormOptionProps;
124
+ /** 兼容字典数组入口;显式传入时优先于 options,配合 props 映射。 */
125
+ dicData?: object[];
126
+ /** 仅用于 dicData 的字段映射;级联控件行为放在 componentProps.props。 */
127
+ props?: JTFormOptionProps;
128
+ /** 控件原生属性入口,例如 type: textarea 或 props: { multiple: true }。 */
129
+ componentProps?: Record<string, unknown>;
130
+ /** 字段校验规则,交由已有 ElFormItem 校验上下文执行。 */
131
+ rules?: FormItemProps['rules'];
132
+ /** ElFormItem 透传配置,同名值优先于字段上的 rules 等快捷配置。 */
133
+ formItemProps?: Record<string, unknown>;
134
+ /** false 时卸载字段并退出校验上下文,保留 model 中的值。 */
135
+ show?: boolean;
136
+ /** true 时使用以 prop 命名的字段插槽,值读写由插槽内容负责。 */
137
+ showSlot?: boolean;
138
+ /** 沿用 JtFormItems 的列数单位,不是 Avue 的 24 栅格跨度。 */
139
+ span?: number;
140
+ /** 控件属性与 onXxx 监听透传给对应控件。 */
141
+ [key: string]: unknown;
142
+ }
143
+ /** 整表配置;布局沿用 JtFormItems,其他字段为 Element Plus 表单属性。 */
144
+ export type JTFormOption = Partial<Omit<FormProps, 'model'>> & {
145
+ /** 字段列表,转换为 JtFormItems.configs;不传时没有自动生成的字段。 */
146
+ column?: JTFormColumn[];
147
+ /** 布局列数,沿用 JtFormItems 的默认 4 列及 1-24 范围。 */
148
+ gridColumns?: number;
149
+ };
150
+ /** 沿用原生 model;显式表单属性优先于 option 内的同名属性。 */
151
+ export type JTFormProps = Partial<FormProps> & {
152
+ /** 配置式整表入口;model 仍通过原生 :model 单独传入。 */
153
+ option?: JTFormOption;
154
+ };
155
+ /** 整表变化检测与原生表单公开方法,不承诺组件实例与 ElForm 对象恒等。 */
156
+ export type JTFormExpose = Pick<FormInstance, 'validate' | 'validateField' | 'resetFields' | 'clearValidate' | 'scrollToField' | 'getField' | 'fields' | 'setInitialValues'> & {
157
+ /** 比较完整 model 与独立保存的原始数据;未传 model 按空对象比较,原始数据不能与 model 共用引用。 */
158
+ hasChanges(originalFormData: JTFormItemsForm): boolean;
159
+ };
79
160
  export {};
@@ -15,13 +15,14 @@ export { JtFileIcon, resolveJtFileType } from "./JtFileIcon/index";
15
15
  export { JtHighlightText } from "./JtHighlightText/index";
16
16
  export { JtOverflowTooltipText } from "./JtOverflowTooltipText/index";
17
17
  export { openJtConfirmDialog } from "./JtConfirmDialog/index";
18
+ export type { JtConfirmDialogFooter, JtConfirmDialogFooterSlotProps, } from "./JtConfirmDialog/index";
18
19
  export { JtStatusStamp } from "./JtStatusStamp/index";
19
20
  export { JtTab, JtTabItem } from "./JtTab/index";
20
21
  export { JtTree } from "./JtTree/index";
21
22
  export { JtTreeTableLayout } from "./JtTreeTableLayout/index";
22
- export { JtCascader, JtDatePicker, JtFormItems, JtHeaderSearchSelect, JtInput, JtSearchSelect, JtSelect, } from "./form/index";
23
+ export { JtCascader, JtDatePicker, JtForm, JtFormItem, JtFormItems, JtHeaderSearchSelect, JtInput, JtPersonSelect, JtSearchSelect, JtSelect, } from "./form/index";
23
24
  export { JtPageHeader } from "./JtPageHeader/index";
24
- export type { JTCascaderFormItemConfig, JTCompatibleFormItemType, JTElementFormItemType, JTFormItemCascaderOption, JTFormItemConfig, JTFormItemEventHandler, JTFormItemType, JTFormItemsExpose, JTFormItemsForm, JTFormItemsProps, JtHeaderSearchSelectProps, JtHeaderSearchSelectRemoteMethod, JtHeaderSearchSelectSearchMethod, JtHeaderSearchSelectSearchPayload, JtOptionItem, JtSearchSelectHighlightSegment, JtSearchSelectOption, JtSearchSelectOptionValue, JtSearchSelectProps, } from "./form/index";
25
+ export type { JTCascaderFormItemConfig, JTCompatibleFormItemType, JTElementFormItemType, JTFormExpose, JTFormItemExpose, JTFormItemCascaderOption, JTFormItemConfig, JTFormItemEventHandler, JTFormItemProps, JTFormOptionProps, JTFormItemType, JTFormProps, JTFormItemsExpose, JTFormItemsForm, JTFormItemsProps, JtHeaderSearchSelectProps, JtHeaderSearchSelectRemoteMethod, JtHeaderSearchSelectSearchMethod, JtHeaderSearchSelectSearchPayload, JtOptionItem, JtPersonOption, JtPersonOptionValue, JtPersonRequestMethod, JtPersonSelectProps, JtPersonSelectValue, JtPersonSelection, JtSearchSelectHighlightSegment, JtSearchSelectOption, JtSearchSelectOptionValue, JtSearchSelectProps, } from "./form/index";
25
26
  export type { JtPageHeaderOperate, JtPageHeaderProps, JtPageHeaderSize, } from "./JtPageHeader/index";
26
27
  export type { JtActionMenuItem, JtActionMenuItemKey, JtActionMenuProps, } from "./JtActionMenu/index";
27
28
  export type { JtAttachmentFile, JtAttachmentListProps, } from "./JtAttachmentList/index";
@@ -125,7 +125,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
125
125
  onReset?: (() => any) | undefined;
126
126
  onSearch?: (() => any) | undefined;
127
127
  "onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
128
- }>, "option" | "searchDisabled" | "searchLoading" | "searchDone" | "formRef"> & import("vue").ShallowUnwrapRef<{
128
+ }>, "option" | "formRef" | "searchDisabled" | "searchLoading" | "searchDone"> & import("vue").ShallowUnwrapRef<{
129
129
  formRef: import("vue").Ref<import("element-plus").FormInstance | undefined, import("element-plus").FormInstance | undefined>;
130
130
  searchDisabled: import("vue").Ref<boolean, boolean>;
131
131
  searchLoading: () => void;
@@ -231,7 +231,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
231
231
  onReset?: (() => any) | undefined;
232
232
  onSearch?: (() => any) | undefined;
233
233
  "onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
234
- }>, "option" | "searchDisabled" | "searchLoading" | "searchDone" | "formRef"> & import("vue").ShallowUnwrapRef<{
234
+ }>, "option" | "formRef" | "searchDisabled" | "searchLoading" | "searchDone"> & import("vue").ShallowUnwrapRef<{
235
235
  formRef: import("vue").Ref<import("element-plus").FormInstance | undefined, import("element-plus").FormInstance | undefined>;
236
236
  searchDisabled: import("vue").Ref<boolean, boolean>;
237
237
  searchLoading: () => void;
@@ -1,5 +1,5 @@
1
1
  import "./assets/styles/base.css";
2
2
  export { getLocale as getJtLocale, install, installLocale, normalizeLocale, resetLocale as resetJtLocale, setLocale as setJtLocale, } from "../locales";
3
3
  export type { LocaleCode, LocaleOptions, LocaleSource } from "../locales";
4
- export { JtActionMenu, JtAttachmentList, JtButton, JtCard, JtCascader, JtChoiceCardGroup, JtCrudTable, JtDatePicker, JtDescriptions, JtDepartmentTree, JtCollapsibleLayout, JtDialog, JtDrawer, JtEmptyState, JtFileIcon, JtFilterBar, JtFormItems, JtHeaderSearchSelect, JtHighlightText, JtInput, JtSearchSelect, JtOverflowTooltipText, JtPageHeader, JtPagination, JtSelect, JtStatusStamp, JtTab, JtTabItem, JtTable, JtTree, JtTreeTableLayout, openJtConfirmDialog, resolveJtFileType, } from "./components/index";
5
- export type { JTCascaderFormItemConfig, JTCompatibleFormItemType, JTElementFormItemType, JTFormItemConfig, JTFormItemCascaderOption, JTFormItemEventHandler, JTFormItemType, JTFormItemsExpose, JTFormItemsForm, JTFormItemsProps, JtActionMenuItem, JtActionMenuItemKey, JtActionMenuProps, JtAttachmentFile, JtAttachmentListProps, JtChoiceCardGroupProps, JtChoiceCardOption, JtChoiceCardValue, JtCrudColumn, JtCrudOption, JtDescriptionsItem, JtDescriptionsProps, JtDescriptionsValue, JtDepartmentTreeExpose, JtDepartmentTreeKey, JtDepartmentTreeNodeData, JtCollapsibleLayoutPlacement, JtCollapsibleLayoutProps, JtDepartmentTreeProps, JtDicItem, JtDialogFooterLayout, JtDialogProps, JtDialogSize, JtDialogWidth, JtEmptyStateProps, JtFileIconProps, JtFileType, JtHeaderSearchSelectProps, JtHeaderSearchSelectRemoteMethod, JtHeaderSearchSelectSearchMethod, JtHeaderSearchSelectSearchPayload, JtHighlightTextProps, JtOptionItem, JtSearchSelectHighlightSegment, JtSearchSelectOption, JtSearchSelectOptionValue, JtSearchSelectProps, JtOverflowTooltipTextProps, JtPageHeaderOperate, JtPageHeaderProps, JtPageHeaderSize, JtPaginationData, JtSearchType, JtStatusStampProps, JtStatusStampStatus, JtTabContext, JtTabItemProps, JtTabProps, JtTabSize, JtTabType, JtTabValue, JtTreeExpose, JtTreeKey, JtTreeNodeData, JtTreeProps, JtTreeTableLayoutProps, } from "./components/index";
4
+ export { JtActionMenu, JtAttachmentList, JtButton, JtCard, JtCascader, JtChoiceCardGroup, JtCrudTable, JtDatePicker, JtDescriptions, JtDepartmentTree, JtCollapsibleLayout, JtDialog, JtDrawer, JtEmptyState, JtFileIcon, JtFilterBar, JtForm, JtFormItem, JtFormItems, JtHeaderSearchSelect, JtHighlightText, JtInput, JtPersonSelect, JtSearchSelect, JtOverflowTooltipText, JtPageHeader, JtPagination, JtSelect, JtStatusStamp, JtTab, JtTabItem, JtTable, JtTree, JtTreeTableLayout, openJtConfirmDialog, resolveJtFileType, } from "./components/index";
5
+ export type { JTCascaderFormItemConfig, JTCompatibleFormItemType, JTElementFormItemType, JTFormExpose, JTFormItemExpose, JTFormItemConfig, JTFormItemCascaderOption, JTFormItemEventHandler, JTFormItemProps, JTFormOptionProps, JTFormItemType, JTFormProps, JTFormItemsExpose, JTFormItemsForm, JTFormItemsProps, JtActionMenuItem, JtActionMenuItemKey, JtActionMenuProps, JtAttachmentFile, JtAttachmentListProps, JtChoiceCardGroupProps, JtChoiceCardOption, JtChoiceCardValue, JtConfirmDialogFooter, JtConfirmDialogFooterSlotProps, JtCrudColumn, JtCrudOption, JtDescriptionsItem, JtDescriptionsProps, JtDescriptionsValue, JtDepartmentTreeExpose, JtDepartmentTreeKey, JtDepartmentTreeNodeData, JtCollapsibleLayoutPlacement, JtCollapsibleLayoutProps, JtDepartmentTreeProps, JtDicItem, JtDialogFooterLayout, JtDialogProps, JtDialogSize, JtDialogWidth, JtEmptyStateProps, JtFileIconProps, JtFileType, JtHeaderSearchSelectProps, JtHeaderSearchSelectRemoteMethod, JtHeaderSearchSelectSearchMethod, JtHeaderSearchSelectSearchPayload, JtHighlightTextProps, JtOptionItem, JtSearchSelectHighlightSegment, JtSearchSelectOption, JtSearchSelectOptionValue, JtSearchSelectProps, JtOverflowTooltipTextProps, JtPersonOption, JtPersonOptionValue, JtPersonRequestMethod, JtPersonSelectProps, JtPersonSelectValue, JtPersonSelection, JtPageHeaderOperate, JtPageHeaderProps, JtPageHeaderSize, JtPaginationData, JtSearchType, JtStatusStampProps, JtStatusStampStatus, JtTabContext, JtTabItemProps, JtTabProps, JtTabSize, JtTabType, JtTabValue, JtTreeExpose, JtTreeKey, JtTreeNodeData, JtTreeProps, JtTreeTableLayoutProps, } from "./components/index";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jt-home/mfe-components",
3
- "version": "8.0.0",
3
+ "version": "10.0.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/package/index.cjs",
@@ -1 +0,0 @@
1
- "use strict";const m=require("element-plus/es"),e=require("vue"),d=require("./locale/index.cjs"),h=require("element-plus"),v=2,x=3;function w(a){return a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function B(a){if(!a.startsWith("on")||a.length<=v)return!1;const t=a.charCodeAt(v);return t<97||t>122}function k(a){if(a.startsWith("on-"))return a.slice(x);const[t,o]=a.slice(v).split(":"),n=w(t);return o?`${n}:${o}`:n}function b(a,t=new Set){return Object.fromEntries(Object.entries(a).filter(([o,n])=>!t.has(o)&&B(o)&&typeof n=="function").map(([o,n])=>[k(o),n]))}function C(a,t=new Set){return Object.fromEntries(Object.entries(a).filter(([o])=>!t.has(o)&&!B(o)))}const E=e.defineComponent({name:"JtButton",__name:"index",props:{disabled:{type:Boolean},type:{},icon:{},nativeType:{},loading:{type:Boolean},loadingIcon:{},plain:{type:Boolean},text:{type:Boolean},link:{type:Boolean},bg:{type:Boolean},autofocus:{type:Boolean},round:{type:Boolean},circle:{type:Boolean},dashed:{type:Boolean},color:{},dark:{type:Boolean},autoInsertSpace:{type:Boolean},tag:{},size:{},gray:{type:Boolean}},setup(a){const t=a,o=e.useAttrs(),n=e.computed(()=>t.type==="primary"),s=e.computed(()=>t.plain===!0),i=e.computed(()=>t.size??"default"),r=e.computed(()=>({[`jt-button--size-${i.value}`]:!0,"jt-button--type-primary":n.value,"jt-button--plain":s.value,"jt-button--gray":t.gray,"jt-button--border":!0})),l=e.computed(()=>{const{gray:p,icon:u,size:y,..._}=t;return{...C(o),..._}}),c=e.computed(()=>b(o));return(p,u)=>{const y=m.ElIcon,_=m.ElButton;return e.openBlock(),e.createBlock(_,e.mergeProps({class:["jt-button",r.value]},l.value,e.toHandlers(c.value)),{default:e.withCtx(()=>[p.$slots.icon?(e.openBlock(),e.createBlock(y,{key:0,class:"jt-button__icon"},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"icon",{},void 0,!0)]),_:3})):t.icon?(e.openBlock(),e.createBlock(y,{key:1,class:"jt-button__icon"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))]),_:1})):e.createCommentVNode("",!0),e.renderSlot(p.$slots,"default",{},void 0,!0)]),_:3},16,["class"])}}}),f=(a,t)=>{const o=a.__vccOpts||a;for(const[n,s]of t)o[n]=s;return o},g=f(E,[["__scopeId","data-v-c30ce771"]]),P=e.defineComponent({name:"JtDatePicker",__name:"index",props:{type:{default:"date"},showNow:{type:Boolean},showConfirm:{type:Boolean},showFooter:{type:Boolean},showWeekNumber:{type:Boolean},ariaLabel:{},emptyValues:{},valueOnClear:{},disabledDate:{},cellClassName:{},shortcuts:{},arrowControl:{type:Boolean},tabindex:{},validateEvent:{type:Boolean},unlinkPanels:{type:Boolean},singlePanel:{type:Boolean},placement:{},fallbackPlacements:{},disabledHours:{},disabledMinutes:{},disabledSeconds:{},automaticDropdown:{type:Boolean},id:{},name:{},popperClass:{},popperStyle:{},format:{},valueFormat:{default:"YYYY-MM-DD"},dateFormat:{},timeFormat:{},clearable:{type:Boolean,default:!0},clearIcon:{},editable:{type:Boolean,default:!0},saveOnBlur:{type:Boolean},prefixIcon:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},placeholder:{default:d.t("common.请选择")},popperOptions:{},modelValue:{},rangeSeparator:{},startPlaceholder:{},endPlaceholder:{},defaultValue:{},defaultTime:{},isRange:{type:Boolean},preservePlaceholderWhenDisabled:{type:Boolean}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,n=t,s=e.computed(()=>{const{preservePlaceholderWhenDisabled:r,...l}=o;if(o.disabled&&!r){const{placeholder:c,startPlaceholder:p,endPlaceholder:u,...y}=l;return y}return{...l,startPlaceholder:o.startPlaceholder??(i(o.type)?d.t("common.开始日期"):void 0),endPlaceholder:o.endPlaceholder??(i(o.type)?d.t("common.结束日期"):void 0)}});function i(r){return r?.includes("range")??!1}return(r,l)=>{const c=m.ElDatePicker;return e.openBlock(),e.createBlock(c,e.mergeProps({class:"jt-date-picker jt-form-control"},s.value,{"onUpdate:modelValue":l[0]||(l[0]=p=>n("update:modelValue",p))}),null,16)}}}),j=e.defineComponent({name:"JtInput",__name:"index",props:{id:{},size:{},disabled:{type:Boolean},modelValue:{},modelModifiers:{},maxlength:{},minlength:{},type:{},resize:{},autosize:{type:[Object,Boolean]},autocomplete:{},formatter:{},parser:{},placeholder:{},form:{},readonly:{type:Boolean},clearable:{type:Boolean,default:!0},clearIcon:{},showPassword:{type:Boolean},showWordLimit:{type:Boolean},wordLimitPosition:{},suffixIcon:{},prefixIcon:{},containerRole:{},tabindex:{},validateEvent:{type:Boolean},inputStyle:{type:[Boolean,null,String,Object,Array]},autofocus:{type:Boolean},rows:{},ariaLabel:{},inputmode:{},name:{},countGraphemes:{},preservePlaceholderWhenDisabled:{type:Boolean}},emits:{...h.inputEmits,enter:()=>!0},setup(a,{emit:t}){const o=a,n=e.computed(()=>{const{preservePlaceholderWhenDisabled:r,placeholder:l,...c}=o,p={...c,placeholder:l??d.t("common.请输入")};return!o.disabled||r?p:Object.fromEntries(Object.entries(p).filter(([u])=>u!=="placeholder"))}),s=t,i=e.computed(()=>Object.fromEntries(Object.keys(h.inputEmits).map(r=>[r,(...l)=>s(r,...l)])));return(r,l)=>{const c=m.ElInput;return e.openBlock(),e.createBlock(c,e.mergeProps({class:"jt-input jt-form-control"},n.value,e.toHandlers(i.value),{onKeyup:l[0]||(l[0]=e.withKeys(p=>s("enter"),["enter"]))}),null,16)}}}),T=f(j,[["__scopeId","data-v-ddac16c1"]]),S=e.defineComponent({name:"JtSelect",__name:"index",props:{options:{},preservePlaceholderWhenDisabled:{type:Boolean},ariaLabel:{},emptyValues:{},valueOnClear:{},name:{},id:{},modelValue:{},autocomplete:{},automaticDropdown:{type:Boolean},size:{},effect:{},disabled:{type:Boolean},clearable:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},allowCreate:{type:Boolean},loading:{type:Boolean},popperClass:{},popperStyle:{},popperOptions:{},remote:{type:Boolean},debounce:{},loadingText:{},noMatchText:{},noDataText:{},remoteMethod:{},filterMethod:{},multiple:{type:Boolean},multipleLimit:{},placeholder:{},defaultFirstOption:{type:Boolean},reserveKeyword:{type:Boolean},valueKey:{},collapseTags:{type:Boolean},collapseTagsTooltip:{type:Boolean},tagTooltip:{},maxCollapseTags:{},teleported:{type:Boolean},persistent:{type:Boolean},clearIcon:{},fitInputWidth:{type:Boolean},suffixIcon:{},tagType:{},tagEffect:{},validateEvent:{type:Boolean},remoteShowSuffix:{type:Boolean},showArrow:{type:Boolean},offset:{},placement:{},fallbackPlacements:{},tabindex:{},appendTo:{},props:{}},emits:h.selectEmits,setup(a,{emit:t}){const o=a,n=e.computed(()=>{const{options:r,placeholder:l,preservePlaceholderWhenDisabled:c,...p}=o;return o.disabled&&!c?p:{...p,placeholder:l??d.t("common.请选择")}}),s=t,i=e.computed(()=>Object.fromEntries(Object.keys(h.selectEmits).map(r=>[r,(...l)=>s(r,...l)])));return(r,l)=>{const c=m.ElOption,p=m.ElSelect;return e.openBlock(),e.createBlock(p,e.mergeProps({class:"jt-select jt-form-control"},n.value,e.toHandlers(i.value)),{default:e.withCtx(()=>[r.$slots.option?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.options??[],u=>(e.openBlock(),e.createBlock(c,e.mergeProps({key:u.value,ref_for:!0},u),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"option",{option:u},void 0,!0)]),_:2},1040))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(r.options??[],u=>(e.openBlock(),e.createBlock(c,e.mergeProps({key:u.value,ref_for:!0},u),null,16))),128))]),_:3},16)}}}),O=f(S,[["__scopeId","data-v-dc278e7e"]]),D=e.defineComponent({name:"JtOverflowTooltipText",__name:"index",props:{content:{default:""},maxWidth:{default:"100%"},placement:{default:"top"},popperClass:{default:""},tag:{default:"span"},effect:{default:"dark"},textClass:{default:"jt-overflow-tooltip-text--default"},textStyle:{}},setup(a){const t=a,o=e.ref(null),n=e.ref(!1);let s=null;const i=e.computed(()=>({maxWidth:typeof t.maxWidth=="number"?`${t.maxWidth}px`:t.maxWidth,...t.textStyle}));function r(){const l=o.value;l&&(n.value=l.scrollWidth>l.clientWidth||l.scrollHeight>l.clientHeight||Array.from(l.children).some(c=>c.scrollWidth>c.clientWidth||c.scrollHeight>c.clientHeight))}return e.onMounted(async()=>{await e.nextTick(),r(),!(!window.ResizeObserver||!o.value)&&(s=new ResizeObserver(r),s.observe(o.value))}),e.onBeforeUnmount(()=>{s?.disconnect()}),e.watch(()=>[t.content,t.maxWidth,t.textStyle],async()=>{await e.nextTick(),r()},{deep:!0}),(l,c)=>{const p=m.ElTooltip;return e.openBlock(),e.createBlock(p,e.mergeProps({disabled:!n.value||!t.content,content:t.content,placement:t.placement,effect:t.effect,"popper-class":t.popperClass,"show-arrow":!1},l.$attrs),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{ref_key:"textRef",ref:o,class:e.normalizeClass(["jt-overflow-tooltip-text",t.textClass,{"jt-overflow-tooltip-text--custom":l.$slots.default}]),style:e.normalizeStyle(i.value)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)],!0)]),_:3},8,["class","style"]))]),_:3},16,["disabled","content","placement","effect","popper-class"])}}}),L=f(D,[["__scopeId","data-v-d71a5e82"]]),V="data:image/svg+xml,%3csvg%20width='22'%20height='22'%20viewBox='0%200%2022%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%202C6.04082%202%202%206.04082%202%2011C2%2015.9592%206.04082%2020%2011%2020C15.9592%2020%2020%2015.9592%2020%2011C20%206.04082%2015.9592%202%2011%202ZM10.2653%207.78572C10.2653%207.41837%2010.5408%207.05102%2011%207.05102C11.4592%207.05102%2011.7347%207.32653%2011.7347%207.78572V11.4592C11.7347%2011.8265%2011.4592%2012.1939%2011%2012.1939C10.5408%2012.1939%2010.2653%2011.9184%2010.2653%2011.4592V7.78572ZM11%2015.1327C10.5408%2015.1327%2010.0816%2014.6735%2010.0816%2014.2143C10.0816%2013.7551%2010.5408%2013.2959%2011%2013.2959C11.4592%2013.2959%2011.9184%2013.7551%2011.9184%2014.2143C11.9184%2014.6735%2011.4592%2015.1327%2011%2015.1327Z'%20fill='%23E60000'/%3e%3c/svg%3e",$="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='28'%20height='28'%20rx='14'%20fill='%23F9F9F9'/%3e%3cpath%20d='M19.7294%207.21079C20.0223%206.91808%2020.4971%206.91797%2020.79%207.21079C21.0828%207.50362%2021.0827%207.97843%2020.79%208.27134L15.0615%2013.9999L20.79%2019.7284C21.0828%2020.0212%2021.0827%2020.496%2020.79%2020.7889C20.4971%2021.0818%2020.0223%2021.0818%2019.7294%2020.7889L14.0009%2015.0604L8.2724%2020.7889C7.97952%2021.0818%207.50475%2021.0818%207.21186%2020.7889C6.91898%2020.496%206.91897%2020.0213%207.21186%2019.7284L12.9404%2013.9999L7.21186%208.27134C6.91896%207.97844%206.91896%207.50368%207.21186%207.21079C7.50477%206.91808%207.97957%206.91796%208.2724%207.21079L14.0009%2012.9393L19.7294%207.21079Z'%20fill='%23666666'/%3e%3c/svg%3e",I={class:"jt-confirm-dialog-panel"},W={class:"jt-confirm-dialog-panel__header"},z={class:"jt-confirm-dialog-panel__title"},J={class:"jt-confirm-dialog__body"},N={class:"jt-confirm-dialog__desc"},M={class:"jt-confirm-dialog__footer"},A=e.defineComponent({name:"JtConfirmDialog",__name:"index",props:{title:{default:d.t("common.数据启用提示","数据启用提示")},desc:{default:d.t("common.点击确定后,将启用该条数据","点击确定后,将启用该条数据")},confirmText:{default:d.t("common.确定","确 定")},cancelText:{default:d.t("common.取 消","取 消")},confirmLoading:{type:Boolean,default:!1}},emits:["close","confirm"],setup(a,{emit:t}){const o=t;return(n,s)=>(e.openBlock(),e.createElementBlock("section",I,[e.createElementVNode("header",W,[e.createElementVNode("div",z,[s[3]||(s[3]=e.createElementVNode("img",{class:"jt-confirm-dialog-panel__icon",src:V,alt:""},null,-1)),e.createElementVNode("span",null,e.toDisplayString(n.title),1)]),e.createElementVNode("img",{onClick:s[0]||(s[0]=i=>o("close")),class:"jt-confirm-dialog-panel__close jt-confirm-dialog-panel__close-icon",src:$,alt:""})]),e.createElementVNode("div",J,[e.renderSlot(n.$slots,"default",{},()=>[e.createElementVNode("p",N,e.toDisplayString(n.desc),1)],!0)]),e.createElementVNode("footer",M,[e.createVNode(g,{class:"jt-confirm-dialog__button jt-confirm-dialog__button--cancel",size:"middle",gray:"",disabled:n.confirmLoading,onClick:s[1]||(s[1]=i=>o("close"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.cancelText),1)]),_:1},8,["disabled"]),e.createVNode(g,{class:"jt-confirm-dialog__button jt-confirm-dialog__button--confirm",size:"middle",type:"primary",loading:n.confirmLoading,disabled:n.confirmLoading,onClick:s[2]||(s[2]=i=>o("confirm"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.confirmText),1)]),_:1},8,["loading","disabled"])])]))}}),F=f(A,[["__scopeId","data-v-e320b303"]]),H={title:d.t("common.数据启用提示","数据启用提示"),desc:d.t("common.点击确定后,将启用该条数据","点击确定后,将启用该条数据"),confirmText:d.t("common.确认"),cancelText:d.t("common.取消")};function K(a={}){const t={...H,...a};return h.ElMessageBox({message:({confirm:o,cancel:n})=>{const s=e.defineComponent({name:"JtConfirmDialogMessage",setup(){const i=e.ref(!1),r=async()=>{if(!i.value){i.value=!0;try{await t.onConfirm?.(),o()}finally{i.value=!1}}};return()=>e.h(F,{title:t.title,desc:t.desc,confirmText:t.confirmText,cancelText:t.cancelText,confirmLoading:i.value,onClose:n,onConfirm:r},t.content?{default:t.content}:void 0)}});return e.h(s)},customClass:"jt-confirm-message-box-host",customStyle:{width:"517px",maxWidth:"calc(100vw - 40px)"},showClose:!1,showConfirmButton:!1,showCancelButton:!1,distinguishCancelAndClose:!0}).then(()=>"confirm").catch(()=>{throw t.onClose?.(),Error("close 用户手动关闭")})}exports.JtButton=g;exports.JtInput=T;exports.JtOverflowTooltipText=L;exports.JtSelect=O;exports._export_sfc=f;exports._sfc_main=P;exports.omitEventAttrs=C;exports.openJtConfirmDialog=K;exports.pickEventAttrs=b;