workdesktop-ai 1.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 (56) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/LICENSE +21 -0
  3. package/README.md +214 -0
  4. package/dist/index.esm.js +6531 -0
  5. package/dist/index.esm.js.map +1 -0
  6. package/dist/index.umd.js +11 -0
  7. package/dist/index.umd.js.map +1 -0
  8. package/dist/style.css +1 -0
  9. package/dist/types/src/components/buttons/ApiButton.vue.d.ts +96 -0
  10. package/dist/types/src/components/buttons/ConfirmButton.vue.d.ts +131 -0
  11. package/dist/types/src/components/buttons/DialogButton.vue.d.ts +107 -0
  12. package/dist/types/src/components/buttons/DrawerButton.vue.d.ts +118 -0
  13. package/dist/types/src/components/buttons/PromptButton.vue.d.ts +140 -0
  14. package/dist/types/src/components/buttons/RouteButton.vue.d.ts +84 -0
  15. package/dist/types/src/components/buttons/TipsButton.vue.d.ts +64 -0
  16. package/dist/types/src/components/buttons/useApiAction.d.ts +20 -0
  17. package/dist/types/src/components/common/props.d.ts +85 -0
  18. package/dist/types/src/components/containers/Dialog.vue.d.ts +112 -0
  19. package/dist/types/src/components/containers/Drawer.vue.d.ts +119 -0
  20. package/dist/types/src/components/containers/Iframe.vue.d.ts +44 -0
  21. package/dist/types/src/components/containers/SearchPanel.vue.d.ts +152 -0
  22. package/dist/types/src/components/containers/containerContext.d.ts +15 -0
  23. package/dist/types/src/components/containers/useContainerController.d.ts +19 -0
  24. package/dist/types/src/components/data/datagrid/DataGrid.vue.d.ts +335 -0
  25. package/dist/types/src/components/data/datagrid/useColumnSettings.d.ts +48 -0
  26. package/dist/types/src/components/data/editable-table/EditableTable.vue.d.ts +306 -0
  27. package/dist/types/src/components/form/data-form/DataForm.vue.d.ts +311 -0
  28. package/dist/types/src/components/index.d.ts +27 -0
  29. package/dist/types/src/components/inputs/AutoComplete.vue.d.ts +157 -0
  30. package/dist/types/src/components/inputs/CheckboxList.vue.d.ts +141 -0
  31. package/dist/types/src/components/inputs/RadioList.vue.d.ts +141 -0
  32. package/dist/types/src/components/inputs/Select.vue.d.ts +166 -0
  33. package/dist/types/src/components/inputs/Switch.vue.d.ts +116 -0
  34. package/dist/types/src/components/inputs/useOptionsLoader.d.ts +29 -0
  35. package/dist/types/src/components/styles/Panel.vue.d.ts +41 -0
  36. package/dist/types/src/components/styles/Tips.vue.d.ts +60 -0
  37. package/dist/types/src/components/upload/ImageUpload.vue.d.ts +176 -0
  38. package/dist/types/src/components/upload/Upload.vue.d.ts +235 -0
  39. package/dist/types/src/components/utils/Viewer.vue.d.ts +131 -0
  40. package/dist/types/src/index.d.ts +20 -0
  41. package/dist/types/src/lib/composables/useConfig.d.ts +19 -0
  42. package/dist/types/src/lib/composables/useDataGrid.d.ts +54 -0
  43. package/dist/types/src/lib/composables/useEventBus.d.ts +16 -0
  44. package/dist/types/src/lib/composables/useGlobalState.d.ts +5 -0
  45. package/dist/types/src/lib/composables/useRequest.d.ts +42 -0
  46. package/dist/types/src/lib/configs/default-config.d.ts +6 -0
  47. package/dist/types/src/lib/core/config.d.ts +28 -0
  48. package/dist/types/src/lib/core/http.d.ts +83 -0
  49. package/dist/types/src/lib/core/linkage.d.ts +48 -0
  50. package/dist/types/src/lib/core/theme.d.ts +6 -0
  51. package/dist/types/src/lib/core/utils.d.ts +28 -0
  52. package/dist/types/src/lib/install.d.ts +11 -0
  53. package/dist/types/src/types/config.d.ts +109 -0
  54. package/dist/types/src/types/index.d.ts +4 -0
  55. package/dist/types/vite.config.d.ts +2 -0
  56. package/package.json +68 -0
@@ -0,0 +1,64 @@
1
+ import type { PropType } from 'vue';
2
+ declare var __VLS_14: {}, __VLS_25: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_14) => any;
5
+ } & {
6
+ default?: (props: typeof __VLS_25) => any;
7
+ };
8
+ declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
9
+ /** 悬停提示内容 */
10
+ tips: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ /** tooltip 主题:dark/light */
15
+ tipsType: {
16
+ type: PropType<"dark" | "light">;
17
+ default: string;
18
+ };
19
+ /** 弹出位置 */
20
+ placement: {
21
+ type: PropType<"top" | "bottom" | "left" | "right" | string>;
22
+ default: string;
23
+ };
24
+ filter: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
28
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
29
+ click: (...args: any[]) => void;
30
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
31
+ /** 悬停提示内容 */
32
+ tips: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ /** tooltip 主题:dark/light */
37
+ tipsType: {
38
+ type: PropType<"dark" | "light">;
39
+ default: string;
40
+ };
41
+ /** 弹出位置 */
42
+ placement: {
43
+ type: PropType<"top" | "bottom" | "left" | "right" | string>;
44
+ default: string;
45
+ };
46
+ filter: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ }>> & Readonly<{
51
+ onClick?: ((...args: any[]) => any) | undefined;
52
+ }>, {
53
+ placement: string;
54
+ tipsType: "dark" | "light";
55
+ filter: string;
56
+ tips: string;
57
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
58
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
59
+ export default _default;
60
+ type __VLS_WithSlots<T, S> = T & {
61
+ new (): {
62
+ $slots: S;
63
+ };
64
+ };
@@ -0,0 +1,20 @@
1
+ import type { ReqOptions } from '../../types/config';
2
+ /**
3
+ * 按钮组共享:点击 → 请求 → 提示 → 联动刷新(PRD 4.4 按钮组)
4
+ * 业务失败 resolve 不抛异常;网络异常 reject。
5
+ */
6
+ export declare function useApiAction(options: {
7
+ getApi: () => string;
8
+ getMethod: () => 'get' | 'post' | 'put' | 'delete';
9
+ getParam: () => Record<string, any>;
10
+ getFilter: () => string;
11
+ getHeadRefresh: () => boolean | string;
12
+ emit: (event: any, ...args: any[]) => void;
13
+ /** 是否按钮级 loading(ApiButton buttonLoading=false 时按钮不转圈) */
14
+ buttonLoading?: () => boolean;
15
+ /** 请求附加项(pageLoading=true 时开启全局 ElLoading 遮罩) */
16
+ getReqOptions?: () => ReqOptions;
17
+ }): {
18
+ loading: import("vue").Ref<boolean, boolean>;
19
+ doRequest: (extraParam?: Record<string, any>) => Promise<boolean>;
20
+ };
@@ -0,0 +1,85 @@
1
+ /**
2
+ * 组件通用 props 与工具(PRD 4.5 通用设计约定)
3
+ */
4
+ import type { PropType } from 'vue';
5
+ /** 所有参与联动的组件共有:filter 分组标识(默认 '') */
6
+ export declare const filterProp: {
7
+ filter: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ };
12
+ /** 声明式联动:动作完成后刷新目标 DataGrid(true=同 filter 组 / 字符串=定向) */
13
+ export declare const headRefreshDatagridProp: {
14
+ headRefreshDatagrid: {
15
+ type: PropType<boolean | string>;
16
+ default: boolean;
17
+ };
18
+ };
19
+ /** API 类共享 props(按钮组 / 输入选择组 / 上传组等能力组件) */
20
+ export declare const apiProps: {
21
+ /** 请求地址(无则不请求) */
22
+ api: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ /** 请求方法 get/post/put/delete */
27
+ apiMethod: {
28
+ type: PropType<"get" | "post" | "put" | "delete">;
29
+ default: string;
30
+ };
31
+ /** 请求参数 */
32
+ apiParam: {
33
+ type: PropType<Record<string, any>>;
34
+ default: () => {};
35
+ };
36
+ };
37
+ /** 输入选择组共享 props(PRD 4.4) */
38
+ export declare const optionsProps: {
39
+ apiMethod: {
40
+ type: PropType<"get" | "post">;
41
+ default: string;
42
+ };
43
+ /** 是否自动加载选项(默认 true) */
44
+ active: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
48
+ /** 静态选项数组(与 api 二选一) */
49
+ dataSource: {
50
+ type: PropType<any[]>;
51
+ default: undefined;
52
+ };
53
+ /** 显示文本字段 */
54
+ textProp: {
55
+ type: StringConstructor;
56
+ default: string;
57
+ };
58
+ /** 值字段 */
59
+ valueProp: {
60
+ type: StringConstructor;
61
+ default: string;
62
+ };
63
+ /** 选项前插固定项 */
64
+ addData: {
65
+ type: PropType<any[]>;
66
+ default: undefined;
67
+ };
68
+ /** 选项后追加固定项 */
69
+ appendData: {
70
+ type: PropType<any[]>;
71
+ default: undefined;
72
+ };
73
+ /** 请求地址(无则不请求) */
74
+ api: {
75
+ type: StringConstructor;
76
+ default: string;
77
+ };
78
+ /** 请求参数 */
79
+ apiParam: {
80
+ type: PropType<Record<string, any>>;
81
+ default: () => {};
82
+ };
83
+ };
84
+ /** 组件 name 工具:统一 wd- 前缀 */
85
+ export declare function componentName(pascal: string): string;
@@ -0,0 +1,112 @@
1
+ import { type PropType } from 'vue';
2
+ declare var __VLS_10: {}, __VLS_12: {
3
+ close: (reason?: string) => Promise<void>;
4
+ };
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_10) => any;
7
+ } & {
8
+ footer?: (props: typeof __VLS_12) => any;
9
+ };
10
+ declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
11
+ modelValue: {
12
+ type: BooleanConstructor;
13
+ default: undefined;
14
+ };
15
+ title: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ /** iframe 地址(设置后容器内以 iframe 加载) */
20
+ url: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ /** 宽度 */
25
+ size: {
26
+ type: (NumberConstructor | StringConstructor)[];
27
+ default: string;
28
+ };
29
+ /** 关闭前确认文案(设置后关闭弹确认) */
30
+ confirmMessage: {
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
34
+ /** 容器携带数据(传给内部表单) */
35
+ data: {
36
+ type: PropType<Record<string, any>>;
37
+ default: undefined;
38
+ };
39
+ headRefreshDatagrid: {
40
+ type: PropType<boolean | string>;
41
+ default: boolean;
42
+ };
43
+ filter: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ }>, {
48
+ open: () => boolean;
49
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
50
+ close: (...args: any[]) => void;
51
+ "update:modelValue": (...args: any[]) => void;
52
+ confirm: (...args: any[]) => void;
53
+ open: (...args: any[]) => void;
54
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
55
+ modelValue: {
56
+ type: BooleanConstructor;
57
+ default: undefined;
58
+ };
59
+ title: {
60
+ type: StringConstructor;
61
+ default: string;
62
+ };
63
+ /** iframe 地址(设置后容器内以 iframe 加载) */
64
+ url: {
65
+ type: StringConstructor;
66
+ default: string;
67
+ };
68
+ /** 宽度 */
69
+ size: {
70
+ type: (NumberConstructor | StringConstructor)[];
71
+ default: string;
72
+ };
73
+ /** 关闭前确认文案(设置后关闭弹确认) */
74
+ confirmMessage: {
75
+ type: StringConstructor;
76
+ default: string;
77
+ };
78
+ /** 容器携带数据(传给内部表单) */
79
+ data: {
80
+ type: PropType<Record<string, any>>;
81
+ default: undefined;
82
+ };
83
+ headRefreshDatagrid: {
84
+ type: PropType<boolean | string>;
85
+ default: boolean;
86
+ };
87
+ filter: {
88
+ type: StringConstructor;
89
+ default: string;
90
+ };
91
+ }>> & Readonly<{
92
+ onClose?: ((...args: any[]) => any) | undefined;
93
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
94
+ onConfirm?: ((...args: any[]) => any) | undefined;
95
+ onOpen?: ((...args: any[]) => any) | undefined;
96
+ }>, {
97
+ data: Record<string, any>;
98
+ title: string;
99
+ size: string | number;
100
+ filter: string;
101
+ url: string;
102
+ modelValue: boolean;
103
+ headRefreshDatagrid: string | boolean;
104
+ confirmMessage: string;
105
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
106
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
107
+ export default _default;
108
+ type __VLS_WithSlots<T, S> = T & {
109
+ new (): {
110
+ $slots: S;
111
+ };
112
+ };
@@ -0,0 +1,119 @@
1
+ import { type PropType } from 'vue';
2
+ declare var __VLS_10: {}, __VLS_12: {
3
+ close: (reason?: string) => Promise<void>;
4
+ };
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_10) => any;
7
+ } & {
8
+ footer?: (props: typeof __VLS_12) => any;
9
+ };
10
+ declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
11
+ modelValue: {
12
+ type: BooleanConstructor;
13
+ default: undefined;
14
+ };
15
+ title: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ /** iframe 地址 */
20
+ url: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ /** 抽屉尺寸(宽度/高度) */
25
+ size: {
26
+ type: (NumberConstructor | StringConstructor)[];
27
+ default: string;
28
+ };
29
+ /** 弹出方向 rtl/ltr/ttb/btt */
30
+ direction: {
31
+ type: PropType<"rtl" | "ltr" | "ttb" | "btt">;
32
+ default: string;
33
+ };
34
+ confirmMessage: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ data: {
39
+ type: PropType<Record<string, any>>;
40
+ default: undefined;
41
+ };
42
+ headRefreshDatagrid: {
43
+ type: PropType<boolean | string>;
44
+ default: boolean;
45
+ };
46
+ filter: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ }>, {
51
+ open: () => boolean;
52
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
53
+ close: (...args: any[]) => void;
54
+ "update:modelValue": (...args: any[]) => void;
55
+ confirm: (...args: any[]) => void;
56
+ open: (...args: any[]) => void;
57
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
58
+ modelValue: {
59
+ type: BooleanConstructor;
60
+ default: undefined;
61
+ };
62
+ title: {
63
+ type: StringConstructor;
64
+ default: string;
65
+ };
66
+ /** iframe 地址 */
67
+ url: {
68
+ type: StringConstructor;
69
+ default: string;
70
+ };
71
+ /** 抽屉尺寸(宽度/高度) */
72
+ size: {
73
+ type: (NumberConstructor | StringConstructor)[];
74
+ default: string;
75
+ };
76
+ /** 弹出方向 rtl/ltr/ttb/btt */
77
+ direction: {
78
+ type: PropType<"rtl" | "ltr" | "ttb" | "btt">;
79
+ default: string;
80
+ };
81
+ confirmMessage: {
82
+ type: StringConstructor;
83
+ default: string;
84
+ };
85
+ data: {
86
+ type: PropType<Record<string, any>>;
87
+ default: undefined;
88
+ };
89
+ headRefreshDatagrid: {
90
+ type: PropType<boolean | string>;
91
+ default: boolean;
92
+ };
93
+ filter: {
94
+ type: StringConstructor;
95
+ default: string;
96
+ };
97
+ }>> & Readonly<{
98
+ onClose?: ((...args: any[]) => any) | undefined;
99
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
100
+ onConfirm?: ((...args: any[]) => any) | undefined;
101
+ onOpen?: ((...args: any[]) => any) | undefined;
102
+ }>, {
103
+ data: Record<string, any>;
104
+ title: string;
105
+ size: string | number;
106
+ filter: string;
107
+ url: string;
108
+ modelValue: boolean;
109
+ headRefreshDatagrid: string | boolean;
110
+ confirmMessage: string;
111
+ direction: "rtl" | "ltr" | "ttb" | "btt";
112
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
113
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
114
+ export default _default;
115
+ type __VLS_WithSlots<T, S> = T & {
116
+ new (): {
117
+ $slots: S;
118
+ };
119
+ };
@@ -0,0 +1,44 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ /** iframe 地址 */
3
+ src: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ /** 固定高度(数字按 px) */
8
+ height: {
9
+ type: (NumberConstructor | StringConstructor)[];
10
+ default: string;
11
+ };
12
+ /** 高度自适应(通过子页面 postMessage 上报高度) */
13
+ autoHeight: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
+ message: (...args: any[]) => void;
19
+ load: (...args: any[]) => void;
20
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
+ /** iframe 地址 */
22
+ src: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ /** 固定高度(数字按 px) */
27
+ height: {
28
+ type: (NumberConstructor | StringConstructor)[];
29
+ default: string;
30
+ };
31
+ /** 高度自适应(通过子页面 postMessage 上报高度) */
32
+ autoHeight: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ }>> & Readonly<{
37
+ onMessage?: ((...args: any[]) => any) | undefined;
38
+ onLoad?: ((...args: any[]) => any) | undefined;
39
+ }>, {
40
+ autoHeight: boolean;
41
+ height: string | number;
42
+ src: string;
43
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
44
+ export default _default;
@@ -0,0 +1,152 @@
1
+ declare function getSearchParams(): {
2
+ [x: string]: any;
3
+ };
4
+ declare function onSearch(): void;
5
+ declare function onReset(): void;
6
+ declare function expand(): void;
7
+ declare function collapse(): void;
8
+ declare function resetForm(): void;
9
+ declare var __VLS_11: {
10
+ model: Record<string, any>;
11
+ }, __VLS_13: {
12
+ search: typeof onSearch;
13
+ reset: typeof onReset;
14
+ };
15
+ type __VLS_Slots = {} & {
16
+ default?: (props: typeof __VLS_11) => any;
17
+ } & {
18
+ actions?: (props: typeof __VLS_13) => any;
19
+ };
20
+ declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
21
+ /** 是否可折叠 */
22
+ collapsible: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
26
+ /** 是否展开(v-model:expand) */
27
+ expand: {
28
+ type: BooleanConstructor;
29
+ default: undefined;
30
+ };
31
+ /** 默认是否展开 */
32
+ defaultExpand: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ /** 是否内置查询/重置按钮 */
37
+ withActions: {
38
+ type: BooleanConstructor;
39
+ default: boolean;
40
+ };
41
+ searchText: {
42
+ type: StringConstructor;
43
+ default: string;
44
+ };
45
+ resetText: {
46
+ type: StringConstructor;
47
+ default: string;
48
+ };
49
+ expandText: {
50
+ type: StringConstructor;
51
+ default: string;
52
+ };
53
+ collapseText: {
54
+ type: StringConstructor;
55
+ default: string;
56
+ };
57
+ labelWidth: {
58
+ type: (NumberConstructor | StringConstructor)[];
59
+ default: string;
60
+ };
61
+ headRefreshDatagrid: {
62
+ type: import("vue").PropType<boolean | string>;
63
+ default: boolean;
64
+ };
65
+ filter: {
66
+ type: StringConstructor;
67
+ default: string;
68
+ };
69
+ }>, {
70
+ expand: typeof expand;
71
+ collapse: typeof collapse;
72
+ resetForm: typeof resetForm;
73
+ getSearchParams: typeof getSearchParams;
74
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
75
+ search: (...args: any[]) => void;
76
+ reset: (...args: any[]) => void;
77
+ "expand-change": (...args: any[]) => void;
78
+ "update:expand": (...args: any[]) => void;
79
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
80
+ /** 是否可折叠 */
81
+ collapsible: {
82
+ type: BooleanConstructor;
83
+ default: boolean;
84
+ };
85
+ /** 是否展开(v-model:expand) */
86
+ expand: {
87
+ type: BooleanConstructor;
88
+ default: undefined;
89
+ };
90
+ /** 默认是否展开 */
91
+ defaultExpand: {
92
+ type: BooleanConstructor;
93
+ default: boolean;
94
+ };
95
+ /** 是否内置查询/重置按钮 */
96
+ withActions: {
97
+ type: BooleanConstructor;
98
+ default: boolean;
99
+ };
100
+ searchText: {
101
+ type: StringConstructor;
102
+ default: string;
103
+ };
104
+ resetText: {
105
+ type: StringConstructor;
106
+ default: string;
107
+ };
108
+ expandText: {
109
+ type: StringConstructor;
110
+ default: string;
111
+ };
112
+ collapseText: {
113
+ type: StringConstructor;
114
+ default: string;
115
+ };
116
+ labelWidth: {
117
+ type: (NumberConstructor | StringConstructor)[];
118
+ default: string;
119
+ };
120
+ headRefreshDatagrid: {
121
+ type: import("vue").PropType<boolean | string>;
122
+ default: boolean;
123
+ };
124
+ filter: {
125
+ type: StringConstructor;
126
+ default: string;
127
+ };
128
+ }>> & Readonly<{
129
+ onSearch?: ((...args: any[]) => any) | undefined;
130
+ onReset?: ((...args: any[]) => any) | undefined;
131
+ "onExpand-change"?: ((...args: any[]) => any) | undefined;
132
+ "onUpdate:expand"?: ((...args: any[]) => any) | undefined;
133
+ }>, {
134
+ filter: string;
135
+ withActions: boolean;
136
+ headRefreshDatagrid: string | boolean;
137
+ labelWidth: string | number;
138
+ collapsible: boolean;
139
+ expand: boolean;
140
+ defaultExpand: boolean;
141
+ searchText: string;
142
+ resetText: string;
143
+ expandText: string;
144
+ collapseText: string;
145
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
146
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
147
+ export default _default;
148
+ type __VLS_WithSlots<T, S> = T & {
149
+ new (): {
150
+ $slots: S;
151
+ };
152
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 容器(Dialog/Drawer)与内部内容(DataForm 等)的联动上下文
3
+ */
4
+ import { type InjectionKey } from 'vue';
5
+ export interface ContainerContext {
6
+ /** 容器携带的数据(DrawerButton drawerData 等,供内部表单回填) */
7
+ data?: Record<string, any>;
8
+ /** 请求关闭容器(DataForm headCloseDrawer 提交成功后调用) */
9
+ requestClose: (reason?: string) => void;
10
+ /** 注册关闭前拦截(返回 false 阻止关闭,如 DataForm 的 confirmLeave) */
11
+ addBeforeClose: (guard: () => Promise<boolean>) => () => void;
12
+ }
13
+ export declare const WD_CONTAINER_KEY: InjectionKey<ContainerContext>;
14
+ export declare function provideContainer(ctx: ContainerContext): void;
15
+ export declare function useContainer(): ContainerContext | undefined;
@@ -0,0 +1,19 @@
1
+ export declare function useContainerController(options: {
2
+ props: {
3
+ modelValue?: boolean;
4
+ url?: string;
5
+ title?: string;
6
+ confirmMessage?: string;
7
+ headRefreshDatagrid?: boolean | string;
8
+ filter?: string;
9
+ [key: string]: any;
10
+ };
11
+ emit: (event: any, ...args: any[]) => void;
12
+ }): {
13
+ visible: import("vue").Ref<boolean, boolean>;
14
+ open: () => void;
15
+ requestClose: (reason?: string) => Promise<void>;
16
+ addBeforeClose: (guard: () => Promise<boolean>) => () => boolean;
17
+ handleBeforeClose: (done: () => void) => Promise<void>;
18
+ onClosed: () => void;
19
+ };