easy-ep-ui 0.1.1 → 0.2.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.
- package/LICENSE +172 -0
- package/README.md +29 -14
- package/dist/easy-ep-ui.js +1 -1
- package/dist/style.css +1 -1
- package/es/charts/BaseBar/index.d.ts +2 -0
- package/es/charts/BaseBar/src/index.vue.d.ts +45 -0
- package/es/charts/BaseLine/index.d.ts +2 -0
- package/es/charts/BaseLine/src/index.vue.d.ts +47 -0
- package/es/charts/BasePie/index.d.ts +2 -0
- package/es/charts/BasePie/src/index.vue.d.ts +41 -0
- package/es/charts/BaseRadar/index.d.ts +2 -0
- package/es/charts/BaseRadar/src/index.vue.d.ts +47 -0
- package/es/charts/config.d.ts +32 -0
- package/es/charts/index.d.ts +8 -0
- package/es/charts/useChart.d.ts +21 -0
- package/es/components/ee-dept-cascader/index.d.ts +2 -0
- package/es/components/ee-dept-cascader/src/index.vue.d.ts +26 -0
- package/es/components/ee-dept-cascader/type.d.ts +39 -0
- package/es/components/ee-dict-select/src/index.vue.d.ts +19 -18
- package/es/components/ee-dict-select/type.d.ts +54 -0
- package/es/components/ee-form-dialog/src/index.vue.d.ts +108 -8
- package/es/components/ee-form-table/src/components/FormAuto.vue.d.ts +115 -0
- package/es/components/ee-form-table/src/components/FormDrawer.vue.d.ts +280 -7
- package/es/components/ee-form-table/src/components/TableToolbar.vue.d.ts +10 -3
- package/es/components/ee-form-table/src/constants.d.ts +2 -2
- package/es/components/ee-form-table/src/hooks/useCrud.d.ts +3 -1
- package/es/components/ee-form-table/src/hooks/useExport.d.ts +2 -0
- package/es/components/ee-form-table/src/hooks/useForm.d.ts +4 -2
- package/es/components/ee-form-table/src/hooks/useTable.d.ts +28 -11
- package/es/components/ee-form-table/src/index.vue.d.ts +33 -2
- package/es/components/ee-form-table/types.d.ts +86 -1
- package/es/components/ee-remote-select/index.d.ts +2 -0
- package/es/components/ee-remote-select/src/index.vue.d.ts +30 -0
- package/es/components/ee-remote-select/type.d.ts +53 -0
- package/es/components/ee-role-select/index.d.ts +2 -0
- package/es/components/ee-role-select/src/index.vue.d.ts +29 -0
- package/es/components/ee-role-select/type.d.ts +44 -0
- package/es/components/ee-search-bar/src/index.vue.d.ts +80 -10
- package/es/components/ee-status-tag/src/index.vue.d.ts +1 -1
- package/es/components/ee-user-select/index.d.ts +2 -0
- package/es/components/ee-user-select/src/index.vue.d.ts +29 -0
- package/es/components/ee-user-select/type.d.ts +46 -0
- package/es/hooks/index.d.ts +4 -0
- package/es/hooks/useRemoteSelectPagination.d.ts +68 -0
- package/es/hooks/useSelectEcho.d.ts +27 -0
- package/es/index.d.ts +50 -2
- package/es/index.mjs +3119 -1092
- package/es/locale/en.d.ts +3 -0
- package/es/locale/index.d.ts +91 -0
- package/es/locale/useLocale.d.ts +13 -0
- package/es/locale/zh-cn.d.ts +3 -0
- package/es/style.css +1 -1
- package/es/utils/types.d.ts +39 -0
- package/lib/charts/BaseBar/index.d.ts +2 -0
- package/lib/charts/BaseBar/src/index.vue.d.ts +45 -0
- package/lib/charts/BaseLine/index.d.ts +2 -0
- package/lib/charts/BaseLine/src/index.vue.d.ts +47 -0
- package/lib/charts/BasePie/index.d.ts +2 -0
- package/lib/charts/BasePie/src/index.vue.d.ts +41 -0
- package/lib/charts/BaseRadar/index.d.ts +2 -0
- package/lib/charts/BaseRadar/src/index.vue.d.ts +47 -0
- package/lib/charts/config.d.ts +32 -0
- package/lib/charts/index.d.ts +8 -0
- package/lib/charts/useChart.d.ts +21 -0
- package/lib/components/ee-dept-cascader/index.d.ts +2 -0
- package/lib/components/ee-dept-cascader/src/index.vue.d.ts +26 -0
- package/lib/components/ee-dept-cascader/type.d.ts +39 -0
- package/lib/components/ee-dict-select/src/index.vue.d.ts +19 -18
- package/lib/components/ee-dict-select/type.d.ts +54 -0
- package/lib/components/ee-form-dialog/src/index.vue.d.ts +108 -8
- package/lib/components/ee-form-table/src/components/FormAuto.vue.d.ts +115 -0
- package/lib/components/ee-form-table/src/components/FormDrawer.vue.d.ts +280 -7
- package/lib/components/ee-form-table/src/components/TableToolbar.vue.d.ts +10 -3
- package/lib/components/ee-form-table/src/constants.d.ts +2 -2
- package/lib/components/ee-form-table/src/hooks/useCrud.d.ts +3 -1
- package/lib/components/ee-form-table/src/hooks/useExport.d.ts +2 -0
- package/lib/components/ee-form-table/src/hooks/useForm.d.ts +4 -2
- package/lib/components/ee-form-table/src/hooks/useTable.d.ts +28 -11
- package/lib/components/ee-form-table/src/index.vue.d.ts +33 -2
- package/lib/components/ee-form-table/types.d.ts +86 -1
- package/lib/components/ee-remote-select/index.d.ts +2 -0
- package/lib/components/ee-remote-select/src/index.vue.d.ts +30 -0
- package/lib/components/ee-remote-select/type.d.ts +53 -0
- package/lib/components/ee-role-select/index.d.ts +2 -0
- package/lib/components/ee-role-select/src/index.vue.d.ts +29 -0
- package/lib/components/ee-role-select/type.d.ts +44 -0
- package/lib/components/ee-search-bar/src/index.vue.d.ts +80 -10
- package/lib/components/ee-status-tag/src/index.vue.d.ts +1 -1
- package/lib/components/ee-user-select/index.d.ts +2 -0
- package/lib/components/ee-user-select/src/index.vue.d.ts +29 -0
- package/lib/components/ee-user-select/type.d.ts +46 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/useRemoteSelectPagination.d.ts +68 -0
- package/lib/hooks/useSelectEcho.d.ts +27 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +50 -2
- package/lib/locale/en.d.ts +3 -0
- package/lib/locale/index.d.ts +91 -0
- package/lib/locale/useLocale.d.ts +13 -0
- package/lib/locale/zh-cn.d.ts +3 -0
- package/lib/style.css +1 -1
- package/lib/utils/types.d.ts +39 -0
- package/package.json +5 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
|
+
import { default as EeBaseBar } from './BaseBar';
|
|
3
|
+
import { default as EeBaseLine } from './BaseLine';
|
|
4
|
+
import { default as EeBasePie } from './BasePie';
|
|
5
|
+
import { default as EeBaseRadar } from './BaseRadar';
|
|
6
|
+
export { EeBaseBar, EeBaseLine, EeBasePie, EeBaseRadar };
|
|
7
|
+
/** 图表组件集合,供 app.use() 批量注册 */
|
|
8
|
+
export declare const chartComponents: Plugin[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import * as echarts from 'echarts';
|
|
3
|
+
export interface UseChartOptions {
|
|
4
|
+
/** 是否启用自适应 resize */
|
|
5
|
+
isAutoResize?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 创建图表控制器
|
|
9
|
+
*
|
|
10
|
+
* @param domRef - 图表容器 DOM 引用
|
|
11
|
+
* @param options - 配置项
|
|
12
|
+
*/
|
|
13
|
+
export declare function useChart(domRef: Ref<HTMLElement | undefined>, options?: UseChartOptions): {
|
|
14
|
+
instance: import('vue').ShallowRef<echarts.ECharts | undefined, echarts.ECharts | undefined>;
|
|
15
|
+
isReady: Ref<boolean, boolean>;
|
|
16
|
+
setOption: (option: Record<string, any>, notMerge?: boolean) => void;
|
|
17
|
+
handleResize: () => void;
|
|
18
|
+
showLoading: () => void;
|
|
19
|
+
hideLoading: () => void;
|
|
20
|
+
destroy: () => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EeDeptCascaderProps } from '../type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<EeDeptCascaderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
+
clear: () => any;
|
|
4
|
+
"update:modelValue": (val: any) => any;
|
|
5
|
+
change: (val: any) => any;
|
|
6
|
+
blur: (evt: FocusEvent) => any;
|
|
7
|
+
focus: (evt: FocusEvent) => any;
|
|
8
|
+
"load-success": (options: any[]) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<EeDeptCascaderProps> & Readonly<{
|
|
10
|
+
onClear?: (() => any) | undefined;
|
|
11
|
+
"onUpdate:modelValue"?: ((val: any) => any) | undefined;
|
|
12
|
+
onChange?: ((val: any) => any) | undefined;
|
|
13
|
+
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
14
|
+
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
15
|
+
"onLoad-success"?: ((options: any[]) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
labelField: string;
|
|
18
|
+
valueField: string;
|
|
19
|
+
size: "large" | "default" | "small";
|
|
20
|
+
detailEchoUrl: string;
|
|
21
|
+
clearable: boolean;
|
|
22
|
+
deptApiUrl: string;
|
|
23
|
+
childrenField: string;
|
|
24
|
+
showAllLevels: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
/** EeDeptCascader 组件属性 */
|
|
3
|
+
export interface EeDeptCascaderProps {
|
|
4
|
+
/** 双向绑定值 */
|
|
5
|
+
modelValue?: string | number | (string | number)[];
|
|
6
|
+
/** 部门树形接口地址,默认 /api/system/dept/tree */
|
|
7
|
+
deptApiUrl?: string;
|
|
8
|
+
/** 详情回显接口地址,默认 /api/system/dept/detail */
|
|
9
|
+
detailEchoUrl?: string;
|
|
10
|
+
/** 选项 label 字段名,默认 label */
|
|
11
|
+
labelField?: string;
|
|
12
|
+
/** 选项 value 字段名,默认 value */
|
|
13
|
+
valueField?: string;
|
|
14
|
+
/** 树形子节点字段名,默认 children */
|
|
15
|
+
childrenField?: string;
|
|
16
|
+
/** 是否展示完整层级路径,默认 true */
|
|
17
|
+
showAllLevels?: boolean;
|
|
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
|
+
size?: 'large' | 'default' | 'small';
|
|
30
|
+
}
|
|
31
|
+
/** EeDeptCascader 组件事件 */
|
|
32
|
+
export interface EeDeptCascaderEmits {
|
|
33
|
+
(e: 'update:modelValue', val: string | number | (string | number)[]): void;
|
|
34
|
+
(e: 'change', val: string | number | (string | number)[]): void;
|
|
35
|
+
(e: 'clear'): void;
|
|
36
|
+
(e: 'blur', evt: FocusEvent): void;
|
|
37
|
+
(e: 'focus', evt: FocusEvent): void;
|
|
38
|
+
(e: 'load-success', options: any[]): void;
|
|
39
|
+
}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
options?: DictOption[];
|
|
5
|
-
request?: () => Promise<DictOption[]>;
|
|
6
|
-
valueField?: string;
|
|
7
|
-
labelField?: string;
|
|
8
|
-
size?: 'large' | 'default' | 'small';
|
|
9
|
-
};
|
|
10
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
|
-
"update:modelValue": (val: string | number | unknown[]) => any;
|
|
12
|
-
change: (val: string | number | unknown[]) => any;
|
|
1
|
+
import { EeDictSelectProps } from '../type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<EeDictSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
+
search: (keyword: string) => any;
|
|
13
4
|
clear: () => any;
|
|
14
|
-
|
|
5
|
+
"update:modelValue": (val: string | number | (string | number)[]) => any;
|
|
6
|
+
change: (val: string | number | (string | number)[]) => any;
|
|
15
7
|
blur: (evt: FocusEvent) => any;
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
8
|
+
focus: (evt: FocusEvent) => any;
|
|
9
|
+
"load-success": (options: any[]) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<EeDictSelectProps> & Readonly<{
|
|
11
|
+
onSearch?: ((keyword: string) => any) | undefined;
|
|
19
12
|
onClear?: (() => any) | undefined;
|
|
20
|
-
|
|
13
|
+
"onUpdate:modelValue"?: ((val: string | number | (string | number)[]) => any) | undefined;
|
|
14
|
+
onChange?: ((val: string | number | (string | number)[]) => any) | undefined;
|
|
21
15
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
16
|
+
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
17
|
+
"onLoad-success"?: ((options: any[]) => any) | undefined;
|
|
22
18
|
}>, {
|
|
23
|
-
|
|
19
|
+
pageSize: number;
|
|
20
|
+
searchKey: string;
|
|
24
21
|
labelField: string;
|
|
22
|
+
valueField: string;
|
|
25
23
|
size: "large" | "default" | "small";
|
|
24
|
+
mode: "single" | "multiple";
|
|
25
|
+
clearable: boolean;
|
|
26
|
+
filterable: boolean;
|
|
26
27
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
28
|
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
/** EeDictSelect 组件属性 */
|
|
3
|
+
export interface EeDictSelectProps {
|
|
4
|
+
/** 双向绑定值 */
|
|
5
|
+
modelValue?: string | number | (string | number)[];
|
|
6
|
+
/** 字典编码,传入则自动调用默认字典列表接口 */
|
|
7
|
+
dictCode?: string;
|
|
8
|
+
/** 自定义远程字典接口地址,优先级高于 dictCode,覆盖默认字典接口 */
|
|
9
|
+
apiUrl?: string;
|
|
10
|
+
/** 自定义字典详情回显接口地址,不传则使用默认字典详情接口 */
|
|
11
|
+
detailEchoUrl?: string;
|
|
12
|
+
/** 选择模式,默认 single */
|
|
13
|
+
mode?: 'single' | 'multiple';
|
|
14
|
+
/** 选项 label 字段名,默认 label */
|
|
15
|
+
labelField?: string;
|
|
16
|
+
/** 选项 value 字段名,默认 value */
|
|
17
|
+
valueField?: string;
|
|
18
|
+
/** 搜索关键词参数字段名,默认 keyword */
|
|
19
|
+
searchKey?: string;
|
|
20
|
+
/** 每页条数,默认 20 */
|
|
21
|
+
pageSize?: number;
|
|
22
|
+
/** 固定附加请求参数 */
|
|
23
|
+
extraParams?: Record<string, any>;
|
|
24
|
+
/** 外部 axios 请求实例,不传则从全局配置获取 */
|
|
25
|
+
requestInstance?: AxiosInstance;
|
|
26
|
+
/** 静态选项数据,优先级最高,传入后不走接口 */
|
|
27
|
+
options?: Array<{
|
|
28
|
+
label: string;
|
|
29
|
+
value: any;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
/** 占位符文本 */
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
/** 是否可清空,默认 true */
|
|
35
|
+
clearable?: boolean;
|
|
36
|
+
/** 是否禁用 */
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/** 是否只读 */
|
|
39
|
+
readonly?: boolean;
|
|
40
|
+
/** 是否可搜索过滤,默认 true */
|
|
41
|
+
filterable?: boolean;
|
|
42
|
+
/** 组件尺寸 */
|
|
43
|
+
size?: 'large' | 'default' | 'small';
|
|
44
|
+
}
|
|
45
|
+
/** EeDictSelect 组件事件 */
|
|
46
|
+
export interface EeDictSelectEmits {
|
|
47
|
+
(e: 'update:modelValue', val: string | number | (string | number)[]): void;
|
|
48
|
+
(e: 'change', val: string | number | (string | number)[]): void;
|
|
49
|
+
(e: 'clear'): void;
|
|
50
|
+
(e: 'blur', evt: FocusEvent): void;
|
|
51
|
+
(e: 'focus', evt: FocusEvent): void;
|
|
52
|
+
(e: 'search', keyword: string): void;
|
|
53
|
+
(e: 'load-success', options: any[]): void;
|
|
54
|
+
}
|
|
@@ -62,10 +62,60 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
62
62
|
$options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
63
63
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
64
64
|
}>, {
|
|
65
|
-
validate: (callback
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
validate: (callback
|
|
66
|
+
/**
|
|
67
|
+
* EeFormDialog 弹窗表单组件
|
|
68
|
+
*
|
|
69
|
+
* 基于 el-dialog + el-form 封装的通用弹窗表单,支持:
|
|
70
|
+
* - 自动根据 fields 配置渲染表单项
|
|
71
|
+
* - 校验规则(rules)
|
|
72
|
+
* - 提交/取消按钮
|
|
73
|
+
* - loading 状态
|
|
74
|
+
*/
|
|
75
|
+
?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
76
|
+
validateField: (props
|
|
77
|
+
/**
|
|
78
|
+
* EeFormDialog 弹窗表单组件
|
|
79
|
+
*
|
|
80
|
+
* 基于 el-dialog + el-form 封装的通用弹窗表单,支持:
|
|
81
|
+
* - 自动根据 fields 配置渲染表单项
|
|
82
|
+
* - 校验规则(rules)
|
|
83
|
+
* - 提交/取消按钮
|
|
84
|
+
* - loading 状态
|
|
85
|
+
*/
|
|
86
|
+
?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback
|
|
87
|
+
/**
|
|
88
|
+
* EeFormDialog 弹窗表单组件
|
|
89
|
+
*
|
|
90
|
+
* 基于 el-dialog + el-form 封装的通用弹窗表单,支持:
|
|
91
|
+
* - 自动根据 fields 配置渲染表单项
|
|
92
|
+
* - 校验规则(rules)
|
|
93
|
+
* - 提交/取消按钮
|
|
94
|
+
* - loading 状态
|
|
95
|
+
*/
|
|
96
|
+
?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
97
|
+
resetFields: (props
|
|
98
|
+
/**
|
|
99
|
+
* EeFormDialog 弹窗表单组件
|
|
100
|
+
*
|
|
101
|
+
* 基于 el-dialog + el-form 封装的通用弹窗表单,支持:
|
|
102
|
+
* - 自动根据 fields 配置渲染表单项
|
|
103
|
+
* - 校验规则(rules)
|
|
104
|
+
* - 提交/取消按钮
|
|
105
|
+
* - loading 状态
|
|
106
|
+
*/
|
|
107
|
+
?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
108
|
+
clearValidate: (props
|
|
109
|
+
/**
|
|
110
|
+
* EeFormDialog 弹窗表单组件
|
|
111
|
+
*
|
|
112
|
+
* 基于 el-dialog + el-form 封装的通用弹窗表单,支持:
|
|
113
|
+
* - 自动根据 fields 配置渲染表单项
|
|
114
|
+
* - 校验规则(rules)
|
|
115
|
+
* - 提交/取消按钮
|
|
116
|
+
* - loading 状态
|
|
117
|
+
*/
|
|
118
|
+
?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
69
119
|
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
70
120
|
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
71
121
|
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
@@ -111,10 +161,60 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
111
161
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
112
162
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
113
163
|
}>, "fields" | "labelWidth" | "labelPosition" | "requireAsteriskPosition" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues"> & {
|
|
114
|
-
validate: (callback
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
164
|
+
validate: (callback
|
|
165
|
+
/**
|
|
166
|
+
* EeFormDialog 弹窗表单组件
|
|
167
|
+
*
|
|
168
|
+
* 基于 el-dialog + el-form 封装的通用弹窗表单,支持:
|
|
169
|
+
* - 自动根据 fields 配置渲染表单项
|
|
170
|
+
* - 校验规则(rules)
|
|
171
|
+
* - 提交/取消按钮
|
|
172
|
+
* - loading 状态
|
|
173
|
+
*/
|
|
174
|
+
?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
175
|
+
validateField: (props
|
|
176
|
+
/**
|
|
177
|
+
* EeFormDialog 弹窗表单组件
|
|
178
|
+
*
|
|
179
|
+
* 基于 el-dialog + el-form 封装的通用弹窗表单,支持:
|
|
180
|
+
* - 自动根据 fields 配置渲染表单项
|
|
181
|
+
* - 校验规则(rules)
|
|
182
|
+
* - 提交/取消按钮
|
|
183
|
+
* - loading 状态
|
|
184
|
+
*/
|
|
185
|
+
?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback
|
|
186
|
+
/**
|
|
187
|
+
* EeFormDialog 弹窗表单组件
|
|
188
|
+
*
|
|
189
|
+
* 基于 el-dialog + el-form 封装的通用弹窗表单,支持:
|
|
190
|
+
* - 自动根据 fields 配置渲染表单项
|
|
191
|
+
* - 校验规则(rules)
|
|
192
|
+
* - 提交/取消按钮
|
|
193
|
+
* - loading 状态
|
|
194
|
+
*/
|
|
195
|
+
?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
196
|
+
resetFields: (props
|
|
197
|
+
/**
|
|
198
|
+
* EeFormDialog 弹窗表单组件
|
|
199
|
+
*
|
|
200
|
+
* 基于 el-dialog + el-form 封装的通用弹窗表单,支持:
|
|
201
|
+
* - 自动根据 fields 配置渲染表单项
|
|
202
|
+
* - 校验规则(rules)
|
|
203
|
+
* - 提交/取消按钮
|
|
204
|
+
* - loading 状态
|
|
205
|
+
*/
|
|
206
|
+
?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
207
|
+
clearValidate: (props
|
|
208
|
+
/**
|
|
209
|
+
* EeFormDialog 弹窗表单组件
|
|
210
|
+
*
|
|
211
|
+
* 基于 el-dialog + el-form 封装的通用弹窗表单,支持:
|
|
212
|
+
* - 自动根据 fields 配置渲染表单项
|
|
213
|
+
* - 校验规则(rules)
|
|
214
|
+
* - 提交/取消按钮
|
|
215
|
+
* - loading 状态
|
|
216
|
+
*/
|
|
217
|
+
?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
118
218
|
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
119
219
|
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
120
220
|
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { TableColumn, DictOption } from '../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
formData: Record<string, any>;
|
|
4
|
+
columns: TableColumn[];
|
|
5
|
+
formMode: 'add' | 'edit';
|
|
6
|
+
formCols: number;
|
|
7
|
+
formLabelWidth: string;
|
|
8
|
+
size?: 'large' | 'default' | 'small';
|
|
9
|
+
dictMap?: Record<string, DictOption[]>;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
12
|
+
validate: () => import('element-plus').FormValidationResult | undefined;
|
|
13
|
+
resetFields: () => void | undefined;
|
|
14
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
|
+
formRef: ({
|
|
16
|
+
$: import('vue').ComponentInternalInstance;
|
|
17
|
+
$data: {};
|
|
18
|
+
$props: {
|
|
19
|
+
readonly model?: Record<string, any> | undefined;
|
|
20
|
+
readonly rules?: import('element-plus').FormRules | undefined;
|
|
21
|
+
readonly labelPosition?: "left" | "right" | "top" | undefined;
|
|
22
|
+
readonly requireAsteriskPosition?: "left" | "right" | undefined;
|
|
23
|
+
readonly labelWidth?: string | number | undefined;
|
|
24
|
+
readonly labelSuffix?: string | undefined;
|
|
25
|
+
readonly inline?: boolean | undefined;
|
|
26
|
+
readonly inlineMessage?: boolean | undefined;
|
|
27
|
+
readonly statusIcon?: boolean | undefined;
|
|
28
|
+
readonly showMessage?: boolean | undefined;
|
|
29
|
+
readonly validateOnRuleChange?: boolean | undefined;
|
|
30
|
+
readonly hideRequiredAsterisk?: boolean | undefined;
|
|
31
|
+
readonly scrollToError?: boolean | undefined;
|
|
32
|
+
readonly scrollIntoViewOptions?: (ScrollIntoViewOptions | boolean) | undefined;
|
|
33
|
+
readonly size?: import('element-plus').ComponentSize | undefined;
|
|
34
|
+
readonly disabled?: boolean | undefined;
|
|
35
|
+
readonly onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined | undefined;
|
|
36
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
37
|
+
$attrs: import('vue').Attrs;
|
|
38
|
+
$refs: {
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
};
|
|
41
|
+
$slots: Readonly<{
|
|
42
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
45
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
46
|
+
$host: Element | null;
|
|
47
|
+
$emit: (event: "validate", prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
48
|
+
$el: any;
|
|
49
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
50
|
+
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
51
|
+
}>, {
|
|
52
|
+
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
53
|
+
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
54
|
+
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
55
|
+
clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
56
|
+
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
57
|
+
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
58
|
+
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
59
|
+
setInitialValues: (initModel: Record<string, any>) => void;
|
|
60
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
61
|
+
validate: (prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
62
|
+
}, string, {
|
|
63
|
+
labelWidth: string | number;
|
|
64
|
+
labelPosition: "left" | "right" | "top";
|
|
65
|
+
requireAsteriskPosition: "left" | "right";
|
|
66
|
+
labelSuffix: string;
|
|
67
|
+
showMessage: boolean;
|
|
68
|
+
validateOnRuleChange: boolean;
|
|
69
|
+
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
70
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
71
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
72
|
+
created?: (() => void) | (() => void)[];
|
|
73
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
74
|
+
mounted?: (() => void) | (() => void)[];
|
|
75
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
76
|
+
updated?: (() => void) | (() => void)[];
|
|
77
|
+
activated?: (() => void) | (() => void)[];
|
|
78
|
+
deactivated?: (() => void) | (() => void)[];
|
|
79
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
80
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
81
|
+
destroyed?: (() => void) | (() => void)[];
|
|
82
|
+
unmounted?: (() => void) | (() => void)[];
|
|
83
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
84
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
85
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
86
|
+
};
|
|
87
|
+
$forceUpdate: () => void;
|
|
88
|
+
$nextTick: typeof import('vue').nextTick;
|
|
89
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
90
|
+
} & Readonly<{
|
|
91
|
+
labelWidth: string | number;
|
|
92
|
+
labelPosition: "left" | "right" | "top";
|
|
93
|
+
requireAsteriskPosition: "left" | "right";
|
|
94
|
+
labelSuffix: string;
|
|
95
|
+
showMessage: boolean;
|
|
96
|
+
validateOnRuleChange: boolean;
|
|
97
|
+
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
98
|
+
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
99
|
+
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
100
|
+
}>, "fields" | "labelWidth" | "labelPosition" | "requireAsteriskPosition" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues"> & {
|
|
101
|
+
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
102
|
+
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
103
|
+
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
104
|
+
clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
105
|
+
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
106
|
+
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
107
|
+
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
108
|
+
setInitialValues: (initModel: Record<string, any>) => void;
|
|
109
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
110
|
+
$slots: {
|
|
111
|
+
default?: (props: {}) => any;
|
|
112
|
+
};
|
|
113
|
+
}) | null;
|
|
114
|
+
}, any>;
|
|
115
|
+
export default _default;
|