easy-ep-ui 0.1.1 → 0.1.2

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 (101) hide show
  1. package/LICENSE +172 -0
  2. package/README.md +29 -14
  3. package/dist/easy-ep-ui.js +1 -1
  4. package/dist/style.css +1 -1
  5. package/es/charts/BaseBar/index.d.ts +2 -0
  6. package/es/charts/BaseBar/src/index.vue.d.ts +45 -0
  7. package/es/charts/BaseLine/index.d.ts +2 -0
  8. package/es/charts/BaseLine/src/index.vue.d.ts +47 -0
  9. package/es/charts/BasePie/index.d.ts +2 -0
  10. package/es/charts/BasePie/src/index.vue.d.ts +41 -0
  11. package/es/charts/BaseRadar/index.d.ts +2 -0
  12. package/es/charts/BaseRadar/src/index.vue.d.ts +47 -0
  13. package/es/charts/config.d.ts +32 -0
  14. package/es/charts/index.d.ts +8 -0
  15. package/es/charts/useChart.d.ts +21 -0
  16. package/es/components/ee-dept-cascader/index.d.ts +2 -0
  17. package/es/components/ee-dept-cascader/src/index.vue.d.ts +26 -0
  18. package/es/components/ee-dept-cascader/type.d.ts +39 -0
  19. package/es/components/ee-dict-select/src/index.vue.d.ts +19 -18
  20. package/es/components/ee-dict-select/type.d.ts +54 -0
  21. package/es/components/ee-form-dialog/src/index.vue.d.ts +108 -8
  22. package/es/components/ee-form-table/src/components/FormAuto.vue.d.ts +115 -0
  23. package/es/components/ee-form-table/src/components/FormDrawer.vue.d.ts +280 -7
  24. package/es/components/ee-form-table/src/components/TableToolbar.vue.d.ts +1 -0
  25. package/es/components/ee-form-table/src/constants.d.ts +2 -2
  26. package/es/components/ee-form-table/src/hooks/useCrud.d.ts +2 -0
  27. package/es/components/ee-form-table/src/hooks/useExport.d.ts +2 -0
  28. package/es/components/ee-form-table/src/hooks/useForm.d.ts +4 -2
  29. package/es/components/ee-form-table/src/index.vue.d.ts +13 -1
  30. package/es/components/ee-form-table/types.d.ts +41 -0
  31. package/es/components/ee-remote-select/index.d.ts +2 -0
  32. package/es/components/ee-remote-select/src/index.vue.d.ts +30 -0
  33. package/es/components/ee-remote-select/type.d.ts +53 -0
  34. package/es/components/ee-role-select/index.d.ts +2 -0
  35. package/es/components/ee-role-select/src/index.vue.d.ts +29 -0
  36. package/es/components/ee-role-select/type.d.ts +44 -0
  37. package/es/components/ee-search-bar/src/index.vue.d.ts +80 -10
  38. package/es/components/ee-status-tag/src/index.vue.d.ts +1 -1
  39. package/es/components/ee-user-select/index.d.ts +2 -0
  40. package/es/components/ee-user-select/src/index.vue.d.ts +29 -0
  41. package/es/components/ee-user-select/type.d.ts +46 -0
  42. package/es/hooks/index.d.ts +4 -0
  43. package/es/hooks/useRemoteSelectPagination.d.ts +68 -0
  44. package/es/hooks/useSelectEcho.d.ts +27 -0
  45. package/es/index.d.ts +49 -2
  46. package/es/index.mjs +2605 -966
  47. package/es/locale/en.d.ts +3 -0
  48. package/es/locale/index.d.ts +86 -0
  49. package/es/locale/useLocale.d.ts +13 -0
  50. package/es/locale/zh-cn.d.ts +3 -0
  51. package/es/style.css +1 -1
  52. package/es/utils/types.d.ts +39 -0
  53. package/lib/charts/BaseBar/index.d.ts +2 -0
  54. package/lib/charts/BaseBar/src/index.vue.d.ts +45 -0
  55. package/lib/charts/BaseLine/index.d.ts +2 -0
  56. package/lib/charts/BaseLine/src/index.vue.d.ts +47 -0
  57. package/lib/charts/BasePie/index.d.ts +2 -0
  58. package/lib/charts/BasePie/src/index.vue.d.ts +41 -0
  59. package/lib/charts/BaseRadar/index.d.ts +2 -0
  60. package/lib/charts/BaseRadar/src/index.vue.d.ts +47 -0
  61. package/lib/charts/config.d.ts +32 -0
  62. package/lib/charts/index.d.ts +8 -0
  63. package/lib/charts/useChart.d.ts +21 -0
  64. package/lib/components/ee-dept-cascader/index.d.ts +2 -0
  65. package/lib/components/ee-dept-cascader/src/index.vue.d.ts +26 -0
  66. package/lib/components/ee-dept-cascader/type.d.ts +39 -0
  67. package/lib/components/ee-dict-select/src/index.vue.d.ts +19 -18
  68. package/lib/components/ee-dict-select/type.d.ts +54 -0
  69. package/lib/components/ee-form-dialog/src/index.vue.d.ts +108 -8
  70. package/lib/components/ee-form-table/src/components/FormAuto.vue.d.ts +115 -0
  71. package/lib/components/ee-form-table/src/components/FormDrawer.vue.d.ts +280 -7
  72. package/lib/components/ee-form-table/src/components/TableToolbar.vue.d.ts +1 -0
  73. package/lib/components/ee-form-table/src/constants.d.ts +2 -2
  74. package/lib/components/ee-form-table/src/hooks/useCrud.d.ts +2 -0
  75. package/lib/components/ee-form-table/src/hooks/useExport.d.ts +2 -0
  76. package/lib/components/ee-form-table/src/hooks/useForm.d.ts +4 -2
  77. package/lib/components/ee-form-table/src/index.vue.d.ts +13 -1
  78. package/lib/components/ee-form-table/types.d.ts +41 -0
  79. package/lib/components/ee-remote-select/index.d.ts +2 -0
  80. package/lib/components/ee-remote-select/src/index.vue.d.ts +30 -0
  81. package/lib/components/ee-remote-select/type.d.ts +53 -0
  82. package/lib/components/ee-role-select/index.d.ts +2 -0
  83. package/lib/components/ee-role-select/src/index.vue.d.ts +29 -0
  84. package/lib/components/ee-role-select/type.d.ts +44 -0
  85. package/lib/components/ee-search-bar/src/index.vue.d.ts +80 -10
  86. package/lib/components/ee-status-tag/src/index.vue.d.ts +1 -1
  87. package/lib/components/ee-user-select/index.d.ts +2 -0
  88. package/lib/components/ee-user-select/src/index.vue.d.ts +29 -0
  89. package/lib/components/ee-user-select/type.d.ts +46 -0
  90. package/lib/hooks/index.d.ts +4 -0
  91. package/lib/hooks/useRemoteSelectPagination.d.ts +68 -0
  92. package/lib/hooks/useSelectEcho.d.ts +27 -0
  93. package/lib/index.cjs +1 -1
  94. package/lib/index.d.ts +49 -2
  95. package/lib/locale/en.d.ts +3 -0
  96. package/lib/locale/index.d.ts +86 -0
  97. package/lib/locale/useLocale.d.ts +13 -0
  98. package/lib/locale/zh-cn.d.ts +3 -0
  99. package/lib/style.css +1 -1
  100. package/lib/utils/types.d.ts +39 -0
  101. package/package.json +5 -2
@@ -4,7 +4,7 @@ import { DrawerConfig } from '../../types';
4
4
  * @param props.drawerConfig - 抽屉/弹窗的外观配置
5
5
  * @param props.rowKey - 数据行的唯一键(用于编辑时取 ID)
6
6
  * @returns formVisible - 表单是否显示
7
- * @returns isEditing - 是否为编辑模式(false 为新增)
7
+ * @returns formMode - 表单模式:add | edit | view
8
8
  * @returns editingRow - 当前编辑的行数据(新增时为 null)
9
9
  * @returns formData - 表单绑定的数据对象
10
10
  * @returns saving - 是否正在保存(加载状态)
@@ -12,6 +12,7 @@ import { DrawerConfig } from '../../types';
12
12
  * @returns drawerCfg - 合并默认值后的配置
13
13
  * @returns openAdd - 打开新增表单
14
14
  * @returns openEdit - 打开编辑表单
15
+ * @returns openView - 打开查看表单
15
16
  * @returns closeForm - 关闭表单
16
17
  */
17
18
  export declare function useForm(props: {
@@ -19,7 +20,7 @@ export declare function useForm(props: {
19
20
  rowKey?: string;
20
21
  }): {
21
22
  formVisible: ReturnType<typeof ref<boolean>>;
22
- isEditing: ReturnType<typeof ref<boolean>>;
23
+ formMode: ReturnType<typeof ref<'add' | 'edit' | 'view'>>;
23
24
  editingRow: ReturnType<typeof ref<Record<string, unknown> | null>>;
24
25
  formData: ReturnType<typeof ref<Record<string, unknown>>>;
25
26
  saving: ReturnType<typeof ref<boolean>>;
@@ -27,5 +28,6 @@ export declare function useForm(props: {
27
28
  drawerCfg: DrawerConfig;
28
29
  openAdd: () => void;
29
30
  openEdit: (row: Record<string, unknown>) => void;
31
+ openView: (row: Record<string, unknown>) => void;
30
32
  closeForm: () => void;
31
33
  };
@@ -31,7 +31,7 @@ declare function __VLS_template(): {
31
31
  row: import('element-plus/es/components/table/src/table/defaults.mjs').DefaultRow;
32
32
  index: number;
33
33
  column: TableColumn;
34
- }) => any>> & Partial<Record<string, (_: any) => any>> & {
34
+ }) => any>> & {
35
35
  'search-action'?(_: {
36
36
  params: Record<string, unknown>;
37
37
  }): any;
@@ -43,6 +43,18 @@ declare function __VLS_template(): {
43
43
  row: import('element-plus/es/components/table/src/table/defaults.mjs').DefaultRow;
44
44
  }): any;
45
45
  empty?(_: {}): any;
46
+ 'add-form'?(_: {
47
+ row: Record<string, unknown> | null;
48
+ formData: Record<string, unknown>;
49
+ }): any;
50
+ 'edit-form'?(_: {
51
+ row: Record<string, unknown> | null;
52
+ formData: Record<string, unknown>;
53
+ }): any;
54
+ 'view-form'?(_: {
55
+ row: Record<string, unknown> | null;
56
+ formData: Record<string, unknown>;
57
+ }): any;
46
58
  };
47
59
  refs: {
48
60
  tableRef: {
@@ -23,6 +23,8 @@ export type ExportMode = 'current' | 'all';
23
23
  export type SearchFieldType = 'input' | 'number' | 'select' | 'radio' | 'checkbox' | 'date' | 'date-range' | 'textarea';
24
24
  /** Element Plus 按钮类型 */
25
25
  export type ButtonType = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'default';
26
+ /** 表单字段控件类型 */
27
+ export type FormFieldType = 'input' | 'number' | 'select' | 'radio' | 'checkbox' | 'date' | 'date-range' | 'textarea' | 'switch';
26
28
  export interface DictOption {
27
29
  value: string | number;
28
30
  label: string;
@@ -37,6 +39,37 @@ export interface ColumnSearchItem {
37
39
  props?: Record<string, unknown>;
38
40
  field?: string;
39
41
  }
42
+ export interface ColumnFormItem {
43
+ /** 是否在新增表单中展示(默认 true) */
44
+ add?: boolean;
45
+ /** 是否在编辑表单中展示(默认同 add) */
46
+ edit?: boolean;
47
+ /** 表单控件类型,默认 'input' */
48
+ type?: FormFieldType;
49
+ /** 占位符 */
50
+ placeholder?: string;
51
+ /** 静态选项(select/radio/checkbox) */
52
+ options?: {
53
+ value: any;
54
+ label: string;
55
+ }[];
56
+ /** 字典 key(优先于 options) */
57
+ dictKey?: string;
58
+ /** 透传给控件的 props */
59
+ props?: Record<string, unknown>;
60
+ /** Element Plus 校验规则 */
61
+ rules?: Record<string, unknown>[];
62
+ /** 栅格跨列数(默认 1) */
63
+ colSpan?: number;
64
+ /** 必填标记(自动加 required 校验) */
65
+ required?: boolean;
66
+ /** 编辑时只读 */
67
+ readonly?: boolean;
68
+ /** 新增时的默认值 */
69
+ defaultValue?: unknown;
70
+ /** 强制隐藏 */
71
+ hide?: boolean;
72
+ }
40
73
  export interface TableColumn {
41
74
  prop: string;
42
75
  label: string;
@@ -50,6 +83,7 @@ export interface TableColumn {
50
83
  dictKey?: string;
51
84
  slotName?: string;
52
85
  search?: ColumnSearchItem;
86
+ form?: ColumnFormItem;
53
87
  auth?: string;
54
88
  children?: TableColumn[];
55
89
  [key: string]: unknown;
@@ -158,6 +192,13 @@ export interface DrawerConfig {
158
192
  closeOnReset?: boolean;
159
193
  addTitle?: string;
160
194
  editTitle?: string;
195
+ viewTitle?: string;
196
+ /** 表单每行展示列数(默认 2) */
197
+ formCols?: number;
198
+ /** 表单标签宽度(默认 '80px') */
199
+ formLabelWidth?: string;
200
+ /** 表单组件尺寸 */
201
+ formSize?: ComponentSize;
161
202
  }
162
203
  export interface ColumnSettingConfig {
163
204
  show?: boolean;
@@ -0,0 +1,2 @@
1
+ import { default as EeRemoteSelect } from './src/index.vue';
2
+ export default EeRemoteSelect;
@@ -0,0 +1,30 @@
1
+ import { EeRemoteSelectProps } from '../type';
2
+ declare const _default: import('vue').DefineComponent<EeRemoteSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ search: (keyword: string) => any;
4
+ clear: () => any;
5
+ "update:modelValue": (val: string | number | (string | number)[]) => any;
6
+ change: (val: string | number | (string | number)[]) => any;
7
+ blur: (evt: FocusEvent) => any;
8
+ focus: (evt: FocusEvent) => any;
9
+ "load-success": (options: any[]) => any;
10
+ }, string, import('vue').PublicProps, Readonly<EeRemoteSelectProps> & Readonly<{
11
+ onSearch?: ((keyword: string) => any) | undefined;
12
+ onClear?: (() => any) | undefined;
13
+ "onUpdate:modelValue"?: ((val: string | number | (string | number)[]) => any) | undefined;
14
+ onChange?: ((val: string | number | (string | number)[]) => any) | undefined;
15
+ onBlur?: ((evt: FocusEvent) => any) | undefined;
16
+ onFocus?: ((evt: FocusEvent) => any) | undefined;
17
+ "onLoad-success"?: ((options: any[]) => any) | undefined;
18
+ }>, {
19
+ pageNumKey: string;
20
+ pageSizeKey: string;
21
+ pageSize: number;
22
+ searchKey: string;
23
+ labelField: string;
24
+ valueField: string;
25
+ size: "large" | "default" | "small";
26
+ mode: "single" | "multiple";
27
+ clearable: boolean;
28
+ filterable: boolean;
29
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
30
+ export default _default;
@@ -0,0 +1,53 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { DictOption } from '../../utils/types';
3
+ /** EeRemoteSelect 组件属性 */
4
+ export interface EeRemoteSelectProps {
5
+ /** 双向绑定值 */
6
+ modelValue?: string | number | (string | number)[];
7
+ /** 远程列表查询接口地址(必填) */
8
+ apiUrl: string;
9
+ /** ID 回显详情查询接口地址(必填) */
10
+ detailEchoUrl: string;
11
+ /** 选择模式,默认 single */
12
+ mode?: 'single' | 'multiple';
13
+ /** 选项 label 字段名,默认 label */
14
+ labelField?: string;
15
+ /** 选项 value 字段名,默认 value */
16
+ valueField?: string;
17
+ /** 搜索关键词参数字段名,默认 keyword */
18
+ searchKey?: string;
19
+ /** 分页页码字段名,默认 pageNum */
20
+ pageNumKey?: string;
21
+ /** 分页条数字段名,默认 pageSize */
22
+ pageSizeKey?: string;
23
+ /** 每页条数,默认 20 */
24
+ pageSize?: number;
25
+ /** 固定附加请求参数 */
26
+ extraParams?: Record<string, any>;
27
+ /** 外部 axios 请求实例,不传则从全局配置获取 */
28
+ requestInstance?: AxiosInstance;
29
+ /** 占位符文本 */
30
+ placeholder?: string;
31
+ /** 是否可清空,默认 true */
32
+ clearable?: boolean;
33
+ /** 是否禁用 */
34
+ disabled?: boolean;
35
+ /** 是否只读 */
36
+ readonly?: boolean;
37
+ /** 是否可搜索过滤,默认 true */
38
+ filterable?: boolean;
39
+ /** 组件尺寸 */
40
+ size?: 'large' | 'default' | 'small';
41
+ /** 静态选项数据,优先级最高,传入后不走接口 */
42
+ options?: DictOption[];
43
+ }
44
+ /** EeRemoteSelect 组件事件 */
45
+ export interface EeRemoteSelectEmits {
46
+ (e: 'update:modelValue', val: string | number | (string | number)[]): void;
47
+ (e: 'change', val: string | number | (string | number)[]): void;
48
+ (e: 'clear'): void;
49
+ (e: 'blur', evt: FocusEvent): void;
50
+ (e: 'focus', evt: FocusEvent): void;
51
+ (e: 'search', keyword: string): void;
52
+ (e: 'load-success', options: any[]): void;
53
+ }
@@ -0,0 +1,2 @@
1
+ import { default as EeRoleSelect } from './src/index.vue';
2
+ export default EeRoleSelect;
@@ -0,0 +1,29 @@
1
+ import { EeRoleSelectProps } from '../type';
2
+ declare const _default: import('vue').DefineComponent<EeRoleSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ search: (keyword: string) => any;
4
+ clear: () => any;
5
+ "update:modelValue": (val: string | number | (string | number)[]) => any;
6
+ change: (val: string | number | (string | number)[]) => any;
7
+ blur: (evt: FocusEvent) => any;
8
+ focus: (evt: FocusEvent) => any;
9
+ "load-success": (options: any[]) => any;
10
+ }, string, import('vue').PublicProps, Readonly<EeRoleSelectProps> & Readonly<{
11
+ onSearch?: ((keyword: string) => any) | undefined;
12
+ onClear?: (() => any) | undefined;
13
+ "onUpdate:modelValue"?: ((val: string | number | (string | number)[]) => any) | undefined;
14
+ onChange?: ((val: string | number | (string | number)[]) => any) | undefined;
15
+ onBlur?: ((evt: FocusEvent) => any) | undefined;
16
+ onFocus?: ((evt: FocusEvent) => any) | undefined;
17
+ "onLoad-success"?: ((options: any[]) => any) | undefined;
18
+ }>, {
19
+ apiUrl: string;
20
+ searchKey: string;
21
+ labelField: string;
22
+ valueField: string;
23
+ size: "large" | "default" | "small";
24
+ detailEchoUrl: string;
25
+ mode: "single" | "multiple";
26
+ clearable: boolean;
27
+ filterable: boolean;
28
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
+ export default _default;
@@ -0,0 +1,44 @@
1
+ import { AxiosInstance } from 'axios';
2
+ /** EeRoleSelect 组件属性 */
3
+ export interface EeRoleSelectProps {
4
+ /** 双向绑定值 */
5
+ modelValue?: string | number | (string | number)[];
6
+ /** 自定义角色列表接口地址,覆盖默认接口 */
7
+ apiUrl?: string;
8
+ /** 自定义角色详情回显接口地址 */
9
+ detailEchoUrl?: string;
10
+ /** 选择模式,默认 single */
11
+ mode?: 'single' | 'multiple';
12
+ /** 选项 label 字段名,默认 label */
13
+ labelField?: string;
14
+ /** 选项 value 字段名,默认 value */
15
+ valueField?: string;
16
+ /** 搜索关键词参数字段名,默认 keyword */
17
+ searchKey?: string;
18
+ /** 固定附加请求参数 */
19
+ extraParams?: Record<string, any>;
20
+ /** 外部 axios 请求实例,不传则从全局配置获取 */
21
+ requestInstance?: AxiosInstance;
22
+ /** 占位符文本 */
23
+ placeholder?: string;
24
+ /** 是否可清空,默认 true */
25
+ clearable?: boolean;
26
+ /** 是否禁用 */
27
+ disabled?: boolean;
28
+ /** 是否只读 */
29
+ readonly?: boolean;
30
+ /** 是否可搜索过滤,默认 true */
31
+ filterable?: boolean;
32
+ /** 组件尺寸 */
33
+ size?: 'large' | 'default' | 'small';
34
+ }
35
+ /** EeRoleSelect 组件事件 */
36
+ export interface EeRoleSelectEmits {
37
+ (e: 'update:modelValue', val: string | number | (string | number)[]): void;
38
+ (e: 'change', val: string | number | (string | number)[]): void;
39
+ (e: 'clear'): void;
40
+ (e: 'blur', evt: FocusEvent): void;
41
+ (e: 'focus', evt: FocusEvent): void;
42
+ (e: 'search', keyword: string): void;
43
+ (e: 'load-success', options: any[]): void;
44
+ }
@@ -9,12 +9,12 @@ type __VLS_Props = {
9
9
  size?: 'large' | 'default' | 'small';
10
10
  };
11
11
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
12
- "update:modelValue": (val: Record<string, any>) => any;
13
12
  search: (val: Record<string, any>) => any;
13
+ "update:modelValue": (val: Record<string, any>) => any;
14
14
  reset: () => any;
15
15
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
16
- "onUpdate:modelValue"?: ((val: Record<string, any>) => any) | undefined;
17
16
  onSearch?: ((val: Record<string, any>) => any) | undefined;
17
+ "onUpdate:modelValue"?: ((val: Record<string, any>) => any) | undefined;
18
18
  onReset?: (() => any) | undefined;
19
19
  }>, {
20
20
  size: "large" | "default" | "small";
@@ -60,10 +60,45 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
60
60
  $options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').FormProps> & Readonly<{
61
61
  onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
62
62
  }>, {
63
- validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
64
- validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
65
- resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
66
- clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
63
+ validate: (callback
64
+ /**
65
+ * EeSearchBar 搜索栏组件
66
+ *
67
+ * 基于 el-form 封装的搜索栏,支持多字段类型(input/select/datepicker)、
68
+ * 搜索/重置按钮、字段显隐控制。
69
+ */
70
+ ?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
71
+ validateField: (props
72
+ /**
73
+ * EeSearchBar 搜索栏组件
74
+ *
75
+ * 基于 el-form 封装的搜索栏,支持多字段类型(input/select/datepicker)、
76
+ * 搜索/重置按钮、字段显隐控制。
77
+ */
78
+ ?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback
79
+ /**
80
+ * EeSearchBar 搜索栏组件
81
+ *
82
+ * 基于 el-form 封装的搜索栏,支持多字段类型(input/select/datepicker)、
83
+ * 搜索/重置按钮、字段显隐控制。
84
+ */
85
+ ?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
86
+ resetFields: (props
87
+ /**
88
+ * EeSearchBar 搜索栏组件
89
+ *
90
+ * 基于 el-form 封装的搜索栏,支持多字段类型(input/select/datepicker)、
91
+ * 搜索/重置按钮、字段显隐控制。
92
+ */
93
+ ?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
94
+ clearValidate: (props
95
+ /**
96
+ * EeSearchBar 搜索栏组件
97
+ *
98
+ * 基于 el-form 封装的搜索栏,支持多字段类型(input/select/datepicker)、
99
+ * 搜索/重置按钮、字段显隐控制。
100
+ */
101
+ ?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
67
102
  scrollToField: (prop: import('element-plus').FormItemProp) => void;
68
103
  getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
69
104
  fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
@@ -109,10 +144,45 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
109
144
  }> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
110
145
  onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
111
146
  }>, "fields" | "labelWidth" | "labelPosition" | "requireAsteriskPosition" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues"> & {
112
- validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
113
- validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
114
- resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
115
- clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
147
+ validate: (callback
148
+ /**
149
+ * EeSearchBar 搜索栏组件
150
+ *
151
+ * 基于 el-form 封装的搜索栏,支持多字段类型(input/select/datepicker)、
152
+ * 搜索/重置按钮、字段显隐控制。
153
+ */
154
+ ?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
155
+ validateField: (props
156
+ /**
157
+ * EeSearchBar 搜索栏组件
158
+ *
159
+ * 基于 el-form 封装的搜索栏,支持多字段类型(input/select/datepicker)、
160
+ * 搜索/重置按钮、字段显隐控制。
161
+ */
162
+ ?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback
163
+ /**
164
+ * EeSearchBar 搜索栏组件
165
+ *
166
+ * 基于 el-form 封装的搜索栏,支持多字段类型(input/select/datepicker)、
167
+ * 搜索/重置按钮、字段显隐控制。
168
+ */
169
+ ?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
170
+ resetFields: (props
171
+ /**
172
+ * EeSearchBar 搜索栏组件
173
+ *
174
+ * 基于 el-form 封装的搜索栏,支持多字段类型(input/select/datepicker)、
175
+ * 搜索/重置按钮、字段显隐控制。
176
+ */
177
+ ?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
178
+ clearValidate: (props
179
+ /**
180
+ * EeSearchBar 搜索栏组件
181
+ *
182
+ * 基于 el-form 封装的搜索栏,支持多字段类型(input/select/datepicker)、
183
+ * 搜索/重置按钮、字段显隐控制。
184
+ */
185
+ ?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
116
186
  scrollToField: (prop: import('element-plus').FormItemProp) => void;
117
187
  getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
118
188
  fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
@@ -8,6 +8,6 @@ type __VLS_Props = {
8
8
  };
9
9
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
10
  defaultType: "primary" | "success" | "warning" | "danger" | "info";
11
- defaultEffect: "dark" | "light" | "plain";
11
+ defaultEffect: "plain" | "light" | "dark";
12
12
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
13
  export default _default;
@@ -0,0 +1,2 @@
1
+ import { default as EeUserSelect } from './src/index.vue';
2
+ export default EeUserSelect;
@@ -0,0 +1,29 @@
1
+ import { EeUserSelectProps } from '../type';
2
+ declare const _default: import('vue').DefineComponent<EeUserSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ search: (keyword: string) => any;
4
+ clear: () => any;
5
+ "update:modelValue": (val: string | number | (string | number)[]) => any;
6
+ change: (val: string | number | (string | number)[]) => any;
7
+ blur: (evt: FocusEvent) => any;
8
+ focus: (evt: FocusEvent) => any;
9
+ "load-success": (options: any[]) => any;
10
+ }, string, import('vue').PublicProps, Readonly<EeUserSelectProps> & Readonly<{
11
+ onSearch?: ((keyword: string) => any) | undefined;
12
+ onClear?: (() => any) | undefined;
13
+ "onUpdate:modelValue"?: ((val: string | number | (string | number)[]) => any) | undefined;
14
+ onChange?: ((val: string | number | (string | number)[]) => any) | undefined;
15
+ onBlur?: ((evt: FocusEvent) => any) | undefined;
16
+ onFocus?: ((evt: FocusEvent) => any) | undefined;
17
+ "onLoad-success"?: ((options: any[]) => any) | undefined;
18
+ }>, {
19
+ apiUrl: string;
20
+ searchKey: string;
21
+ labelField: string;
22
+ valueField: string;
23
+ size: "large" | "default" | "small";
24
+ detailEchoUrl: string;
25
+ mode: "single" | "multiple";
26
+ clearable: boolean;
27
+ filterable: boolean;
28
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
+ export default _default;
@@ -0,0 +1,46 @@
1
+ import { AxiosInstance } from 'axios';
2
+ /** EeUserSelect 组件属性 */
3
+ export interface EeUserSelectProps {
4
+ /** 双向绑定值 */
5
+ modelValue?: string | number | (string | number)[];
6
+ /** 自定义人员列表接口地址,覆盖默认接口 */
7
+ apiUrl?: string;
8
+ /** 自定义人员详情回显接口地址 */
9
+ detailEchoUrl?: string;
10
+ /** 选择模式,默认 single */
11
+ mode?: 'single' | 'multiple';
12
+ /** 筛选指定部门下人员 */
13
+ deptId?: string | number;
14
+ /** 选项 label 字段名,默认 label */
15
+ labelField?: string;
16
+ /** 选项 value 字段名,默认 value */
17
+ valueField?: string;
18
+ /** 搜索关键词参数字段名,默认 keyword */
19
+ searchKey?: string;
20
+ /** 固定附加请求参数 */
21
+ extraParams?: Record<string, any>;
22
+ /** 外部 axios 请求实例,不传则从全局配置获取 */
23
+ requestInstance?: AxiosInstance;
24
+ /** 占位符文本 */
25
+ placeholder?: string;
26
+ /** 是否可清空,默认 true */
27
+ clearable?: boolean;
28
+ /** 是否禁用 */
29
+ disabled?: boolean;
30
+ /** 是否只读 */
31
+ readonly?: boolean;
32
+ /** 是否可搜索过滤,默认 true */
33
+ filterable?: boolean;
34
+ /** 组件尺寸 */
35
+ size?: 'large' | 'default' | 'small';
36
+ }
37
+ /** EeUserSelect 组件事件 */
38
+ export interface EeUserSelectEmits {
39
+ (e: 'update:modelValue', val: string | number | (string | number)[]): void;
40
+ (e: 'change', val: string | number | (string | number)[]): void;
41
+ (e: 'clear'): void;
42
+ (e: 'blur', evt: FocusEvent): void;
43
+ (e: 'focus', evt: FocusEvent): void;
44
+ (e: 'search', keyword: string): void;
45
+ (e: 'load-success', options: any[]): void;
46
+ }
@@ -0,0 +1,4 @@
1
+ export { useRemoteSelectPagination } from './useRemoteSelectPagination';
2
+ export { useSelectEcho } from './useSelectEcho';
3
+ export type { RemotePaginationOption, RemoteSelectOption } from './useRemoteSelectPagination';
4
+ export type { EchoOption } from './useSelectEcho';
@@ -0,0 +1,68 @@
1
+ import { AxiosInstance } from 'axios';
2
+ /**
3
+ * 远程分页下拉配置选项
4
+ */
5
+ export interface RemotePaginationOption {
6
+ /** 外部 axios 请求实例,不传则从全局配置获取 */
7
+ requestInstance?: AxiosInstance;
8
+ /** 远程接口地址(必填) */
9
+ apiUrl: string;
10
+ /** 页码字段名,默认 pageNum */
11
+ pageNumKey?: string;
12
+ /** 每页条数字段名,默认 pageSize */
13
+ pageSizeKey?: string;
14
+ /** 每页条数,默认 20 */
15
+ pageSize?: number;
16
+ /** 搜索关键词字段名,默认 keyword */
17
+ searchKey?: string;
18
+ /** 附加请求参数 */
19
+ extraParams?: Record<string, any>;
20
+ /** 选项文本字段名,默认 label */
21
+ labelField?: string;
22
+ /** 选项值字段名,默认 value */
23
+ valueField?: string;
24
+ /** 子节点字段名(树形数据预留),默认 children */
25
+ childrenField?: string;
26
+ /** 关键词防抖延迟(毫秒),默认 300 */
27
+ debounceDelay?: number;
28
+ }
29
+ /**
30
+ * 远程下拉选项项类型
31
+ */
32
+ export interface RemoteSelectOption {
33
+ [key: string]: any;
34
+ /** 显示文本 */
35
+ label?: string;
36
+ /** 选项值 */
37
+ value?: any;
38
+ }
39
+ /**
40
+ * 创建远程分页下拉控制器
41
+ *
42
+ * @param option - 远程分页配置
43
+ * @returns loading / options / noMore / loadData / loadMore / resetList / onKeywordChange
44
+ */
45
+ export declare function useRemoteSelectPagination(option: RemotePaginationOption): {
46
+ /** 是否正在加载 */
47
+ loading: import('vue').Ref<boolean, boolean>;
48
+ /** 当前选项列表 */
49
+ options: import('vue').Ref<{
50
+ [x: string]: any;
51
+ label?: string
52
+ /** 选项值 */
53
+ | undefined;
54
+ value?: any;
55
+ }[], RemoteSelectOption[] | {
56
+ [x: string]: any;
57
+ label?: string
58
+ /** 选项值 */
59
+ | undefined;
60
+ value?: any;
61
+ }[]>;
62
+ /** 是否没有更多数据 */
63
+ noMore: import('vue').Ref<boolean, boolean>;
64
+ loadData: (searchVal?: string, reset?: boolean) => Promise<void>;
65
+ loadMore: () => Promise<void>;
66
+ resetList: () => void;
67
+ onKeywordChange: (val: string) => void;
68
+ };
@@ -0,0 +1,27 @@
1
+ import { AxiosInstance } from 'axios';
2
+ /**
3
+ * 回显配置选项
4
+ */
5
+ export interface EchoOption {
6
+ /** 外部 axios 请求实例,不传则从全局配置获取 */
7
+ requestInstance?: AxiosInstance;
8
+ /** 详情回显接口地址(必填) */
9
+ detailApiUrl: string;
10
+ /** 选项文本字段名,默认 label */
11
+ labelField?: string;
12
+ /** 选项值字段名,默认 value */
13
+ valueField?: string;
14
+ /** 选择模式,默认 single */
15
+ mode?: 'single' | 'multiple';
16
+ }
17
+ /**
18
+ * 创建选项回显控制器
19
+ *
20
+ * @param option - 回显配置
21
+ * @returns echoText / echoValue
22
+ */
23
+ export declare function useSelectEcho(option: EchoOption): {
24
+ /** 当前回显文本(单选为 string,多选为 string[]) */
25
+ echoText: import('vue').Ref<string | string[], string | string[]>;
26
+ echoValue: (modelVal: any) => Promise<void>;
27
+ };