@me-framework/me-ui-antdv-next 0.0.3

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 (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.en.md +82 -0
  3. package/README.md +82 -0
  4. package/dist/components/body/index.d.ts +4 -0
  5. package/dist/components/body/index.vue.d.ts +176 -0
  6. package/dist/components/body/types.d.ts +30 -0
  7. package/dist/components/box/index.d.ts +4 -0
  8. package/dist/components/box/index.vue.d.ts +120 -0
  9. package/dist/components/box/types.d.ts +34 -0
  10. package/dist/components/breadcrumb/index.d.ts +4 -0
  11. package/dist/components/breadcrumb/index.vue.d.ts +31 -0
  12. package/dist/components/breadcrumb/types.d.ts +76 -0
  13. package/dist/components/icon/index.d.ts +16 -0
  14. package/dist/components/icon/index.vue.d.ts +129 -0
  15. package/dist/components/icon/types.d.ts +32 -0
  16. package/dist/components/input-gps/index.d.ts +4 -0
  17. package/dist/components/input-gps/index.vue.d.ts +19 -0
  18. package/dist/components/input-gps/map.vue.d.ts +21 -0
  19. package/dist/components/input-gps/types.d.ts +44 -0
  20. package/dist/components/input-icon-selector/index.d.ts +4 -0
  21. package/dist/components/input-icon-selector/index.vue.d.ts +33 -0
  22. package/dist/components/input-icon-selector/types.d.ts +39 -0
  23. package/dist/components/input-radio/index.d.ts +4 -0
  24. package/dist/components/input-radio/index.vue.d.ts +106 -0
  25. package/dist/components/input-radio/types.d.ts +23 -0
  26. package/dist/components/menu/MenuTreeItem.vue.d.ts +14 -0
  27. package/dist/components/menu/index.d.ts +4 -0
  28. package/dist/components/menu/index.vue.d.ts +50 -0
  29. package/dist/components/menu/types.d.ts +270 -0
  30. package/dist/components/message/index.d.ts +16 -0
  31. package/dist/components/message/index.vue.d.ts +39 -0
  32. package/dist/components/message/types.d.ts +97 -0
  33. package/dist/components/modal/index.d.ts +4 -0
  34. package/dist/components/modal/index.vue.d.ts +36 -0
  35. package/dist/components/modal/types.d.ts +24 -0
  36. package/dist/components/nav/index.d.ts +4 -0
  37. package/dist/components/nav/index.vue.d.ts +37 -0
  38. package/dist/components/nav/types.d.ts +102 -0
  39. package/dist/components/tree-menu/TreeMenuActions.vue.d.ts +35 -0
  40. package/dist/components/tree-menu/TreeMenuCard.vue.d.ts +40 -0
  41. package/dist/components/tree-menu/TreeMenuEdit.vue.d.ts +127 -0
  42. package/dist/components/tree-menu/TreeMenuNode.vue.d.ts +40 -0
  43. package/dist/components/tree-menu/index.d.ts +4 -0
  44. package/dist/components/tree-menu/index.vue.d.ts +345 -0
  45. package/dist/components/tree-menu/types.d.ts +133 -0
  46. package/dist/composables/useColor.d.ts +8 -0
  47. package/dist/data/menu.json +3686 -0
  48. package/dist/icons/me-icon-test.svg +3 -0
  49. package/dist/images/bg/0.jpg +0 -0
  50. package/dist/images/logo/0.svg +24 -0
  51. package/dist/index.d.ts +35 -0
  52. package/dist/me-ui-antdv-next.css +2 -0
  53. package/dist/me-ui-antdv-next.js +90528 -0
  54. package/dist/me-ui-antdv-next.umd.cjs +262 -0
  55. package/dist/shims-vue.d.ts +25 -0
  56. package/dist/types/index.d.ts +10 -0
  57. package/dist/utils/index.d.ts +16 -0
  58. package/dist/vite.svg +10 -0
  59. package/package.json +99 -0
@@ -0,0 +1,270 @@
1
+ /**
2
+ * 菜单元数据
3
+ */
4
+ export interface MeMenuMetaItem {
5
+ /**
6
+ * 菜单标题
7
+ */
8
+ metaTitle: string;
9
+ /**
10
+ * 关联菜单id
11
+ */
12
+ activeMenu?: string;
13
+ /**
14
+ * 菜单路径
15
+ */
16
+ path: string;
17
+ /**
18
+ * 菜单路径参数
19
+ */
20
+ pathParams: string;
21
+ /**
22
+ * 菜单路由重定向
23
+ */
24
+ redirect: string;
25
+ /**
26
+ * 菜单 badge
27
+ */
28
+ badge: string;
29
+ /**
30
+ * 菜单隐藏标签
31
+ */
32
+ hideTab: boolean;
33
+ /**
34
+ * 菜单 dot
35
+ */
36
+ dot: boolean;
37
+ /**
38
+ * 菜单是否隐藏布局
39
+ */
40
+ noLayout: boolean;
41
+ /**
42
+ * 菜单是否允许搜索
43
+ */
44
+ allowSearch: boolean;
45
+ /**
46
+ * 菜单type
47
+ */
48
+ type: string;
49
+ /**
50
+ * 外部跳转链接
51
+ */
52
+ linkURL: string;
53
+ /**
54
+ * 菜单 iframeURL
55
+ */
56
+ iframeURL: string;
57
+ /**
58
+ * 菜单激活
59
+ */
60
+ activation: boolean;
61
+ /**
62
+ * 菜单高亮
63
+ */
64
+ highlightMenu: boolean | string;
65
+ /**
66
+ * 菜单环境
67
+ */
68
+ env: number;
69
+ /**
70
+ * 菜单规则
71
+ */
72
+ rule: any[];
73
+ /**
74
+ * 路由组件路径
75
+ */
76
+ component: string;
77
+ /**
78
+ * 路由是否已经加载过
79
+ */
80
+ loaded?: boolean;
81
+ /**
82
+ * 徽标类型
83
+ */
84
+ badgeType?: 'dot' | 'normal';
85
+ /**
86
+ * 徽标颜色
87
+ */
88
+ badgeColor?: 'danger' | 'info' | 'primary' | 'success' | 'warning' | string;
89
+ /**
90
+ * 菜单是否是弹窗形式
91
+ */
92
+ dialogMenu?: boolean;
93
+ /**
94
+ * 弹窗菜单的弹窗组件路径
95
+ */
96
+ dialogComponent?: string;
97
+ /**
98
+ * 分割线
99
+ */
100
+ divider?: boolean;
101
+ /**
102
+ * 隐藏子菜单
103
+ */
104
+ hideChildrenMenu: boolean;
105
+ /**
106
+ * 是否隐藏菜单
107
+ */
108
+ hideMenu?: boolean;
109
+ /**
110
+ * 别名英文标题
111
+ */
112
+ aliasEntitle?: string | null;
113
+ /**
114
+ * 是否缓存路由组件
115
+ */
116
+ keepAlive?: boolean;
117
+ }
118
+ /**
119
+ * 菜单项
120
+ */
121
+ export interface MeMenuItem {
122
+ /**
123
+ * 菜单ID
124
+ */
125
+ id: string;
126
+ /**
127
+ * 父级菜单ID
128
+ */
129
+ parentId: string;
130
+ /**
131
+ * 子菜单
132
+ */
133
+ children?: MeMenuItem[] | null;
134
+ /**
135
+ * 排序
136
+ */
137
+ sort: number;
138
+ /**
139
+ * 菜单标题
140
+ */
141
+ title: string;
142
+ /**
143
+ * 菜单英文标题
144
+ */
145
+ enTitle: string;
146
+ /**
147
+ * 菜单封面
148
+ */
149
+ cover: string;
150
+ /**
151
+ * 图标
152
+ */
153
+ icon: string;
154
+ /**
155
+ * 菜单是否启用
156
+ */
157
+ enableFlag: boolean;
158
+ /**
159
+ * 菜单是否在导航栏中隐藏
160
+ */
161
+ hideFlag: boolean;
162
+ /**
163
+ * 菜单 meta
164
+ */
165
+ meta: MeMenuMetaItem;
166
+ /**
167
+ * 别名标题
168
+ */
169
+ aliasTitle?: string;
170
+ /**
171
+ * 别名英文标题
172
+ */
173
+ aliasEntitle?: string | null;
174
+ }
175
+ /**
176
+ * MeMenu 组件 Props
177
+ */
178
+ export interface MeMenuProps {
179
+ /**
180
+ * 菜单数据
181
+ */
182
+ data?: MeMenuItem[];
183
+ /**
184
+ * 当前激活的一级菜单 ID,支持 v-model
185
+ */
186
+ activeId?: string;
187
+ /**
188
+ * 默认激活的一级菜单 ID(非受控模式)
189
+ */
190
+ defaultActiveId?: string;
191
+ /**
192
+ * 当前选中的右侧菜单项 ID,支持 v-model
193
+ */
194
+ selectedId?: string;
195
+ /**
196
+ * 默认选中的右侧菜单项 ID(非受控模式)
197
+ */
198
+ defaultSelectedId?: string;
199
+ /**
200
+ * 是否启用路由模式(点击菜单触发路由跳转)
201
+ */
202
+ router?: boolean;
203
+ /**
204
+ * 左侧一级菜单宽度
205
+ */
206
+ leftWidth?: string | number;
207
+ /**
208
+ * 右侧子菜单宽度
209
+ */
210
+ rightWidth?: string | number;
211
+ /**
212
+ * 是否隐藏被禁用的菜单(enableFlag 为 false)
213
+ */
214
+ hideDisabled?: boolean;
215
+ /**
216
+ * 是否显示被隐藏的菜单(hideFlag 为 true 的菜单)
217
+ */
218
+ showHidden?: boolean;
219
+ /**
220
+ * 菜单高度,支持数字(px)或字符串(如 '100%'、'500px'、'80vh'),默认 '100%'
221
+ */
222
+ height?: string | number;
223
+ /**
224
+ * 左侧一级菜单背景,支持颜色值、渐变或图片 URL
225
+ */
226
+ background?: string;
227
+ /**
228
+ * 菜单项唯一标识的字段名,默认 'id'
229
+ */
230
+ keyField?: string;
231
+ /**
232
+ * 是否折叠左侧菜单(仅显示图标,悬停弹出子菜单),支持 v-model
233
+ */
234
+ collapsed?: boolean;
235
+ /**
236
+ * 折叠状态下左侧菜单的宽度,默认 64px
237
+ */
238
+ collapsedWidth?: string | number;
239
+ }
240
+ /**
241
+ * MeMenu 组件 Emits
242
+ */
243
+ export interface MeMenuEmits {
244
+ /**
245
+ * 激活的一级菜单 ID 变化时触发
246
+ */
247
+ (e: 'update:activeId', value: string): void;
248
+ /**
249
+ * 选中的右侧菜单项 ID 变化时触发
250
+ */
251
+ (e: 'update:selectedId', value: string): void;
252
+ /**
253
+ * 点击菜单项时触发
254
+ * @param item - 被点击的菜单项
255
+ */
256
+ (e: 'select', item: MeMenuItem): void;
257
+ /**
258
+ * 一级菜单切换时触发
259
+ * @param item - 切换到的一级菜单项
260
+ */
261
+ (e: 'change', item: MeMenuItem): void;
262
+ /**
263
+ * 折叠状态变化时触发
264
+ */
265
+ (e: 'update:collapsed', value: boolean): void;
266
+ }
267
+ /**
268
+ * MeMenu 组件实例类型
269
+ */
270
+ export type MeMenuInstance = InstanceType<typeof import('./index.vue').default>;
@@ -0,0 +1,16 @@
1
+ import { default as MeMessageComponent } from './index.vue';
2
+ import { Router } from 'vue-router';
3
+ import { MeMessageOptions, MeMessageInstance } from './types';
4
+ /**
5
+ * 函数式调用消息对话框
6
+ * @param options - 配置参数
7
+ * @returns 消息对话框实例,可调用 close() 手动关闭
8
+ */
9
+ declare const MeMessage: {
10
+ (options?: MeMessageOptions): MeMessageInstance;
11
+ closeAll(): void;
12
+ setupRouter(router: Router): void;
13
+ };
14
+ export { MeMessage, MeMessageComponent };
15
+ export default MeMessage;
16
+ export * from './types';
@@ -0,0 +1,39 @@
1
+ import { MeMessageProps, MeMessageData, MeMessageHandler } from './types';
2
+ declare var __VLS_17: {}, __VLS_35: {};
3
+ type __VLS_Slots = {} & {
4
+ 'me-message-footer'?: (props: typeof __VLS_17) => any;
5
+ } & {
6
+ title?: (props: typeof __VLS_35) => any;
7
+ };
8
+ declare const __VLS_base: import('vue').DefineComponent<MeMessageProps, {
9
+ /** 关闭对话框 */
10
+ close: () => void;
11
+ /** 隐藏对话框(仅切换显示状态,不触发关闭事件和销毁) */
12
+ hide: () => void;
13
+ /** 显示对话框(仅切换显示状态,不触发额外事件) */
14
+ show: () => void;
15
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
+ "update:modelValue": (value: boolean) => any;
17
+ closed: () => any;
18
+ }, string, import('vue').PublicProps, Readonly<MeMessageProps> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
20
+ onClosed?: (() => any) | undefined;
21
+ }>, {
22
+ modelValue: boolean;
23
+ request: (data: any) => Promise<any>;
24
+ data: MeMessageData;
25
+ handler: MeMessageHandler;
26
+ closeOnRouteChange: boolean;
27
+ centered: boolean;
28
+ top: string | number;
29
+ width: string | number;
30
+ onDestroy: () => void;
31
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
32
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
35
+ type __VLS_WithSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
@@ -0,0 +1,97 @@
1
+ /**
2
+ * MeMessage 消息对话框类型定义
3
+ */
4
+ /** 按钮类型 */
5
+ export type MeMessageType = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'default';
6
+ /** 状态配置 */
7
+ export interface MeMessageStateConfig {
8
+ /** 标题 */
9
+ title?: string;
10
+ /** 消息内容(支持 HTML) */
11
+ message?: string;
12
+ /** 确认按钮 loading 状态 */
13
+ loading?: boolean;
14
+ /** 确认按钮类型 */
15
+ type?: MeMessageType;
16
+ }
17
+ /** 请求配置 */
18
+ export interface MeMessageRequest {
19
+ /** 请求 API 方法 */
20
+ api?: (data?: any) => Promise<any>;
21
+ /** 请求参数 */
22
+ data?: any;
23
+ }
24
+ /** 多状态数据配置 */
25
+ export interface MeMessageData {
26
+ /** 正常状态配置 */
27
+ normal?: MeMessageStateConfig;
28
+ /** 处理中状态配置 */
29
+ process?: MeMessageStateConfig;
30
+ /** 请求配置 */
31
+ request?: MeMessageRequest;
32
+ }
33
+ /** 处理器对象 */
34
+ export interface MeMessageHandler {
35
+ /** 确认回调,返回 false 可阻止关闭,参数为 request.api 的响应数据 */
36
+ confirm?: (data?: any) => boolean | Promise<boolean> | void;
37
+ /** 取消回调,返回 false 可阻止关闭 */
38
+ cancel?: () => boolean | Promise<boolean> | void;
39
+ }
40
+ /** MeMessage 消息对话框 Props */
41
+ export interface MeMessageProps {
42
+ /** 是否显示(v-model),组件式调用时使用 */
43
+ modelValue?: boolean;
44
+ /** 全局请求方法,当 data.request 未配置 api 时使用 */
45
+ request?: (data: any) => Promise<any>;
46
+ /** 多状态数据配置(normal / process / request) */
47
+ data?: MeMessageData;
48
+ /** 处理器对象(confirm / cancel 回调) */
49
+ handler?: MeMessageHandler;
50
+ /** 路由变化时是否隐藏弹窗,切回原路由时自动恢复,默认 true */
51
+ closeOnRouteChange?: boolean;
52
+ /** 是否垂直居中显示,默认 true */
53
+ centered?: boolean;
54
+ /** 弹窗距离顶部的距离,centered 为 false 时生效 */
55
+ top?: string | number;
56
+ /** 对话框宽度,默认 380px */
57
+ width?: string | number;
58
+ /** 关闭后回调 */
59
+ onClosed?: () => void;
60
+ /** 销毁回调 */
61
+ onDestroy?: () => void;
62
+ }
63
+ /** MeMessage 消息对话框 Events */
64
+ export interface MeMessageEmits {
65
+ (e: 'update:modelValue', value: boolean): void;
66
+ (e: 'closed'): void;
67
+ }
68
+ /** MeMessage 函数式调用参数 */
69
+ export interface MeMessageOptions {
70
+ /** 全局请求方法 */
71
+ request?: (data: any) => Promise<any>;
72
+ /** 多状态数据配置 */
73
+ data?: MeMessageData;
74
+ /** 处理器对象 */
75
+ handler?: MeMessageHandler;
76
+ /** 路由变化时是否隐藏 */
77
+ closeOnRouteChange?: boolean;
78
+ /** 是否垂直居中显示 */
79
+ centered?: boolean;
80
+ /** 弹窗距离顶部的距离,centered 为 false 时生效 */
81
+ top?: string | number;
82
+ /** 对话框宽度 */
83
+ width?: string | number;
84
+ /** 关闭回调 */
85
+ onClose?: () => void;
86
+ }
87
+ /** MeMessage 函数式调用返回实例 */
88
+ export interface MeMessageInstance {
89
+ /** 关闭对话框 */
90
+ close: () => void;
91
+ /** 隐藏对话框(仅切换显示,不销毁) */
92
+ hide?: () => void;
93
+ /** 显示对话框 */
94
+ show?: () => void;
95
+ }
96
+ /** MeMessage 组件实例类型 */
97
+ export type MeMessageComponentInstance = InstanceType<typeof import('./index.vue').default>;
@@ -0,0 +1,4 @@
1
+ import { default as MeModal } from './index.vue';
2
+ export { MeModal };
3
+ export default MeModal;
4
+ export * from './types';
@@ -0,0 +1,36 @@
1
+ import { MeModalProps } from './types';
2
+ declare var __VLS_18: {}, __VLS_30: {};
3
+ type __VLS_Slots = {} & {
4
+ title?: (props: typeof __VLS_18) => any;
5
+ } & {
6
+ default?: (props: typeof __VLS_30) => any;
7
+ };
8
+ declare const __VLS_base: import('vue').DefineComponent<MeModalProps, {
9
+ /** 切换全屏 */
10
+ toggleFullscreen: () => void;
11
+ /** 是否全屏 */
12
+ isFullscreen: import('vue').Ref<boolean, boolean>;
13
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
14
+ cancel: (event: MouseEvent) => any;
15
+ ok: (event: MouseEvent) => any;
16
+ "update:open": (value: boolean) => any;
17
+ "fullscreen-change": (value: boolean) => any;
18
+ }, string, import('vue').PublicProps, Readonly<MeModalProps> & Readonly<{
19
+ onCancel?: ((event: MouseEvent) => any) | undefined;
20
+ onOk?: ((event: MouseEvent) => any) | undefined;
21
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
22
+ "onFullscreen-change"?: ((value: boolean) => any) | undefined;
23
+ }>, {
24
+ width: string | number;
25
+ open: boolean;
26
+ fullscreen: boolean;
27
+ defaultFullscreen: boolean;
28
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -0,0 +1,24 @@
1
+ import { ModalProps } from 'antdv-next';
2
+ /** MeModal 对话框 Props */
3
+ export interface MeModalProps extends Omit<ModalProps, 'open'> {
4
+ /** 是否显示(v-model:open) */
5
+ open?: boolean;
6
+ /** 是否显示全屏按钮,默认 true */
7
+ fullscreen?: boolean;
8
+ /** 是否默认全屏显示,默认 false */
9
+ defaultFullscreen?: boolean;
10
+ /** 对话框宽度,默认 520(非全屏状态下生效) */
11
+ width?: string | number;
12
+ }
13
+ /** MeModal 对话框 Events */
14
+ export interface MeModalEmits {
15
+ (e: 'update:open', value: boolean): void;
16
+ /** 全屏状态变化 */
17
+ (e: 'fullscreen-change', value: boolean): void;
18
+ /** 点击确定按钮 */
19
+ (e: 'ok', event: MouseEvent): void;
20
+ /** 点击取消按钮 */
21
+ (e: 'cancel', event: MouseEvent): void;
22
+ }
23
+ /** MeModal 组件实例类型 */
24
+ export type MeModalInstance = InstanceType<typeof import('./index.vue').default>;
@@ -0,0 +1,4 @@
1
+ import { default as MeNav } from './index.vue';
2
+ export { MeNav };
3
+ export default MeNav;
4
+ export * from './types';
@@ -0,0 +1,37 @@
1
+ import { MeNavProps, MeNavTabItemData } from './types';
2
+ declare var __VLS_1: {}, __VLS_16: {
3
+ item: MeNavTabItemData;
4
+ }, __VLS_38: {};
5
+ type __VLS_Slots = {} & {
6
+ left?: (props: typeof __VLS_1) => any;
7
+ } & {
8
+ icon?: (props: typeof __VLS_16) => any;
9
+ } & {
10
+ right?: (props: typeof __VLS_38) => any;
11
+ };
12
+ declare const __VLS_base: import('vue').DefineComponent<MeNavProps, {
13
+ scrollToTab: (key?: string) => void;
14
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
15
+ "update:modelValue": (value: string) => any;
16
+ "tab-change": (value: string) => any;
17
+ "tab-remove": (value: string) => any;
18
+ }, string, import('vue').PublicProps, Readonly<MeNavProps> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
20
+ "onTab-change"?: ((value: string) => any) | undefined;
21
+ "onTab-remove"?: ((value: string) => any) | undefined;
22
+ }>, {
23
+ modelValue: string;
24
+ width: number | string;
25
+ tabList: MeNavTabItemData[];
26
+ menuHandle: (item: MeNavTabItemData, index: number) => import('./types').MeNavMenuItem[];
27
+ tabProps: import('./types').MeNavTabProps;
28
+ scrollTargetOffset: number;
29
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
30
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,102 @@
1
+ import { Component } from 'vue';
2
+ /** 导航 Tab 项数据结构 */
3
+ export interface MeNavTabItem {
4
+ /** 路径 / 唯一标识 */
5
+ path: string;
6
+ /** 名称 */
7
+ name: string;
8
+ /** 标题 */
9
+ title: string;
10
+ /** 图标(图标名称或自定义组件) */
11
+ icon?: string | Component;
12
+ /** 是否锁定(锁定后不可关闭),默认 false */
13
+ lock?: boolean;
14
+ /** 是否是首页(首页不可关闭),默认 false */
15
+ isHome?: boolean;
16
+ /** 其他自定义属性 */
17
+ [key: string]: any;
18
+ }
19
+ /** Tab 属性映射配置,用于自定义数据字段名 */
20
+ export interface MeNavTabProps {
21
+ /** 唯一标识字段名,默认 'path' */
22
+ key?: string;
23
+ /** 标签显示字段名,默认 'title' */
24
+ label?: string;
25
+ /** 名称字段名,默认 'path' */
26
+ name?: string;
27
+ /** 是否首页字段名,默认 'isHome' */
28
+ isHome?: string;
29
+ /** 是否锁定字段名,默认 'lock' */
30
+ lock?: string;
31
+ /** 图标字段名,默认 'icon' */
32
+ icon?: string;
33
+ }
34
+ /** 任意 Tab 项数据类型,配合 tabProps 字段映射使用 */
35
+ export type MeNavTabItemData = Record<string, any>;
36
+ /** 右键菜单项 */
37
+ export interface MeNavMenuItem {
38
+ /** 菜单项标签 */
39
+ label: string;
40
+ /** 菜单项图标(Lucide 图标名称) */
41
+ icon?: string;
42
+ /** 是否禁用 */
43
+ disabled?: boolean;
44
+ /** 是否显示分割线 */
45
+ divided?: boolean;
46
+ /** 点击回调 */
47
+ onClick?: () => void;
48
+ }
49
+ /** MeNav 组件 Props */
50
+ export interface MeNavProps {
51
+ /**
52
+ * Tab 列表数据
53
+ */
54
+ tabList: MeNavTabItemData[];
55
+ /**
56
+ * 右键菜单配置函数,返回菜单项数组
57
+ * @param item - 当前 Tab 项数据
58
+ * @param index - 当前 Tab 索引
59
+ * @returns 右键菜单项数组
60
+ */
61
+ menuHandle?: (item: MeNavTabItemData, index: number) => MeNavMenuItem[];
62
+ /**
63
+ * Tab 字段映射配置,用于自定义数据字段名
64
+ */
65
+ tabProps?: MeNavTabProps;
66
+ /**
67
+ * 绑定值(当前激活的 Tab name),支持 v-model
68
+ */
69
+ modelValue?: string;
70
+ /**
71
+ * 组件宽度,支持数字(px)或字符串(如 '500px' / '100%' / '50vw')
72
+ */
73
+ width?: number | string;
74
+ /**
75
+ * 点击可视区首尾 Tab 时的额外滚动量
76
+ * - 数字(0 ~ 1):比例,额外滚动量 = 比例 × 可视区宽度
77
+ * - 数字(> 1):像素值,直接指定额外滚动的像素数
78
+ * - 默认 0.1(可视区宽度的 10%)
79
+ * @default 0.1
80
+ */
81
+ scrollTargetOffset?: number;
82
+ }
83
+ /** MeNav 组件 Emits */
84
+ export interface MeNavEmits {
85
+ /**
86
+ * Tab 切换时触发
87
+ * @param value - 当前激活的 Tab name
88
+ */
89
+ (e: 'update:modelValue', value: string): void;
90
+ /**
91
+ * Tab 切换时触发
92
+ * @param value - 当前激活的 Tab name
93
+ */
94
+ (e: 'tab-change', value: string): void;
95
+ /**
96
+ * Tab 关闭时触发
97
+ * @param value - 被关闭的 Tab name
98
+ */
99
+ (e: 'tab-remove', value: string): void;
100
+ }
101
+ /** MeNav 组件实例类型 */
102
+ export type MeNavInstance = InstanceType<typeof import('./index.vue').default>;
@@ -0,0 +1,35 @@
1
+ import { PropType } from 'vue';
2
+ import { MeTreeMenuAction } from './types';
3
+ declare var __VLS_53: {};
4
+ type __VLS_Slots = {} & {
5
+ 'dropdown-item'?: (props: typeof __VLS_53) => any;
6
+ };
7
+ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
8
+ /** 动作标签配置(v-model) */
9
+ actions: {
10
+ type: PropType<MeTreeMenuAction[]>;
11
+ default: () => MeTreeMenuAction[];
12
+ };
13
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
14
+ "update:actions": (actions: MeTreeMenuAction[]) => any;
15
+ "toggle-expand-all": (expanded: boolean) => any;
16
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
17
+ /** 动作标签配置(v-model) */
18
+ actions: {
19
+ type: PropType<MeTreeMenuAction[]>;
20
+ default: () => MeTreeMenuAction[];
21
+ };
22
+ }>> & Readonly<{
23
+ "onUpdate:actions"?: ((actions: MeTreeMenuAction[]) => any) | undefined;
24
+ "onToggle-expand-all"?: ((expanded: boolean) => any) | undefined;
25
+ }>, {
26
+ actions: MeTreeMenuAction[];
27
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
28
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };