@es-plus/vue3 1.4.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 (49) hide show
  1. package/README.md +1279 -0
  2. package/dist/es-plus.js +2922 -0
  3. package/dist/es-plus.js.map +1 -0
  4. package/dist/es-plus.umd.cjs +2 -0
  5. package/dist/es-plus.umd.cjs.map +1 -0
  6. package/dist/index.d.ts +3 -0
  7. package/dist/resolver.cjs +101 -0
  8. package/dist/resolver.d.ts +25 -0
  9. package/dist/resolver.mjs +78 -0
  10. package/dist/src/components/es-crud-page/index.d.ts +4 -0
  11. package/dist/src/components/es-crud-page/src/es-crud-page.vue.d.ts +78 -0
  12. package/dist/src/components/es-crud-page/src/types.d.ts +180 -0
  13. package/dist/src/components/es-dialog/index.d.ts +3 -0
  14. package/dist/src/components/es-dialog/src/component.vue.d.ts +60 -0
  15. package/dist/src/components/es-dialog/src/use-dialog.d.ts +16 -0
  16. package/dist/src/components/es-form/index.d.ts +3 -0
  17. package/dist/src/components/es-form/src/es-form.vue.d.ts +83 -0
  18. package/dist/src/components/es-table/index.d.ts +3 -0
  19. package/dist/src/components/es-table/src/column-item.vue.d.ts +82 -0
  20. package/dist/src/components/es-table/src/component.vue.d.ts +154 -0
  21. package/dist/src/components/es-table/src/engines/types.d.ts +25 -0
  22. package/dist/src/components/es-table/src/engines/use-column-adapter.d.ts +44 -0
  23. package/dist/src/components/es-table/src/engines/use-virtual-selection.d.ts +13 -0
  24. package/dist/src/components/es-table/src/engines/use-virtual-sort.d.ts +24 -0
  25. package/dist/src/components/es-table/src/engines/virtual-engine.vue.d.ts +63 -0
  26. package/dist/src/components/es-table/src/table-btns.vue.d.ts +19 -0
  27. package/dist/src/components/svg-icon/index.d.ts +3 -0
  28. package/dist/src/components/svg-icon/src/svg-icon.vue.d.ts +17 -0
  29. package/dist/src/composables/use-form-inputs.d.ts +12 -0
  30. package/dist/src/composables/use-form-layout.d.ts +51 -0
  31. package/dist/src/composables/use-form-request.d.ts +18 -0
  32. package/dist/src/composables/use-table-resize.d.ts +19 -0
  33. package/dist/src/composables/use-table-selection.d.ts +16 -0
  34. package/dist/src/config.d.ts +10 -0
  35. package/dist/src/index.d.ts +17 -0
  36. package/dist/src/resolver.d.ts +44 -0
  37. package/dist/src/style.d.ts +0 -0
  38. package/dist/src/types/index.d.ts +174 -0
  39. package/dist/src/utils/shared.d.ts +17 -0
  40. package/dist/style.css +1 -0
  41. package/package.json +90 -0
  42. package/schemas/README.md +83 -0
  43. package/schemas/api-params.schema.json +36 -0
  44. package/schemas/btn-config.schema.json +77 -0
  45. package/schemas/dialog-options.schema.json +149 -0
  46. package/schemas/form-item.schema.json +146 -0
  47. package/schemas/index.schema.json +71 -0
  48. package/schemas/table-column.schema.json +118 -0
  49. package/schemas/table-options.schema.json +141 -0
@@ -0,0 +1,3 @@
1
+ export * from './src/index'
2
+ import EsPlus from './src/index'
3
+ export default EsPlus
@@ -0,0 +1,101 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var resolver_exports = {};
19
+ __export(resolver_exports, {
20
+ EsPlusResolver: () => EsPlusResolver,
21
+ default: () => resolver_default
22
+ });
23
+ module.exports = __toCommonJS(resolver_exports);
24
+ const EP_INTERNAL_DEPS = [
25
+ "config-provider",
26
+ "form",
27
+ "form-item",
28
+ "input",
29
+ "select",
30
+ "option",
31
+ "button",
32
+ "row",
33
+ "col",
34
+ "table",
35
+ "table-column",
36
+ "pagination",
37
+ "dialog",
38
+ "icon",
39
+ "tag",
40
+ "dropdown",
41
+ "dropdown-menu",
42
+ "dropdown-item",
43
+ "date-picker",
44
+ "time-picker",
45
+ "cascader",
46
+ "radio",
47
+ "radio-group",
48
+ "checkbox",
49
+ "checkbox-group",
50
+ "switch",
51
+ "slider",
52
+ "rate",
53
+ "color-picker",
54
+ "transfer",
55
+ "upload",
56
+ "loading",
57
+ "message",
58
+ "message-box",
59
+ "breadcrumb",
60
+ "breadcrumb-item"
61
+ ];
62
+ const ES_PLUS_COMPONENTS = {
63
+ EsTable: "@es-plus/vue3",
64
+ EsForm: "@es-plus/vue3",
65
+ EsDialog: "@es-plus/vue3",
66
+ EsCrudPage: "@es-plus/vue3",
67
+ SvgIcon: "@es-plus/vue3"
68
+ };
69
+ function getSideEffects(options) {
70
+ const effects = ["@es-plus/vue3/dist/style.css"];
71
+ if (options.importElementStyles !== false) {
72
+ const stylePath = options.importStyle === "sass" ? "style/index" : "style/css";
73
+ for (const comp of EP_INTERNAL_DEPS) {
74
+ effects.push(`element-plus/es/components/${comp}/${stylePath}`);
75
+ }
76
+ }
77
+ return effects;
78
+ }
79
+ function EsPlusResolver(options = {}) {
80
+ let sideEffects;
81
+ return {
82
+ type: "component",
83
+ resolve(name) {
84
+ if (name in ES_PLUS_COMPONENTS) {
85
+ if (!sideEffects) {
86
+ sideEffects = getSideEffects(options);
87
+ }
88
+ return {
89
+ name,
90
+ from: ES_PLUS_COMPONENTS[name],
91
+ sideEffects
92
+ };
93
+ }
94
+ }
95
+ };
96
+ }
97
+ var resolver_default = EsPlusResolver;
98
+ // Annotate the CommonJS export names for ESM import in node:
99
+ 0 && (module.exports = {
100
+ EsPlusResolver
101
+ });
@@ -0,0 +1,25 @@
1
+ export interface EsPlusResolverOptions {
2
+ /**
3
+ * 是否自动注入 es-plus 内部依赖的 Element Plus 组件样式
4
+ * @default true
5
+ */
6
+ importElementStyles?: boolean
7
+ /**
8
+ * Element Plus 样式导入方式
9
+ * - 'css': 导入编译后的 CSS
10
+ * - 'sass': 导入 SASS 源文件
11
+ * @default 'css'
12
+ */
13
+ importStyle?: 'css' | 'sass'
14
+ }
15
+
16
+ export declare function EsPlusResolver(options?: EsPlusResolverOptions): {
17
+ type: 'component'
18
+ resolve(name: string): {
19
+ name: string
20
+ from: string
21
+ sideEffects: string[]
22
+ } | undefined
23
+ }
24
+
25
+ export default EsPlusResolver
@@ -0,0 +1,78 @@
1
+ const EP_INTERNAL_DEPS = [
2
+ "config-provider",
3
+ "form",
4
+ "form-item",
5
+ "input",
6
+ "select",
7
+ "option",
8
+ "button",
9
+ "row",
10
+ "col",
11
+ "table",
12
+ "table-column",
13
+ "pagination",
14
+ "dialog",
15
+ "icon",
16
+ "tag",
17
+ "dropdown",
18
+ "dropdown-menu",
19
+ "dropdown-item",
20
+ "date-picker",
21
+ "time-picker",
22
+ "cascader",
23
+ "radio",
24
+ "radio-group",
25
+ "checkbox",
26
+ "checkbox-group",
27
+ "switch",
28
+ "slider",
29
+ "rate",
30
+ "color-picker",
31
+ "transfer",
32
+ "upload",
33
+ "loading",
34
+ "message",
35
+ "message-box",
36
+ "breadcrumb",
37
+ "breadcrumb-item"
38
+ ];
39
+ const ES_PLUS_COMPONENTS = {
40
+ EsTable: "@es-plus/vue3",
41
+ EsForm: "@es-plus/vue3",
42
+ EsDialog: "@es-plus/vue3",
43
+ EsCrudPage: "@es-plus/vue3",
44
+ SvgIcon: "@es-plus/vue3"
45
+ };
46
+ function getSideEffects(options) {
47
+ const effects = ["@es-plus/vue3/dist/style.css"];
48
+ if (options.importElementStyles !== false) {
49
+ const stylePath = options.importStyle === "sass" ? "style/index" : "style/css";
50
+ for (const comp of EP_INTERNAL_DEPS) {
51
+ effects.push(`element-plus/es/components/${comp}/${stylePath}`);
52
+ }
53
+ }
54
+ return effects;
55
+ }
56
+ function EsPlusResolver(options = {}) {
57
+ let sideEffects;
58
+ return {
59
+ type: "component",
60
+ resolve(name) {
61
+ if (name in ES_PLUS_COMPONENTS) {
62
+ if (!sideEffects) {
63
+ sideEffects = getSideEffects(options);
64
+ }
65
+ return {
66
+ name,
67
+ from: ES_PLUS_COMPONENTS[name],
68
+ sideEffects
69
+ };
70
+ }
71
+ }
72
+ };
73
+ }
74
+ var resolver_default = EsPlusResolver;
75
+ export {
76
+ EsPlusResolver,
77
+ resolver_default as default
78
+ };
@@ -0,0 +1,4 @@
1
+ import { default as EsCrudPage } from './src/es-crud-page.vue';
2
+
3
+ export default EsCrudPage;
4
+ export type { CrudPageSchema, CrudAction, CrudPageProps, CrudPageEmits, CrudPageExpose, CrudBtnConfig, TableBtnConfig, OperationColumnConfig, RowBtnConfig, RowBtnContext, CrudDialogConfig, DialogRenderContext, DialogBtnConfig, DialogActionContext } from './src/types';
@@ -0,0 +1,78 @@
1
+ import { CrudPageSchema } from './types';
2
+
3
+ declare function openDialog(key: string, row?: Record<string, unknown>): void;
4
+ declare function closeDialog(key: string): void;
5
+ declare function refresh(): void;
6
+ declare function getSelectedRows(): Record<string, unknown>[];
7
+ declare function __VLS_template(): Partial<Record<NonNullable<string | number>, (_: any) => any>>;
8
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
9
+ schema: CrudPageSchema;
10
+ httpRequest?: (params: Record<string, unknown>) => Promise<unknown>;
11
+ autoLoad?: boolean;
12
+ }>, {
13
+ autoLoad: boolean;
14
+ }>>, {
15
+ refresh: typeof refresh;
16
+ getSelectedRows: typeof getSelectedRows;
17
+ tableRef: import('vue').Ref<any, any>;
18
+ formRef: import('vue').Ref<any, any>;
19
+ queryModel: Record<string, unknown>;
20
+ openDialog: typeof openDialog;
21
+ closeDialog: typeof closeDialog;
22
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
+ delete: (row: Record<string, unknown>) => void;
24
+ add: () => void;
25
+ query: (model: Record<string, unknown>) => void;
26
+ view: (row: Record<string, unknown>) => void;
27
+ "row-click": (row: Record<string, unknown>) => void;
28
+ edit: (row: Record<string, unknown>) => void;
29
+ export: (model: Record<string, unknown>) => void;
30
+ "btn-click": (key: string, payload?: Record<string, unknown>) => void;
31
+ "dialog-confirm": (dialogKey: string, data: Record<string, unknown>) => void;
32
+ "dialog-cancel": (dialogKey: string) => void;
33
+ "dialog-open": (dialogKey: string, row?: Record<string, unknown>) => void;
34
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
35
+ schema: CrudPageSchema;
36
+ httpRequest?: (params: Record<string, unknown>) => Promise<unknown>;
37
+ autoLoad?: boolean;
38
+ }>, {
39
+ autoLoad: boolean;
40
+ }>>> & Readonly<{
41
+ onDelete?: (row: Record<string, unknown>) => any;
42
+ onAdd?: () => any;
43
+ onQuery?: (model: Record<string, unknown>) => any;
44
+ onView?: (row: Record<string, unknown>) => any;
45
+ "onRow-click"?: (row: Record<string, unknown>) => any;
46
+ onEdit?: (row: Record<string, unknown>) => any;
47
+ onExport?: (model: Record<string, unknown>) => any;
48
+ "onBtn-click"?: (key: string, payload?: Record<string, unknown>) => any;
49
+ "onDialog-confirm"?: (dialogKey: string, data: Record<string, unknown>) => any;
50
+ "onDialog-cancel"?: (dialogKey: string) => any;
51
+ "onDialog-open"?: (dialogKey: string, row?: Record<string, unknown>) => any;
52
+ }>, {
53
+ autoLoad: boolean;
54
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
55
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
56
+ export default _default;
57
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
58
+ type __VLS_TypePropsToRuntimeProps<T> = {
59
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
60
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
61
+ } : {
62
+ type: import('vue').PropType<T[K]>;
63
+ required: true;
64
+ };
65
+ };
66
+ type __VLS_WithDefaults<P, D> = {
67
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
68
+ default: D[K];
69
+ }> : P[K];
70
+ };
71
+ type __VLS_Prettify<T> = {
72
+ [K in keyof T]: T[K];
73
+ } & {};
74
+ type __VLS_WithTemplateSlots<T, S> = T & {
75
+ new (): {
76
+ $slots: S;
77
+ };
78
+ };
@@ -0,0 +1,180 @@
1
+ import { VNode } from 'vue';
2
+ import { FormItemOption, BtnConfig, TableColumn, TableOptions, PaginationConfig, DialogOptions } from '../../../types';
3
+
4
+ export interface CrudPageSchema {
5
+ /** 查询表单字段配置 */
6
+ formItems?: FormItemOption[];
7
+ /** 表单布局配置 */
8
+ formLayout?: {
9
+ span?: number;
10
+ labelWidth?: string | number;
11
+ minFoldRows?: number;
12
+ };
13
+ /** 工具栏按钮(显式声明,替代从 actions 自动生成,渲染在 EsForm 按钮区域) */
14
+ toolbarBtns?: CrudBtnConfig[];
15
+ /** 表格工具栏按钮(渲染在 EsTable 上方的 configBtn 区域,code:1=左侧 code:2=右侧) */
16
+ tableBtns?: TableBtnConfig[];
17
+ /** 表格列配置 */
18
+ columns: TableColumn[];
19
+ /** 表格选项配置 */
20
+ tableOptions?: Partial<TableOptions>;
21
+ /** 分页配置 */
22
+ pagination?: PaginationConfig;
23
+ /** 操作列配置(false = 不显示操作列) */
24
+ operationColumn?: OperationColumnConfig | false;
25
+ /** 多弹窗配置(key 作为弹窗标识,按钮通过 dialogKey 绑定) */
26
+ dialogs?: Record<string, CrudDialogConfig>;
27
+ /** @deprecated 使用 toolbarBtns + operationColumn 替代 */
28
+ actions?: CrudAction[];
29
+ /** @deprecated 使用 dialogs 替代 */
30
+ dialogFormItems?: FormItemOption[];
31
+ /** @deprecated 使用 dialogs 替代 */
32
+ dialogOptions?: Partial<DialogOptions>;
33
+ /** @deprecated 使用 toolbarBtns 替代 */
34
+ queryBtns?: BtnConfig[];
35
+ }
36
+ export interface CrudBtnConfig extends BtnConfig {
37
+ /** 点击时打开的弹窗 key */
38
+ dialogKey?: string;
39
+ /** 语义动作类型(用于事件 emit) */
40
+ actionType?: string;
41
+ /** 点击前确认提示(true = 默认提示文字,string = 自定义提示文字) */
42
+ confirm?: string | boolean;
43
+ }
44
+ export interface TableBtnConfig extends CrudBtnConfig {
45
+ /** 按钮位置:1=左侧(默认),2=右侧 */
46
+ code?: 1 | 2;
47
+ }
48
+ export interface OperationColumnConfig {
49
+ /** 列标题,默认 '操作' */
50
+ label?: string;
51
+ /** 列宽 */
52
+ width?: number | string;
53
+ /** 固定方向,默认 'right' */
54
+ fixed?: boolean | string;
55
+ /** 行操作按钮列表 */
56
+ btns: RowBtnConfig[];
57
+ }
58
+ export interface RowBtnConfig {
59
+ /** 按钮文字 */
60
+ name: string;
61
+ /** 按钮标识 key */
62
+ key?: string;
63
+ /** 按钮类型 */
64
+ type?: string;
65
+ /** 图标 */
66
+ icon?: string;
67
+ /** 权限标识 */
68
+ permissionValue?: string;
69
+ /** 点击时打开的弹窗 key,自动将当前行数据传入弹窗 */
70
+ dialogKey?: string;
71
+ /** 点击前确认提示(如删除确认) */
72
+ confirm?: string | boolean;
73
+ /** 是否隐藏(支持动态判断) */
74
+ hidden?: boolean | ((row: Record<string, unknown>) => boolean);
75
+ /** 自定义点击处理 */
76
+ click?: (row: Record<string, unknown>, context: RowBtnContext) => void;
77
+ }
78
+ export interface RowBtnContext {
79
+ /** 刷新表格数据 */
80
+ refresh: () => void;
81
+ /** 获取表格选中行 */
82
+ getSelectedRows: () => Record<string, unknown>[];
83
+ /** 主动打开某个弹窗 */
84
+ openDialog: (key: string, row?: Record<string, unknown>) => void;
85
+ }
86
+ export interface CrudDialogConfig {
87
+ /** 弹窗标题(支持动态标题) */
88
+ title?: string | ((row?: Record<string, unknown>) => string);
89
+ /** 弹窗宽度 */
90
+ width?: string | number;
91
+ /** 内容模式 1:表单字段(简单场景) */
92
+ formItems?: FormItemOption[];
93
+ /** 表单布局 */
94
+ formLayout?: {
95
+ span?: number;
96
+ labelWidth?: string | number;
97
+ };
98
+ /** 内容模式 2:自定义渲染(复杂场景) */
99
+ render?: (h: any, context: DialogRenderContext) => VNode | any;
100
+ /** 弹窗底部按钮(不传则根据 onConfirm 自动生成取消+确定) */
101
+ configBtn?: DialogBtnConfig[];
102
+ /** 可拖拽 */
103
+ isDraggable?: boolean;
104
+ /** 最大高度 */
105
+ maxHeight?: string | number;
106
+ /** 全屏 */
107
+ fullscreen?: boolean;
108
+ /** 隐藏底部 */
109
+ isHiddenFooter?: boolean;
110
+ /** 弹窗打开时回调 */
111
+ onOpen?: (row?: Record<string, unknown>) => void;
112
+ /** 确认回调(未提供 configBtn 时自动生成确认按钮调用此方法) */
113
+ onConfirm?: (data: Record<string, unknown>, context: DialogActionContext) => void | Promise<void>;
114
+ /** 弹窗关闭时回调 */
115
+ onClose?: () => void;
116
+ }
117
+ export interface DialogRenderContext {
118
+ /** 打开弹窗时传入的行数据 */
119
+ row: Record<string, unknown>;
120
+ /** 响应式表单模型 */
121
+ model: Record<string, unknown>;
122
+ /** 注册组件引用(供 footer 按钮通过 getRefs 访问) */
123
+ registerRef: (name: string, el: any) => void;
124
+ /** 关闭弹窗 */
125
+ close: () => void;
126
+ /** 刷新表格 */
127
+ refresh: () => void;
128
+ }
129
+ export interface DialogBtnConfig extends BtnConfig {
130
+ /** 按钮行为类型 */
131
+ action?: 'confirm' | 'cancel' | 'custom';
132
+ }
133
+ export interface DialogActionContext {
134
+ /** 关闭弹窗 */
135
+ close: () => void;
136
+ /** 刷新表格数据 */
137
+ refresh: () => void;
138
+ /** 获取弹窗内组件引用 */
139
+ getRefs: (name?: string) => any;
140
+ /** 当前行数据 */
141
+ row: Record<string, unknown>;
142
+ }
143
+ export type CrudAction = 'add' | 'edit' | 'delete' | 'view' | 'export' | 'import';
144
+ export interface CrudPageProps {
145
+ /** CRUD 页面完整配置 */
146
+ schema: CrudPageSchema;
147
+ /** 自定义 HTTP 请求方法 */
148
+ httpRequest?: (params: Record<string, unknown>) => Promise<unknown>;
149
+ /** 是否在挂载时自动请求数据,默认 true */
150
+ autoLoad?: boolean;
151
+ }
152
+ export interface CrudPageEmits {
153
+ (e: 'query', model: Record<string, unknown>): void;
154
+ (e: 'add'): void;
155
+ (e: 'edit', row: Record<string, unknown>): void;
156
+ (e: 'delete', row: Record<string, unknown>): void;
157
+ (e: 'view', row: Record<string, unknown>): void;
158
+ (e: 'export', model: Record<string, unknown>): void;
159
+ (e: 'row-click', row: Record<string, unknown>): void;
160
+ (e: 'btn-click', key: string, payload?: Record<string, unknown>): void;
161
+ (e: 'dialog-confirm', dialogKey: string, data: Record<string, unknown>): void;
162
+ (e: 'dialog-cancel', dialogKey: string): void;
163
+ (e: 'dialog-open', dialogKey: string, row?: Record<string, unknown>): void;
164
+ }
165
+ export interface CrudPageExpose {
166
+ /** 刷新表格数据 */
167
+ refresh: () => void;
168
+ /** 获取选中行 */
169
+ getSelectedRows: () => Record<string, unknown>[];
170
+ /** 表格组件实例 */
171
+ tableRef: any;
172
+ /** 表单组件实例 */
173
+ formRef: any;
174
+ /** 当前查询表单模型 */
175
+ queryModel: Record<string, unknown>;
176
+ /** 主动打开弹窗 */
177
+ openDialog: (key: string, row?: Record<string, unknown>) => void;
178
+ /** 主动关闭弹窗 */
179
+ closeDialog: (key: string) => void;
180
+ }
@@ -0,0 +1,3 @@
1
+ import { default as EsDialog } from './src/component.vue';
2
+
3
+ export default EsDialog;
@@ -0,0 +1,60 @@
1
+ import { BtnConfig } from '../../../types';
2
+
3
+ declare function __VLS_template(): Readonly<Record<string, any>> & Record<string, any>;
4
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
5
+ title?: string;
6
+ visible?: boolean;
7
+ appendTo?: object | string;
8
+ hiddenFullBtn?: boolean;
9
+ width?: string | number;
10
+ isDraggable?: boolean;
11
+ confirmText?: string;
12
+ cancelText?: string;
13
+ configBtn?: BtnConfig[];
14
+ maxHeight?: string | number;
15
+ isHiddenFooter?: boolean;
16
+ renderHeader?: Function;
17
+ renderFooter?: Function;
18
+ render?: Function;
19
+ fullscreen?: boolean;
20
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ submit: (payload: any) => void;
22
+ "update:visible": (val: boolean) => void;
23
+ closed: (val: boolean) => void;
24
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
25
+ title?: string;
26
+ visible?: boolean;
27
+ appendTo?: object | string;
28
+ hiddenFullBtn?: boolean;
29
+ width?: string | number;
30
+ isDraggable?: boolean;
31
+ confirmText?: string;
32
+ cancelText?: string;
33
+ configBtn?: BtnConfig[];
34
+ maxHeight?: string | number;
35
+ isHiddenFooter?: boolean;
36
+ renderHeader?: Function;
37
+ renderFooter?: Function;
38
+ render?: Function;
39
+ fullscreen?: boolean;
40
+ }>>> & Readonly<{
41
+ onSubmit?: (payload: any) => any;
42
+ "onUpdate:visible"?: (val: boolean) => any;
43
+ onClosed?: (val: boolean) => any;
44
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
45
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
46
+ export default _default;
47
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
48
+ type __VLS_TypePropsToRuntimeProps<T> = {
49
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
50
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
51
+ } : {
52
+ type: import('vue').PropType<T[K]>;
53
+ required: true;
54
+ };
55
+ };
56
+ type __VLS_WithTemplateSlots<T, S> = T & {
57
+ new (): {
58
+ $slots: S;
59
+ };
60
+ };
@@ -0,0 +1,16 @@
1
+ import { DialogOptions } from '../../../types';
2
+
3
+ export interface DialogCallable {
4
+ (dialogOptions: DialogOptions): any;
5
+ close: () => void;
6
+ }
7
+ export interface DialogCallableWithDestroy extends DialogCallable {
8
+ destroy: () => void;
9
+ }
10
+ export declare function useDialog(Component?: any, opt?: {
11
+ onlyInstance?: false;
12
+ }): DialogCallableWithDestroy;
13
+ export declare function useDialog(Component?: any, opt?: {
14
+ onlyInstance: true;
15
+ }): DialogCallable;
16
+ export default useDialog;
@@ -0,0 +1,3 @@
1
+ import { default as EsForm } from './src/es-form.vue';
2
+
3
+ export default EsForm;
@@ -0,0 +1,83 @@
1
+ import { FormItemOption, BtnConfig, LayoutFormProps } from '../../../types';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
+ model: Record<string, unknown>;
5
+ formItemList: FormItemOption[];
6
+ layoutFormProps?: LayoutFormProps;
7
+ configBtn?: BtnConfig[];
8
+ renderBtn?: Function | boolean;
9
+ btnColSpanRow?: boolean;
10
+ rules?: Record<string, unknown>;
11
+ fieldFieldOutput?: (defaults: Record<string, string>) => Record<string, string>;
12
+ }>, {
13
+ model: () => {};
14
+ formItemList: () => any[];
15
+ layoutFormProps: () => {};
16
+ configBtn: () => any[];
17
+ renderBtn: boolean;
18
+ btnColSpanRow: boolean;
19
+ rules: () => {};
20
+ }>>, {
21
+ formItmeRequestInstance: (propsList: string[]) => Promise<void>;
22
+ getFormRef: () => {
23
+ validate: () => Promise<boolean>;
24
+ resetFields: () => void;
25
+ clearValidate: (props?: string | string[]) => void;
26
+ validateField: (props: string | string[]) => Promise<boolean>;
27
+ scrollToField: (prop: string) => void;
28
+ };
29
+ validate: () => Promise<boolean>;
30
+ resetFields: () => void;
31
+ clearValidate: (props?: string | string[]) => void;
32
+ validateField: (props: string | string[]) => Promise<boolean>;
33
+ scrollToField: (prop: string) => void;
34
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
35
+ reset: (formRef: unknown, model: Record<string, unknown>) => void;
36
+ confirm: (formRef: unknown, model: Record<string, unknown>) => void;
37
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
38
+ model: Record<string, unknown>;
39
+ formItemList: FormItemOption[];
40
+ layoutFormProps?: LayoutFormProps;
41
+ configBtn?: BtnConfig[];
42
+ renderBtn?: Function | boolean;
43
+ btnColSpanRow?: boolean;
44
+ rules?: Record<string, unknown>;
45
+ fieldFieldOutput?: (defaults: Record<string, string>) => Record<string, string>;
46
+ }>, {
47
+ model: () => {};
48
+ formItemList: () => any[];
49
+ layoutFormProps: () => {};
50
+ configBtn: () => any[];
51
+ renderBtn: boolean;
52
+ btnColSpanRow: boolean;
53
+ rules: () => {};
54
+ }>>> & Readonly<{
55
+ onReset?: (formRef: unknown, model: Record<string, unknown>) => any;
56
+ onConfirm?: (formRef: unknown, model: Record<string, unknown>) => any;
57
+ }>, {
58
+ configBtn: BtnConfig[];
59
+ model: Record<string, unknown>;
60
+ formItemList: FormItemOption[];
61
+ layoutFormProps: LayoutFormProps;
62
+ renderBtn: Function | boolean;
63
+ btnColSpanRow: boolean;
64
+ rules: Record<string, unknown>;
65
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
66
+ export default _default;
67
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
68
+ type __VLS_TypePropsToRuntimeProps<T> = {
69
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
70
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
71
+ } : {
72
+ type: import('vue').PropType<T[K]>;
73
+ required: true;
74
+ };
75
+ };
76
+ type __VLS_WithDefaults<P, D> = {
77
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
78
+ default: D[K];
79
+ }> : P[K];
80
+ };
81
+ type __VLS_Prettify<T> = {
82
+ [K in keyof T]: T[K];
83
+ } & {};
@@ -0,0 +1,3 @@
1
+ import { default as EsTable } from './src/component.vue';
2
+
3
+ export default EsTable;