@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.
- package/LICENSE +21 -0
- package/README.md +154 -0
- package/components/ASvgIcon.vue.d.ts +34 -0
- package/components/DeclarationIcon.vue.d.ts +3 -0
- package/components/ExpoIcon.vue.d.ts +3 -0
- package/components/HomeIcon.vue.d.ts +3 -0
- package/components/HwcIcon.vue.d.ts +3 -0
- package/components/InsuranceIcon.vue.d.ts +3 -0
- package/components/LawIcon.vue.d.ts +3 -0
- package/components/LocationIcon.vue.d.ts +3 -0
- package/components/SelectionIcon.vue.d.ts +3 -0
- package/components/SingleWindowIcon.vue.d.ts +3 -0
- package/components/TaxationIcon.vue.d.ts +3 -0
- package/components/TradeDataIcon.vue.d.ts +3 -0
- package/components/TrainingIcon.vue.d.ts +3 -0
- package/components/icon-image/index.vue.d.ts +10 -0
- package/index.d.ts +2 -0
- package/index.mjs +8107 -0
- package/index.umd.js +104 -0
- package/package.json +29 -0
- package/style.css +1 -0
- package/yue-page-footer/data/privacy-policy.vue.d.ts +2 -0
- package/yue-page-footer/data/terms-of-service.vue.d.ts +2 -0
- package/yue-page-footer/index.vue.d.ts +3 -0
- package/yue-page-header/breadcrumb/index.vue.d.ts +3 -0
- package/yue-page-header/first-menus/index.vue.d.ts +785 -0
- package/yue-page-header/helper.d.ts +72 -0
- package/yue-page-header/index.vue.d.ts +3 -0
- package/yue-page-header/right-content/index.vue.d.ts +3 -0
- package/yue-page-header/second-menus/index.vue.d.ts +3 -0
|
@@ -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;
|