@dazhicheng/ui 1.5.33 → 1.5.35

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 (189) hide show
  1. package/dist/components/tt-area/TtArea.vue.d.ts +2 -0
  2. package/dist/components/tt-area/index.d.ts +1 -0
  3. package/dist/components/tt-button/components/AddButton.vue.d.ts +2 -0
  4. package/dist/components/tt-button/index.d.ts +1740 -0
  5. package/dist/components/tt-button/index.vue.d.ts +1004 -0
  6. package/dist/components/tt-checkbox/index.d.ts +36 -0
  7. package/dist/components/tt-checkbox/index.vue.d.ts +28 -0
  8. package/dist/components/tt-checkbox/type.d.ts +9 -0
  9. package/dist/components/tt-drawer/index.d.ts +3703 -0
  10. package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +2121 -0
  11. package/dist/components/tt-drawer/src/components/DrawerFooter.vue.d.ts +94 -0
  12. package/dist/components/tt-drawer/src/components/DrawerHeader.vue.d.ts +27 -0
  13. package/dist/components/tt-drawer/src/hooks/useDrawerRender.d.ts +10 -0
  14. package/dist/components/tt-drawer/src/hooks/useResizable.d.ts +9 -0
  15. package/dist/components/tt-drawer/src/index.d.ts +10 -0
  16. package/dist/components/tt-drawer/src/props.d.ts +99 -0
  17. package/dist/components/tt-drawer/src/typing.d.ts +154 -0
  18. package/dist/components/tt-drawer/src/utils/drawer-api.d.ts +87 -0
  19. package/dist/components/tt-empty/index.d.ts +18 -0
  20. package/dist/components/tt-form/index.d.ts +15 -0
  21. package/dist/components/tt-form/src/components/ExpandableArrow.vue.d.ts +33 -0
  22. package/dist/components/tt-form/src/components/FormActions.vue.d.ts +34 -0
  23. package/dist/components/tt-form/src/components/Slot.d.ts +7 -0
  24. package/dist/components/tt-form/src/config.d.ts +6 -0
  25. package/dist/components/tt-form/src/form/FormControl.vue.d.ts +19 -0
  26. package/dist/components/tt-form/src/form/FormDescription.vue.d.ts +23 -0
  27. package/dist/components/tt-form/src/form/FormItem.vue.d.ts +23 -0
  28. package/dist/components/tt-form/src/form/FormLabel.vue.d.ts +23 -0
  29. package/dist/components/tt-form/src/form/FormMessage.vue.d.ts +2 -0
  30. package/dist/components/tt-form/src/form/FormMessageToolTip.vue.d.ts +8 -0
  31. package/dist/components/tt-form/src/form/FormWarnMessage.vue.d.ts +25 -0
  32. package/dist/components/tt-form/src/form/RenderContent.vue.d.ts +23 -0
  33. package/dist/components/tt-form/src/form/index.d.ts +10 -0
  34. package/dist/components/tt-form/src/form/injectionKeys.d.ts +2 -0
  35. package/dist/components/tt-form/src/form/useFormField.d.ts +11 -0
  36. package/dist/components/tt-form/src/form-render/FormField.vue.d.ts +28 -0
  37. package/dist/components/tt-form/src/form-render/FormLabel.vue.d.ts +27 -0
  38. package/dist/components/tt-form/src/form-render/context.d.ts +7 -0
  39. package/dist/components/tt-form/src/form-render/dependencies.d.ts +361 -0
  40. package/dist/components/tt-form/src/form-render/expandable.d.ts +9 -0
  41. package/dist/components/tt-form/src/form-render/form.vue.d.ts +41 -0
  42. package/dist/components/tt-form/src/form-render/helper.d.ts +11 -0
  43. package/dist/components/tt-form/src/form-render/index.d.ts +3 -0
  44. package/dist/components/tt-form/src/formApi.d.ts +71 -0
  45. package/dist/components/tt-form/src/group-form/FieldRenderer.d.ts +81 -0
  46. package/dist/components/tt-form/src/group-form/GroupForm.vue.d.ts +49 -0
  47. package/dist/components/tt-form/src/group-form/GroupSection.vue.d.ts +25 -0
  48. package/dist/components/tt-form/src/group-form/LazyFormField.vue.d.ts +13 -0
  49. package/dist/components/tt-form/src/group-form/index.d.ts +3 -0
  50. package/dist/components/tt-form/src/group-form/lazyContext.d.ts +37 -0
  51. package/dist/components/tt-form/src/group-form/types.d.ts +147 -0
  52. package/dist/components/tt-form/src/group-form/useGroupForm.d.ts +5 -0
  53. package/dist/components/tt-form/src/group-form/utils.d.ts +93 -0
  54. package/dist/components/tt-form/src/hooks/useEmitAsProps.d.ts +7 -0
  55. package/dist/components/tt-form/src/hooks/useFormFieldBus.d.ts +14 -0
  56. package/dist/components/tt-form/src/hooks/useForwardPriorityValues.d.ts +14 -0
  57. package/dist/components/tt-form/src/hooks/useForwardProps.d.ts +7 -0
  58. package/dist/components/tt-form/src/hooks/useForwardPropsEmits.d.ts +8 -0
  59. package/dist/components/tt-form/src/index.vue.d.ts +27 -0
  60. package/dist/components/tt-form/src/shared/createContext.d.ts +8 -0
  61. package/dist/components/tt-form/src/shared/global-state.d.ts +17 -0
  62. package/dist/components/tt-form/src/shared/store.d.ts +1 -0
  63. package/dist/components/tt-form/src/shared/zod-defaults.d.ts +54 -0
  64. package/dist/components/tt-form/src/types/common.d.ts +11 -0
  65. package/dist/components/tt-form/src/types/forms.d.ts +280 -0
  66. package/dist/components/tt-form/src/types/index.d.ts +3 -0
  67. package/dist/components/tt-form/src/types/paths.d.ts +142 -0
  68. package/dist/components/tt-form/src/types/shared.d.ts +19 -0
  69. package/dist/components/tt-form/src/types.d.ts +452 -0
  70. package/dist/components/tt-form/src/useForm.d.ts +2 -0
  71. package/dist/components/tt-form/src/useFormContext.d.ts +12 -0
  72. package/dist/components/tt-form-item-error-tooltip/index.d.ts +1549 -0
  73. package/dist/components/tt-form-item-error-tooltip/index.vue.d.ts +784 -0
  74. package/dist/components/tt-icon/components/AddIcon.vue.d.ts +7 -0
  75. package/dist/components/tt-icon/components/SubIcon.vue.d.ts +7 -0
  76. package/dist/components/tt-icon/index.d.ts +124 -0
  77. package/dist/components/tt-icon/index.vue.d.ts +32 -0
  78. package/dist/components/tt-image/index.d.ts +127 -0
  79. package/dist/components/tt-image/src/components/ImageViewer.d.ts +89 -0
  80. package/dist/components/tt-image/tt-image.d.ts +126 -0
  81. package/dist/components/tt-loading/index.d.ts +16 -0
  82. package/dist/components/tt-loading/src/directive.d.ts +9 -0
  83. package/dist/components/tt-loading/src/loading.vue.d.ts +12 -0
  84. package/dist/components/tt-loading/src/service.d.ts +25 -0
  85. package/dist/components/tt-loading/src/type.d.ts +20 -0
  86. package/dist/components/tt-modal/index.d.ts +1809 -0
  87. package/dist/components/tt-modal/src/RenderModal.vue.d.ts +1008 -0
  88. package/dist/components/tt-modal/src/components/ModalFooter.vue.d.ts +210 -0
  89. package/dist/components/tt-modal/src/components/ModalHeader.vue.d.ts +31 -0
  90. package/dist/components/tt-modal/src/components/ModalWrapper.vue.d.ts +224 -0
  91. package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +110 -0
  92. package/dist/components/tt-modal/src/index.d.ts +5 -0
  93. package/dist/components/tt-modal/src/props.d.ts +161 -0
  94. package/dist/components/tt-modal/src/typing.d.ts +188 -0
  95. package/dist/components/tt-modal/src/utils/modal-api.d.ts +97 -0
  96. package/dist/components/tt-modal-form/hooks/useModalFormSlot.d.ts +6 -0
  97. package/dist/components/tt-modal-form/index.d.ts +2 -0
  98. package/dist/components/tt-modal-form/index.vue.d.ts +43 -0
  99. package/dist/components/tt-modal-form/props.d.ts +38 -0
  100. package/dist/components/tt-modal-form/useModalForm.d.ts +6 -0
  101. package/dist/components/tt-nav-anchor/index.d.ts +19 -0
  102. package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.d.ts +19 -0
  103. package/dist/components/tt-nav-anchor/src/types.d.ts +29 -0
  104. package/dist/components/tt-select/index.d.ts +7 -0
  105. package/dist/components/tt-select/src/Select.vue.d.ts +861 -0
  106. package/dist/components/tt-select/src/components/SelectTable.vue.d.ts +111 -0
  107. package/dist/components/tt-select/src/components/Table.vue.d.ts +250 -0
  108. package/dist/components/tt-select/src/const.d.ts +16 -0
  109. package/dist/components/tt-select/src/hooks/useDataSource.d.ts +115 -0
  110. package/dist/components/tt-select/src/hooks/useGrid.d.ts +32 -0
  111. package/dist/components/tt-select/src/hooks/useKeyboard.d.ts +59 -0
  112. package/dist/components/tt-select/src/hooks/usePagination.d.ts +16 -0
  113. package/dist/components/tt-select/src/hooks/useSelect.d.ts +87 -0
  114. package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts +178 -0
  115. package/dist/components/tt-select/src/props.d.ts +190 -0
  116. package/dist/components/tt-select/src/types/index.d.ts +142 -0
  117. package/dist/components/tt-select/src/utils/index.d.ts +9 -0
  118. package/dist/components/tt-table/index.d.ts +127 -0
  119. package/dist/components/tt-table/src/Table.vue.d.ts +1685 -0
  120. package/dist/components/tt-table/src/componentMap.d.ts +8 -0
  121. package/dist/components/tt-table/src/components/RowContext.d.ts +24 -0
  122. package/dist/components/tt-table/src/components/TableAction.vue.d.ts +79 -0
  123. package/dist/components/tt-table/src/components/TableButtons.d.ts +30 -0
  124. package/dist/components/tt-table/src/components/TableColumnModal.vue.d.ts +26 -0
  125. package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +1531 -0
  126. package/dist/components/tt-table/src/emits.d.ts +1 -0
  127. package/dist/components/tt-table/src/enum.d.ts +2 -0
  128. package/dist/components/tt-table/src/hooks/useCellArea.d.ts +15 -0
  129. package/dist/components/tt-table/src/hooks/useColumns.d.ts +27 -0
  130. package/dist/components/tt-table/src/hooks/useCustomColumns.d.ts +20 -0
  131. package/dist/components/tt-table/src/hooks/useDataSource.d.ts +29 -0
  132. package/dist/components/tt-table/src/hooks/useLeftRightSlot.d.ts +1082 -0
  133. package/dist/components/tt-table/src/hooks/usePagination.d.ts +102 -0
  134. package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +30 -0
  135. package/dist/components/tt-table/src/hooks/useTable.d.ts +7 -0
  136. package/dist/components/tt-table/src/hooks/useTableContext.d.ts +43 -0
  137. package/dist/components/tt-table/src/hooks/useTableEvent.d.ts +101 -0
  138. package/dist/components/tt-table/src/hooks/useTableForm.d.ts +15 -0
  139. package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts +10 -0
  140. package/dist/components/tt-table/src/hooks/useTableHeight.d.ts +15 -0
  141. package/dist/components/tt-table/src/hooks/useTableRender.d.ts +93 -0
  142. package/dist/components/tt-table/src/hooks/useTableSlot.d.ts +11 -0
  143. package/dist/components/tt-table/src/props.d.ts +433 -0
  144. package/dist/components/tt-table/src/toolProps.d.ts +19 -0
  145. package/dist/components/tt-table/src/types/table.d.ts +489 -0
  146. package/dist/components/tt-table/src/types/tableAction.d.ts +26 -0
  147. package/dist/components/tt-table/src/types/tableForm.d.ts +64 -0
  148. package/dist/components/tt-table/src/types/tableTools.d.ts +10 -0
  149. package/dist/components/tt-table/src/utils/context.d.ts +18 -0
  150. package/dist/components/tt-table/src/utils/filters.d.ts +109 -0
  151. package/dist/components/tt-table/src/utils/table-api.d.ts +250 -0
  152. package/dist/components/tt-table/src/utils/table-form-api.d.ts +88 -0
  153. package/dist/components/tt-table/src/utils/vxeTable.d.ts +28 -0
  154. package/dist/components/tt-text/index.d.ts +76 -0
  155. package/dist/components/tt-text/index.vue.d.ts +50 -0
  156. package/dist/components/tt-tree-select/index.d.ts +5 -0
  157. package/dist/components/tt-tree-select/src/TtTreeSelect.vue.d.ts +6 -0
  158. package/dist/components/tt-tree-select/src/cache-options.d.ts +35 -0
  159. package/dist/components/tt-tree-select/src/select.d.ts +10 -0
  160. package/dist/components/tt-tree-select/src/tree.d.ts +23 -0
  161. package/dist/components/tt-tree-select/src/utils.d.ts +10 -0
  162. package/dist/components/tt-upload/index.d.ts +428 -0
  163. package/dist/components/tt-upload/src/TtUpload.d.ts +449 -0
  164. package/dist/components/tt-upload/src/typing.d.ts +251 -0
  165. package/dist/components/types.d.ts +230 -0
  166. package/dist/directives/auto-tip/index.d.ts +3 -0
  167. package/dist/directives/dialog-resize/index.d.ts +25 -0
  168. package/dist/directives/dialog-resize/use-css-variable.d.ts +1 -0
  169. package/dist/directives/dialog-resize/use-draggable.d.ts +4 -0
  170. package/dist/directives/dialog-resize/use-fullscreen.d.ts +1 -0
  171. package/dist/directives/dialog-resize/use-parse-translate.d.ts +4 -0
  172. package/dist/directives/dialog-resize/use-resizer.d.ts +2 -0
  173. package/dist/directives/disabled-tip/index.d.ts +17 -0
  174. package/dist/directives/index.d.ts +3 -0
  175. package/dist/hooks/useFormat.d.ts +73 -0
  176. package/dist/hooks/useLoading.d.ts +9 -0
  177. package/dist/hooks/useSetup.d.ts +8 -0
  178. package/dist/hooks/useTable.d.ts +5 -0
  179. package/dist/hooks/useTemplateSlot.d.ts +9 -0
  180. package/dist/{index-CMjNBMj5.js → index-NG5FNCLD.js} +2 -3
  181. package/dist/index.d.ts +47 -0
  182. package/dist/index.js +10239 -9224
  183. package/dist/{index.modern-BfZxYaPy.js → index.modern-DfItAsVf.js} +1 -1
  184. package/dist/plugins/index.d.ts +1 -0
  185. package/dist/plugins/vxeTable/switchStatus.d.ts +7 -0
  186. package/dist/plugins.d.ts +2 -0
  187. package/dist/plugins.js +29 -30
  188. package/dist/style.css +1 -1
  189. package/package.json +3 -10
@@ -0,0 +1,161 @@
1
+ import { ButtonProps } from 'element-plus';
2
+ import { PropType } from 'vue';
3
+ import { TipConfig } from '../../../directives/disabled-tip';
4
+ export declare const modalProps: {
5
+ /** 测试标识 */
6
+ testId: any;
7
+ /** 是否显示 */
8
+ visible: {
9
+ type: BooleanConstructor;
10
+ };
11
+ /** 标题 */
12
+ title: any;
13
+ /** 取消按钮文本 */
14
+ cancelText: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ /** 确定按钮文本 */
19
+ okText: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ /** 最小高度 */
24
+ minHeight: any;
25
+ /** 高度 */
26
+ height: any;
27
+ /** 是否滚动到顶 */
28
+ scrollTop: {
29
+ type: BooleanConstructor;
30
+ default: boolean;
31
+ };
32
+ /** 取消前的函数 */
33
+ closeFunc: PropType<() => Promise<boolean>>;
34
+ /** 是否允许拖拽 */
35
+ draggable: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ /** 是否允许放大 */
40
+ fullscreen: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
44
+ /** 是否允许自定义大小 */
45
+ resizer: {
46
+ type: BooleanConstructor;
47
+ default: boolean;
48
+ };
49
+ };
50
+ export declare const basicProps: {
51
+ /** 测试标识 */
52
+ testId: any;
53
+ /** 是否显示 */
54
+ visible: {
55
+ type: BooleanConstructor;
56
+ };
57
+ /** 标题 */
58
+ title: any;
59
+ /** 取消按钮文本 */
60
+ cancelText: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ };
64
+ /** 确定按钮文本 */
65
+ okText: {
66
+ type: StringConstructor;
67
+ default: string;
68
+ };
69
+ /** 最小高度 */
70
+ minHeight: any;
71
+ /** 高度 */
72
+ height: any;
73
+ /** 是否滚动到顶 */
74
+ scrollTop: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ /** 取消前的函数 */
79
+ closeFunc: PropType<() => Promise<boolean>>;
80
+ /** 是否允许拖拽 */
81
+ draggable: {
82
+ type: BooleanConstructor;
83
+ default: boolean;
84
+ };
85
+ /** 是否允许放大 */
86
+ fullscreen: {
87
+ type: BooleanConstructor;
88
+ default: boolean;
89
+ };
90
+ /** 是否允许自定义大小 */
91
+ resizer: {
92
+ type: BooleanConstructor;
93
+ default: boolean;
94
+ };
95
+ } & {
96
+ /** 弹窗的loading */
97
+ loading: {
98
+ type: BooleanConstructor;
99
+ default: boolean;
100
+ };
101
+ /** 弹窗的loading提示 */
102
+ loadingTip: {
103
+ type: StringConstructor;
104
+ };
105
+ /** 是否显示footer */
106
+ showFooter: {
107
+ type: BooleanConstructor;
108
+ default: boolean;
109
+ };
110
+ /** 是否显示取消按钮 */
111
+ showCancelBtn: {
112
+ type: BooleanConstructor;
113
+ default: boolean;
114
+ };
115
+ /** 是否显示确定按钮 */
116
+ showOkBtn: {
117
+ type: BooleanConstructor;
118
+ default: boolean;
119
+ };
120
+ /** 是否显示确定按钮loading */
121
+ confirmLoading: {
122
+ type: BooleanConstructor;
123
+ };
124
+ /** 是否显示取消按钮loading */
125
+ cancelLoading: {
126
+ type: BooleanConstructor;
127
+ };
128
+ /** 宽度 */
129
+ width: PropType<string | number>;
130
+ /** 弹窗距离顶部的距离需要带px单位 */
131
+ top: {
132
+ type: StringConstructor;
133
+ };
134
+ /** 弹大小 */
135
+ size: {
136
+ type: PropType<"medium" | "small" | "mini">;
137
+ default: string;
138
+ };
139
+ /** 确定按钮的样式 */
140
+ okButtonProps: {
141
+ type: PropType<Partial<ButtonProps> & {
142
+ disabledTip?: TipConfig | TipConfig[];
143
+ }>;
144
+ default: Partial<ButtonProps>;
145
+ };
146
+ /** 取消按钮的样式 */
147
+ cancelButtonProps: {
148
+ type: PropType<Partial<ButtonProps>>;
149
+ default: Partial<ButtonProps>;
150
+ };
151
+ /** 是否贴住底部 */
152
+ isBottom: {
153
+ type: BooleanConstructor;
154
+ default: boolean;
155
+ };
156
+ /** 是否显示modal */
157
+ modal: {
158
+ type: BooleanConstructor;
159
+ default: boolean;
160
+ };
161
+ };
@@ -0,0 +1,188 @@
1
+ import { TipConfig } from '../../../directives/disabled-tip';
2
+ import { ButtonProps, DialogProps } from 'element-plus';
3
+ import { Component, ComputedRef, Ref } from 'vue';
4
+ import { default as TtModal } from './RenderModal.vue';
5
+ import { default as TtModalWrapper } from './components/ModalWrapper.vue';
6
+ import { ModalApi } from './utils/modal-api';
7
+ /**
8
+ * @description: 弹窗对外暴露的方法
9
+ */
10
+ export type ModalMethods = {
11
+ setModalProps: (props: Partial<ModalProps>) => void;
12
+ emitVisible?: (visible: boolean, uid: number) => void;
13
+ redoModalHeight?: () => void;
14
+ scrollToBottom: () => void;
15
+ };
16
+ type RegisterFn = (modalMethods: ModalMethods, uuid: string) => void;
17
+ export type TtModalRegister = [methods: ModalMethods, uuid: string];
18
+ export type ModalReturnMethods = {
19
+ /** 打开弹窗 */
20
+ openModal: <T = any>(props?: boolean, data?: T, openOnSet?: boolean) => void;
21
+ /** 关闭弹窗事件 */
22
+ closeModal: () => void;
23
+ getVisible?: ComputedRef<boolean>;
24
+ } & ModalMethods;
25
+ export type UseModalReturnType = [RegisterFn, ModalReturnMethods];
26
+ export type ModalReturnInnerMethods = {
27
+ /** 关闭弹窗事件 */
28
+ closeModal: () => void;
29
+ /** 改变弹窗loading事件 */
30
+ changeLoading: (loading: boolean) => void;
31
+ /** 改变确定按钮事件 */
32
+ changeOkLoading: (loading: boolean) => void;
33
+ /** 获取visible */
34
+ getVisible?: ComputedRef<boolean>;
35
+ redoModalHeight: () => void;
36
+ } & ModalMethods;
37
+ export type UseModalInnerReturnType = [RegisterFn, ModalReturnInnerMethods];
38
+ export type ModalProps = InstanceType<typeof TtModal>["$props"] & Partial<DialogProps>;
39
+ export type ModalWrapperProps = InstanceType<typeof TtModalWrapper>["$props"];
40
+ export type ModalRenderState = {
41
+ /**
42
+ * 是否显示
43
+ * @default false
44
+ */
45
+ visible?: boolean;
46
+ /** 测试标识 */
47
+ testId?: string;
48
+ /** 标题 */
49
+ title?: string;
50
+ /**
51
+ * 取消按钮文本
52
+ * @default '取消'
53
+ */
54
+ cancelText?: string;
55
+ /**
56
+ * 确定按钮文本
57
+ * @default '确定'
58
+ */
59
+ okText?: string;
60
+ /**
61
+ * 最小高度
62
+ * @default 192
63
+ */
64
+ minHeight?: number;
65
+ /**
66
+ * 高度
67
+ */
68
+ height?: number;
69
+ /**
70
+ * 是否滚动到顶
71
+ * @default true
72
+ */
73
+ scrollTop?: boolean;
74
+ /**
75
+ * 取消前的函数
76
+ */
77
+ closeFunc?: () => Promise<boolean>;
78
+ /**
79
+ * 是否允许拖拽
80
+ * @default true
81
+ */
82
+ draggable?: boolean;
83
+ /**
84
+ * 是否允许放大
85
+ * @default false
86
+ */
87
+ fullscreen?: boolean;
88
+ /**
89
+ * 是否允许自定义大小
90
+ * @default false
91
+ */
92
+ resizer?: boolean;
93
+ /**
94
+ * Function 自定义大小改变时触发
95
+ */
96
+ resizeChange?: () => void;
97
+ /**
98
+ * 弹窗的loading
99
+ * @default false
100
+ */
101
+ loading?: boolean;
102
+ /** 弹窗的loading提示 */
103
+ loadingTip?: string;
104
+ /**
105
+ * 是否显示footer
106
+ * @default true
107
+ */
108
+ showFooter?: boolean;
109
+ /**
110
+ * 是否显示取消按钮
111
+ * @default true
112
+ */
113
+ showCancelBtn?: boolean;
114
+ /**
115
+ * 是否显示确定按钮
116
+ * @default true
117
+ */
118
+ showOkBtn?: boolean;
119
+ /**
120
+ * 是否显示确定按钮loading
121
+ * @default false
122
+ */
123
+ confirmLoading?: boolean;
124
+ /**
125
+ * 是否显示取消按钮loading
126
+ * @default false
127
+ */
128
+ cancelLoading?: boolean;
129
+ /** 宽度 */
130
+ width?: string | number;
131
+ /** 弹窗距离顶部的距离需要带px单位 */
132
+ top?: string;
133
+ /**
134
+ * 弹窗大小
135
+ * @default 'small'
136
+ */
137
+ size?: "medium" | "small" | "mini";
138
+ /**
139
+ * 确定按钮的样式
140
+ * @default { type: 'primary' }
141
+ */
142
+ okButtonProps?: Partial<ButtonProps> & {
143
+ disabledTip?: TipConfig[];
144
+ };
145
+ /**
146
+ * 取消按钮的样式
147
+ * @default {}
148
+ */
149
+ cancelButtonProps?: Partial<ButtonProps>;
150
+ /**
151
+ * 是否贴住底部
152
+ * @default false
153
+ */
154
+ isBottom?: boolean;
155
+ } & Partial<DialogProps>;
156
+ export type ModalApiOptions = ModalRenderState & Partial<DialogProps> & {
157
+ /**
158
+ * 独立的弹窗组件
159
+ */
160
+ connectedComponent?: Component;
161
+ /**
162
+ * 点击取消按钮的回调
163
+ */
164
+ onClose?: () => void;
165
+ /**
166
+ * 弹窗关闭动画结束的回调
167
+ * @returns
168
+ */
169
+ onClosed?: () => void;
170
+ /**
171
+ * 弹窗状态变化回调
172
+ * @param isOpen
173
+ * @returns
174
+ */
175
+ onVisibleChange?: (isOpen: boolean) => void;
176
+ /**
177
+ * 点击确定按钮的回调
178
+ */
179
+ onOk?: () => void;
180
+ /**
181
+ * 监听的方法
182
+ */
183
+ onReceiveSharedData?: (data: Record<string, any>) => void;
184
+ };
185
+ export type TtModalExtendedModalApi = ModalApi & {
186
+ useStore: <T = NoInfer<ModalRenderState>>(selector?: (state: NoInfer<ModalRenderState>) => T) => Readonly<Ref<T>>;
187
+ };
188
+ export {};
@@ -0,0 +1,97 @@
1
+ import { ModalApiOptions, ModalMethods, ModalRenderState } from '../typing';
2
+ import { Store } from '@tanstack/vue-store';
3
+ export type ApiType = Pick<ModalApiOptions, "onClose" | "onVisibleChange" | "onOk" | "onReceiveSharedData" | "onClosed">;
4
+ /**
5
+ * 弹窗的API类
6
+ * @description 用于管理弹窗的共享数据、状态和API接口
7
+ */
8
+ export declare class ModalApi {
9
+ /** 共享数据对象,用于在组件间传递数据 */
10
+ sharedData: Record<"payload", any>;
11
+ /** 状态存储对象,使用Store管理弹窗的各种状态 */
12
+ store: Store<ModalRenderState>;
13
+ /** 弹窗的API接口,用于处理外部事件 */
14
+ private api;
15
+ /** 弹窗的当前状态,使用Partial<ModalRenderState>类型 */
16
+ state: ModalRenderState;
17
+ /** 弹窗的实例方法,用于处理弹窗的各种操作 */
18
+ private methods?;
19
+ /** 构造函数,初始化弹窗的API接口和状态 */
20
+ constructor(options?: ModalApiOptions);
21
+ /**
22
+ * 挂载弹窗实例和API接口
23
+ * @param api - 外部传入的API接口
24
+ * @param methods - 外部传入的实例方法
25
+ */
26
+ mount(api: ApiType, methods: ModalMethods): void;
27
+ /**
28
+ * 关闭弹窗
29
+ */
30
+ close(): Promise<void>;
31
+ /**
32
+ * 取消操作
33
+ */
34
+ onClosed(): void;
35
+ /**
36
+ * 确认操作
37
+ */
38
+ onOk: () => void;
39
+ /**
40
+ * 获取共享数据
41
+ * @returns 共享数据对象
42
+ */
43
+ getData<T extends object = Record<string, any>>(): T;
44
+ /**
45
+ * 设置弹窗的状态
46
+ * @param stateOrFn - 状态对象或状态函数
47
+ * @returns 当前实例
48
+ */
49
+ setState(stateOrFn: ((prev: Partial<ModalRenderState>) => Partial<ModalRenderState>) | Partial<ModalRenderState>): this;
50
+ /**
51
+ * 打开弹窗
52
+ * @param visible - 是否可见
53
+ * @param data - 共享数据
54
+ */
55
+ openModal<T>(visible?: boolean, data?: T): void;
56
+ /**
57
+ * 设置弹窗的属性
58
+ * @param props - 属性对象
59
+ * @returns 当前实例
60
+ */
61
+ setModalProps(props: Partial<ModalRenderState>): Promise<void>;
62
+ /**
63
+ * 设置弹窗的加载状态
64
+ * @param loading - 是否加载中
65
+ * @returns 当前实例
66
+ */
67
+ changeLoading(loading?: boolean): this;
68
+ /**
69
+ * 设置确认按钮的加载状态
70
+ * @param loading - 是否加载中
71
+ * @returns 当前实例
72
+ */
73
+ changeOkLoading(loading?: boolean): this;
74
+ /**
75
+ * 设置共享数据
76
+ * @param payload - 共享数据
77
+ * @returns 当前实例
78
+ */
79
+ setData(payload: any): this;
80
+ /**
81
+ * 关闭弹窗
82
+ */
83
+ closeModal(): void;
84
+ /**
85
+ * 获取弹窗的可见状态
86
+ * @returns 弹窗的可见状态
87
+ */
88
+ getVisible: import('vue').ComputedRef<boolean | undefined>;
89
+ /**
90
+ * 重置弹窗高度
91
+ */
92
+ redoModalHeight(): void;
93
+ /**
94
+ * 滚动到底部
95
+ */
96
+ scrollToBottom(): void;
97
+ }
@@ -0,0 +1,6 @@
1
+ export declare function useModalFormSlot(slots: any): {
2
+ getFormSlotKeys: import('vue').ComputedRef<(string | null)[]>;
3
+ getModalSlotKeys: import('vue').ComputedRef<(string | null)[]>;
4
+ replaceModalSlotKey: (key: string | null) => string;
5
+ replaceFormSlotKey: (key: string | null) => string;
6
+ };
@@ -0,0 +1,2 @@
1
+ export * from './useModalForm';
2
+ export type { TtModalFormProps } from './props';
@@ -0,0 +1,43 @@
1
+ import { Recordable } from '../../../../utils/src';
2
+ import { TtModalFormProps } from './props';
3
+ declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
5
+ slots: Readonly<{
6
+ [key: string]: (props: any) => void;
7
+ BasicMsgTop: () => void;
8
+ insertFooter: () => void;
9
+ default: (props: any) => void;
10
+ }> & {
11
+ [key: string]: (props: any) => void;
12
+ BasicMsgTop: () => void;
13
+ insertFooter: () => void;
14
+ default: (props: any) => void;
15
+ };
16
+ refs: {};
17
+ rootEl: any;
18
+ };
19
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
+ declare const __VLS_component: import('vue').DefineComponent<Partial<TtModalFormProps>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ fetch: (data: Recordable) => any;
22
+ submit: (data: Recordable) => any;
23
+ getinfo: (data: any) => any;
24
+ }, string, import('vue').PublicProps, Readonly<Partial<TtModalFormProps>> & Readonly<{
25
+ onFetch?: ((data: Recordable) => any) | undefined;
26
+ onSubmit?: ((data: Recordable) => any) | undefined;
27
+ onGetinfo?: ((data: any) => any) | undefined;
28
+ }>, {
29
+ dataField: string;
30
+ infoApiIdKey: string;
31
+ infoApiParams: globalThis.Recordable;
32
+ apiParams: globalThis.Recordable;
33
+ formProps: Partial<import('../tt-form').TtFormProps>;
34
+ isContinuousChecked: boolean;
35
+ checkedOptions: Record<string, any>;
36
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
37
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
38
+ export default _default;
39
+ type __VLS_WithTemplateSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,38 @@
1
+ import { TtExtendedFormApi, TtFormProps } from '../tt-form';
2
+ import { ModalApiOptions, TtModalExtendedModalApi } from '../tt-modal';
3
+ export type TtModalFormProps = {
4
+ /** model */
5
+ model?: Recordable;
6
+ /** 新增保存接口 */
7
+ addApi?: (...arg: any[]) => Promise<any>;
8
+ /** 编辑保存接口 */
9
+ editApi?: (...arg: any[]) => Promise<any>;
10
+ /** 详情接口 */
11
+ infoApi?: (...arg: any[]) => Promise<any>;
12
+ /** 详情接口前置钩子 */
13
+ infoApiBefore?: (val: Recordable) => Recordable;
14
+ /** 保存接口前置钩子 */
15
+ saveApiBefore?: (val: Recordable) => Promise<Recordable>;
16
+ /** 表单静态数据回显的key */
17
+ infoDataKey?: string;
18
+ /** 详情接口的唯一key */
19
+ infoApiIdKey?: string;
20
+ /** 详情接口额外参数 */
21
+ infoApiParams?: Recordable;
22
+ /** 保存额外参数 */
23
+ apiParams?: Recordable;
24
+ /** formProps */
25
+ formProps?: Partial<TtFormProps>;
26
+ /** 是否连续添加 */
27
+ isContinuousChecked?: boolean;
28
+ /** 响应结果集字段 */
29
+ dataField?: string;
30
+ /** modal props */
31
+ modalProps?: ModalApiOptions;
32
+ /** 获取formApi的回调 */
33
+ getFormApi?: (api: TtExtendedFormApi) => void;
34
+ /** 获取modalApi的回调 */
35
+ getModalApi?: (api: TtModalExtendedModalApi) => void;
36
+ /** 处理TtSelect(非多选回显值) */
37
+ checkedOptions?: Record<string, any>;
38
+ };
@@ -0,0 +1,6 @@
1
+ import { TtModalExtendedModalApi } from '../tt-modal';
2
+ import { TtModalFormProps } from './props';
3
+ export declare function useModalForm(options: TtModalFormProps): readonly [import('vue').DefineSetupFnComponent<Partial<TtModalFormProps>, {}, {}, Partial<TtModalFormProps> & {}, import('vue').PublicProps>, {
4
+ readonly formApi: import('vue').Ref<import('../tt-form/src/types').ExtendedFormApi | undefined, import('../tt-form/src/types').ExtendedFormApi | undefined>;
5
+ readonly modalApi: import('vue').Ref<TtModalExtendedModalApi | undefined, TtModalExtendedModalApi | undefined>;
6
+ }];
@@ -0,0 +1,19 @@
1
+ export declare const TtNavAnchor: import('../../../../utils/src').SFCWithInstall<import('vue').DefineComponent<import('./src/types').TtNavAnchorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
+ change: (key: string) => any;
3
+ "update:modelValue": (key: string) => any;
4
+ }, string, import('vue').PublicProps, Readonly<import('./src/types').TtNavAnchorProps> & Readonly<{
5
+ onChange?: ((key: string) => any) | undefined;
6
+ "onUpdate:modelValue"?: ((key: string) => any) | undefined;
7
+ }>, {
8
+ title: string;
9
+ top: number | string;
10
+ right: number | string;
11
+ modelValue: string;
12
+ position: "fixed" | "static" | "sticky";
13
+ badgeCounts: Record<string, number>;
14
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
15
+ navRef: HTMLDivElement;
16
+ headerRef: HTMLDivElement;
17
+ }, any>> & Record<string, any>;
18
+ export type { NavAnchorItem } from './src/types';
19
+ export default TtNavAnchor;
@@ -0,0 +1,19 @@
1
+ import { TtNavAnchorProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<TtNavAnchorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
+ change: (key: string) => any;
4
+ "update:modelValue": (key: string) => any;
5
+ }, string, import('vue').PublicProps, Readonly<TtNavAnchorProps> & Readonly<{
6
+ onChange?: ((key: string) => any) | undefined;
7
+ "onUpdate:modelValue"?: ((key: string) => any) | undefined;
8
+ }>, {
9
+ title: string;
10
+ top: number | string;
11
+ right: number | string;
12
+ modelValue: string;
13
+ position: "fixed" | "static" | "sticky";
14
+ badgeCounts: Record<string, number>;
15
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
16
+ navRef: HTMLDivElement;
17
+ headerRef: HTMLDivElement;
18
+ }, any>;
19
+ export default _default;
@@ -0,0 +1,29 @@
1
+ /** 导航项 */
2
+ export interface NavAnchorItem {
3
+ /** 唯一标识,同时用于定位锚点元素 [data-group-key="xxx"] */
4
+ key: string;
5
+ /** 显示标题 */
6
+ title: string;
7
+ }
8
+ /** 导航锚点组件 props */
9
+ export interface TtNavAnchorProps {
10
+ /** 导航项列表 */
11
+ items: NavAnchorItem[];
12
+ /** 当前激活项 key */
13
+ modelValue?: string;
14
+ /** 导航栏标题 */
15
+ title?: string;
16
+ /** 各项的错误/徽标数量,key → count */
17
+ badgeCounts?: Record<string, number>;
18
+ /**
19
+ * 定位方式:
20
+ * - 'fixed' 固定在视口(默认),不占布局空间
21
+ * - 'sticky' 粘性定位,跟随滚动容器
22
+ * - 'static' 普通文档流定位
23
+ */
24
+ position?: "fixed" | "static" | "sticky";
25
+ /** fixed/sticky 时距顶部的距离 */
26
+ top?: number | string;
27
+ /** fixed/sticky 时距右侧的距离 */
28
+ right?: number | string;
29
+ }
@@ -0,0 +1,7 @@
1
+ import { SFCWithInstall } from '../../../../utils/src';
2
+ import { default as TtSelectConstructor } from './src/Select.vue';
3
+ export type { TtSelectProps as TtSelectProp } from './src/props';
4
+ export * from './src/types';
5
+ export declare const TtSelect: SFCWithInstall<typeof TtSelectConstructor>;
6
+ export default TtSelect;
7
+ export type TtSelectInstance = InstanceType<typeof TtSelect>;