@yueglobal/vue-ui 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.
@@ -0,0 +1,72 @@
1
+ import { Component, VNode } from 'vue';
2
+ export interface YueMenuItem {
3
+ key: string;
4
+ label: string;
5
+ icon?: Component | VNode;
6
+ children?: YueMenuItem[];
7
+ request?: string;
8
+ className?: string;
9
+ }
10
+ export interface YueBreadcrumb {
11
+ key?: string;
12
+ label: string;
13
+ }
14
+ export declare const mainHost = "https://www.yueglobal.com";
15
+ /**
16
+ * 一级菜单(主菜单)
17
+ */
18
+ export declare const firstMenuList: YueMenuItem[];
19
+ /**
20
+ * 将树结构转换为一维数组
21
+ * @param data
22
+ */
23
+ export declare function flattenTreeList<T extends {
24
+ children?: T[];
25
+ }>(data: T[]): T[];
26
+ /**
27
+ * 将 firstMenuList 转换为一维数组并根据 key 长度排序
28
+ * @param isSort 是否进行排序
29
+ * @returns 排序后的一维数组
30
+ */
31
+ export declare function flattenMenuList(isSort?: boolean): YueMenuItem[];
32
+ /**
33
+ * 加载script域外资源
34
+ * @param src
35
+ * @param async
36
+ */
37
+ export declare function loadScript(src: string, async?: boolean): Promise<unknown>;
38
+ /**
39
+ * 检查页面中是否已存在指定文件名的script资源
40
+ * @param filename 要检查的脚本文件名
41
+ * @returns 如果存在返回true,否则返回false
42
+ */
43
+ export declare function checkExistScript(filename: string): boolean;
44
+ export interface YueRouteData {
45
+ id?: string;
46
+ parentId?: string;
47
+ title: string;
48
+ name?: string;
49
+ path: string;
50
+ selfPath?: string;
51
+ }
52
+ /**
53
+ * 根据path值获取完整的节点路径数组(支持动态路由参数)
54
+ * @param arr - 包含id, parentId, title, path字段的数组
55
+ * @param path - 要查找的完整path值
56
+ * @returns 完整的节点路径数组,如果未找到则返回空数组
57
+ */
58
+ export declare function getFullPathNodesByPath<T extends YueRouteData>(arr: T[], path: string): T[];
59
+ /**
60
+ * 根据path值对数组进行去重
61
+ * @param arr - 包含path字段的数组
62
+ * @returns 去重后的数组
63
+ */
64
+ export declare function uniqByPath<T extends {
65
+ path: string;
66
+ }>(arr: T[]): T[];
67
+ /**
68
+ * 深度拷贝对象或数组
69
+ * @param obj - 要深度拷贝的对象或数组
70
+ * @returns 拷贝后的新对象或数组
71
+ */
72
+ export declare function deepClone<T>(obj: T): T;
@@ -0,0 +1,3 @@
1
+ declare const _default: FirstMenus.DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, FirstMenus.PublicProps>;
2
+ export default _default;
3
+ import FirstMenus from './first-menus/index.vue';
@@ -0,0 +1,3 @@
1
+ declare const _default: SingleWindowIcon.DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, SingleWindowIcon.PublicProps>;
2
+ export default _default;
3
+ import SingleWindowIcon from '../../components/SingleWindowIcon.vue';
@@ -0,0 +1,3 @@
1
+ declare const _default: Breadcrumb.DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, Breadcrumb.PublicProps>;
2
+ export default _default;
3
+ import Breadcrumb from '../breadcrumb/index.vue';