easy-ep-ui 0.1.1 → 0.2.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 +172 -0
- package/README.md +29 -14
- package/dist/easy-ep-ui.js +1 -1
- package/dist/style.css +1 -1
- package/es/charts/BaseBar/index.d.ts +2 -0
- package/es/charts/BaseBar/src/index.vue.d.ts +45 -0
- package/es/charts/BaseLine/index.d.ts +2 -0
- package/es/charts/BaseLine/src/index.vue.d.ts +47 -0
- package/es/charts/BasePie/index.d.ts +2 -0
- package/es/charts/BasePie/src/index.vue.d.ts +41 -0
- package/es/charts/BaseRadar/index.d.ts +2 -0
- package/es/charts/BaseRadar/src/index.vue.d.ts +47 -0
- package/es/charts/config.d.ts +32 -0
- package/es/charts/index.d.ts +8 -0
- package/es/charts/useChart.d.ts +21 -0
- package/es/components/ee-dept-cascader/index.d.ts +2 -0
- package/es/components/ee-dept-cascader/src/index.vue.d.ts +26 -0
- package/es/components/ee-dept-cascader/type.d.ts +39 -0
- package/es/components/ee-dict-select/src/index.vue.d.ts +19 -18
- package/es/components/ee-dict-select/type.d.ts +54 -0
- package/es/components/ee-form-dialog/src/index.vue.d.ts +108 -8
- package/es/components/ee-form-table/src/components/FormAuto.vue.d.ts +115 -0
- package/es/components/ee-form-table/src/components/FormDrawer.vue.d.ts +280 -7
- package/es/components/ee-form-table/src/components/TableToolbar.vue.d.ts +10 -3
- package/es/components/ee-form-table/src/constants.d.ts +2 -2
- package/es/components/ee-form-table/src/hooks/useCrud.d.ts +3 -1
- package/es/components/ee-form-table/src/hooks/useExport.d.ts +2 -0
- package/es/components/ee-form-table/src/hooks/useForm.d.ts +4 -2
- package/es/components/ee-form-table/src/hooks/useTable.d.ts +28 -11
- package/es/components/ee-form-table/src/index.vue.d.ts +33 -2
- package/es/components/ee-form-table/types.d.ts +86 -1
- package/es/components/ee-remote-select/index.d.ts +2 -0
- package/es/components/ee-remote-select/src/index.vue.d.ts +30 -0
- package/es/components/ee-remote-select/type.d.ts +53 -0
- package/es/components/ee-role-select/index.d.ts +2 -0
- package/es/components/ee-role-select/src/index.vue.d.ts +29 -0
- package/es/components/ee-role-select/type.d.ts +44 -0
- package/es/components/ee-search-bar/src/index.vue.d.ts +80 -10
- package/es/components/ee-status-tag/src/index.vue.d.ts +1 -1
- package/es/components/ee-user-select/index.d.ts +2 -0
- package/es/components/ee-user-select/src/index.vue.d.ts +29 -0
- package/es/components/ee-user-select/type.d.ts +46 -0
- package/es/hooks/index.d.ts +4 -0
- package/es/hooks/useRemoteSelectPagination.d.ts +68 -0
- package/es/hooks/useSelectEcho.d.ts +27 -0
- package/es/index.d.ts +50 -2
- package/es/index.mjs +3119 -1092
- package/es/locale/en.d.ts +3 -0
- package/es/locale/index.d.ts +91 -0
- package/es/locale/useLocale.d.ts +13 -0
- package/es/locale/zh-cn.d.ts +3 -0
- package/es/style.css +1 -1
- package/es/utils/types.d.ts +39 -0
- package/lib/charts/BaseBar/index.d.ts +2 -0
- package/lib/charts/BaseBar/src/index.vue.d.ts +45 -0
- package/lib/charts/BaseLine/index.d.ts +2 -0
- package/lib/charts/BaseLine/src/index.vue.d.ts +47 -0
- package/lib/charts/BasePie/index.d.ts +2 -0
- package/lib/charts/BasePie/src/index.vue.d.ts +41 -0
- package/lib/charts/BaseRadar/index.d.ts +2 -0
- package/lib/charts/BaseRadar/src/index.vue.d.ts +47 -0
- package/lib/charts/config.d.ts +32 -0
- package/lib/charts/index.d.ts +8 -0
- package/lib/charts/useChart.d.ts +21 -0
- package/lib/components/ee-dept-cascader/index.d.ts +2 -0
- package/lib/components/ee-dept-cascader/src/index.vue.d.ts +26 -0
- package/lib/components/ee-dept-cascader/type.d.ts +39 -0
- package/lib/components/ee-dict-select/src/index.vue.d.ts +19 -18
- package/lib/components/ee-dict-select/type.d.ts +54 -0
- package/lib/components/ee-form-dialog/src/index.vue.d.ts +108 -8
- package/lib/components/ee-form-table/src/components/FormAuto.vue.d.ts +115 -0
- package/lib/components/ee-form-table/src/components/FormDrawer.vue.d.ts +280 -7
- package/lib/components/ee-form-table/src/components/TableToolbar.vue.d.ts +10 -3
- package/lib/components/ee-form-table/src/constants.d.ts +2 -2
- package/lib/components/ee-form-table/src/hooks/useCrud.d.ts +3 -1
- package/lib/components/ee-form-table/src/hooks/useExport.d.ts +2 -0
- package/lib/components/ee-form-table/src/hooks/useForm.d.ts +4 -2
- package/lib/components/ee-form-table/src/hooks/useTable.d.ts +28 -11
- package/lib/components/ee-form-table/src/index.vue.d.ts +33 -2
- package/lib/components/ee-form-table/types.d.ts +86 -1
- package/lib/components/ee-remote-select/index.d.ts +2 -0
- package/lib/components/ee-remote-select/src/index.vue.d.ts +30 -0
- package/lib/components/ee-remote-select/type.d.ts +53 -0
- package/lib/components/ee-role-select/index.d.ts +2 -0
- package/lib/components/ee-role-select/src/index.vue.d.ts +29 -0
- package/lib/components/ee-role-select/type.d.ts +44 -0
- package/lib/components/ee-search-bar/src/index.vue.d.ts +80 -10
- package/lib/components/ee-status-tag/src/index.vue.d.ts +1 -1
- package/lib/components/ee-user-select/index.d.ts +2 -0
- package/lib/components/ee-user-select/src/index.vue.d.ts +29 -0
- package/lib/components/ee-user-select/type.d.ts +46 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/useRemoteSelectPagination.d.ts +68 -0
- package/lib/hooks/useSelectEcho.d.ts +27 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +50 -2
- package/lib/locale/en.d.ts +3 -0
- package/lib/locale/index.d.ts +91 -0
- package/lib/locale/useLocale.d.ts +13 -0
- package/lib/locale/zh-cn.d.ts +3 -0
- package/lib/style.css +1 -1
- package/lib/utils/types.d.ts +39 -0
- package/package.json +5 -2
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 国际化语言包类型定义和合并工具
|
|
3
|
+
*
|
|
4
|
+
* 所有组件 UI 字符串集中管理,支持中文(zh-cn)和英文(en)两种内置语言,
|
|
5
|
+
* 可自定义/覆盖部分文字。
|
|
6
|
+
*/
|
|
7
|
+
export interface Locale {
|
|
8
|
+
formTable: {
|
|
9
|
+
operation: string;
|
|
10
|
+
add: string;
|
|
11
|
+
edit: string;
|
|
12
|
+
delete: string;
|
|
13
|
+
view: string;
|
|
14
|
+
import: string;
|
|
15
|
+
export: string;
|
|
16
|
+
batchDelete: string;
|
|
17
|
+
refresh: string;
|
|
18
|
+
columnSetting: string;
|
|
19
|
+
search: string;
|
|
20
|
+
reset: string;
|
|
21
|
+
expand: string;
|
|
22
|
+
collapse: string;
|
|
23
|
+
empty: string;
|
|
24
|
+
confirm: string;
|
|
25
|
+
cancel: string;
|
|
26
|
+
close: string;
|
|
27
|
+
confirmDelete: string;
|
|
28
|
+
confirmDeleteMsg: string;
|
|
29
|
+
confirmBatchDelete: string;
|
|
30
|
+
confirmBatchDeleteMsg: string;
|
|
31
|
+
addTitle: string;
|
|
32
|
+
editTitle: string;
|
|
33
|
+
viewTitle: string;
|
|
34
|
+
addSuccess: string;
|
|
35
|
+
editSuccess: string;
|
|
36
|
+
deleteSuccess: string;
|
|
37
|
+
batchDeleteSuccess: string;
|
|
38
|
+
refreshSuccess: string;
|
|
39
|
+
exportSuccess: string;
|
|
40
|
+
exportFail: string;
|
|
41
|
+
requestFailed: string;
|
|
42
|
+
deleteFailed: string;
|
|
43
|
+
batchDeleteFailed: string;
|
|
44
|
+
installXlsx: string;
|
|
45
|
+
exportFileName: string;
|
|
46
|
+
inputPlaceholder: string;
|
|
47
|
+
selectPlaceholder: string;
|
|
48
|
+
dateRangeTo: string;
|
|
49
|
+
dateRangeStart: string;
|
|
50
|
+
dateRangeEnd: string;
|
|
51
|
+
version: string;
|
|
52
|
+
versionTitle: string;
|
|
53
|
+
moreActions: string;
|
|
54
|
+
rowIndex: string;
|
|
55
|
+
selectionLabel: string;
|
|
56
|
+
};
|
|
57
|
+
searchBar: {
|
|
58
|
+
search: string;
|
|
59
|
+
reset: string;
|
|
60
|
+
expand: string;
|
|
61
|
+
collapse: string;
|
|
62
|
+
inputPlaceholder: string;
|
|
63
|
+
selectPlaceholder: string;
|
|
64
|
+
dateRangeTo: string;
|
|
65
|
+
dateRangeStart: string;
|
|
66
|
+
dateRangeEnd: string;
|
|
67
|
+
};
|
|
68
|
+
formDialog: {
|
|
69
|
+
confirm: string;
|
|
70
|
+
cancel: string;
|
|
71
|
+
title: string;
|
|
72
|
+
inputPlaceholder: string;
|
|
73
|
+
textareaPlaceholder: string;
|
|
74
|
+
selectPlaceholder: string;
|
|
75
|
+
datePickerPlaceholder: string;
|
|
76
|
+
};
|
|
77
|
+
remoteSelect: {
|
|
78
|
+
loading: string;
|
|
79
|
+
noMore: string;
|
|
80
|
+
loadMore: string;
|
|
81
|
+
searchPlaceholder: string;
|
|
82
|
+
requestFailed: string;
|
|
83
|
+
noData: string;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export { default as zhCn } from './zh-cn';
|
|
87
|
+
export { default as en } from './en';
|
|
88
|
+
/**
|
|
89
|
+
* 浅合并 locale 对象,目标字段为 undefined 时使用默认值
|
|
90
|
+
*/
|
|
91
|
+
export declare function mergeLocale(target: Partial<Locale> | undefined, fallback: Locale): Locale;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Locale } from '.';
|
|
2
|
+
/** 全局 locale 的注入 key */
|
|
3
|
+
export declare const EE_LOCALE_KEY = "eeLocale";
|
|
4
|
+
/**
|
|
5
|
+
* 获取当前 locale 上下文
|
|
6
|
+
*
|
|
7
|
+
* 组件中可通过 useLocale() 获取 t 函数和当前语言包对象。
|
|
8
|
+
* t(key) 支持 {placeholder} 模板变量替换。
|
|
9
|
+
*/
|
|
10
|
+
export declare function useLocale(): {
|
|
11
|
+
locale: Locale;
|
|
12
|
+
t: (section: string, key: string, args?: Record<string, string | number>) => string;
|
|
13
|
+
};
|
package/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ee-search-bar[data-v-
|
|
1
|
+
.ee-search-bar[data-v-fe481020]{margin-bottom:16px}.ee-search-bar .el-form-item[data-v-fe481020]{margin-bottom:0}.ee-form-dialog-footer[data-v-929d8568]{display:flex;justify-content:flex-end;gap:12px}.ee-column-setting[data-v-951992f2]{max-height:320px;overflow-y:auto}.ee-column-setting-item[data-v-951992f2]{display:flex;align-items:center;justify-content:space-between;padding:4px 4px 4px 8px;cursor:grab;border-radius:4px;-webkit-user-select:none;user-select:none}.ee-column-setting-item[data-v-951992f2]:hover{background:var(--el-color-primary-light-9, #f0f5ff)}.ee-column-setting-item--drag-over[data-v-951992f2]{background:var(--el-color-primary-light-7, #d9ecff)}.ee-column-setting-drag[data-v-951992f2]{cursor:grab;color:#c0c4cc;font-size:14px}.ee-column-setting-drag[data-v-951992f2]:hover{color:#909399}.ee-column-setting-special[data-v-951992f2]{padding-bottom:4px}.ee-column-setting-item--special[data-v-951992f2]{cursor:default}.ee-column-setting-item--special[data-v-951992f2]:hover{background:transparent}.ee-form-table{display:flex;flex-direction:column;height:100%;background:#fff;border-radius:4px}.ee-search-area{padding:16px 16px 0;border-bottom:1px solid #ebeef5}.ee-search-area .el-form-item{margin-bottom:16px}.ee-toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;flex-shrink:0}.ee-toolbar-left{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ee-toolbar-right{display:flex;align-items:center;gap:8px}.ee-table-wrapper{flex:1;overflow:auto;padding:0 16px}.ee-table-wrapper .el-table{width:100%}.ee-table-wrapper .el-table th.el-table__cell{background-color:#f5f7fa}.app-root.dark .ee-table-wrapper .el-table th.el-table__cell{background-color:#2a2a2a}.ee-pagination{display:flex;justify-content:flex-end;padding:12px 16px;border-top:1px solid #ebeef5;flex-shrink:0}.ee-size--small{font-size:13px}.ee-size--large{font-size:16px}.ee-action-btns{display:flex;align-items:center;justify-content:center;gap:2px;flex-wrap:nowrap}.ee-action-btn{white-space:nowrap!important}.ee-action-btn .el-icon{margin-right:0}.ee-load-more[data-v-21c5d143],.ee-no-more[data-v-21c5d143]{display:flex;align-items:center;justify-content:center;padding:8px 0;font-size:12px;color:#999;cursor:pointer}.ee-load-more[data-v-21c5d143]:hover{color:#409eff}.ee-loading-tip[data-v-21c5d143]{display:flex;align-items:center;justify-content:center;padding:8px 0;font-size:12px;color:#999}.ee-load-more[data-v-6e78b80d],.ee-no-more[data-v-6e78b80d]{display:flex;align-items:center;justify-content:center;padding:8px 0;font-size:12px;color:#999;cursor:pointer}.ee-load-more[data-v-6e78b80d]:hover{color:#409eff}.ee-loading-tip[data-v-6e78b80d]{display:flex;align-items:center;justify-content:center;padding:8px 0;font-size:12px;color:#999}.ee-load-more[data-v-58cd12c9],.ee-no-more[data-v-58cd12c9]{display:flex;align-items:center;justify-content:center;padding:8px 0;font-size:12px;color:#999;cursor:pointer}.ee-load-more[data-v-58cd12c9]:hover{color:#409eff}.ee-loading-tip[data-v-58cd12c9]{display:flex;align-items:center;justify-content:center;padding:8px 0;font-size:12px;color:#999}
|
package/es/utils/types.d.ts
CHANGED
|
@@ -1,48 +1,87 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
+
/** 下拉选项项 */
|
|
2
3
|
export interface DictOption {
|
|
4
|
+
/** 选项值 */
|
|
3
5
|
value: string | number;
|
|
6
|
+
/** 显示文本 */
|
|
4
7
|
label: string;
|
|
8
|
+
/** 是否禁用 */
|
|
5
9
|
disabled?: boolean;
|
|
6
10
|
[key: string]: unknown;
|
|
7
11
|
}
|
|
12
|
+
/** 搜索栏字段配置 */
|
|
8
13
|
export interface SearchField {
|
|
14
|
+
/** 字段 key */
|
|
9
15
|
prop: string;
|
|
16
|
+
/** 字段标签 */
|
|
10
17
|
label: string;
|
|
18
|
+
/** 字段类型:输入框/下拉/日期/日期范围/级联 */
|
|
11
19
|
type?: 'input' | 'select' | 'date' | 'date-range' | 'cascader';
|
|
20
|
+
/** 占位符 */
|
|
12
21
|
placeholder?: string;
|
|
22
|
+
/** 下拉/级联选项(type=select/cascader 时使用) */
|
|
13
23
|
options?: DictOption[];
|
|
24
|
+
/** 栅格占宽,默认 6 */
|
|
14
25
|
span?: number;
|
|
26
|
+
/** 自定义渲染组件 */
|
|
15
27
|
component?: VNode;
|
|
16
28
|
}
|
|
29
|
+
/** 表格列配置 */
|
|
17
30
|
export interface TableColumn {
|
|
31
|
+
/** 字段 key */
|
|
18
32
|
prop: string;
|
|
33
|
+
/** 列标题 */
|
|
19
34
|
label: string;
|
|
35
|
+
/** 列宽 */
|
|
20
36
|
width?: string | number;
|
|
37
|
+
/** 最小列宽 */
|
|
21
38
|
minWidth?: string | number;
|
|
39
|
+
/** 固定列(left/right) */
|
|
22
40
|
fixed?: 'left' | 'right';
|
|
41
|
+
/** 是否可排序 */
|
|
23
42
|
sortable?: boolean;
|
|
43
|
+
/** 对齐方式 */
|
|
24
44
|
align?: 'left' | 'center' | 'right';
|
|
45
|
+
/** 自定义格式化函数 */
|
|
25
46
|
formatter?: (row: Record<string, unknown>, column: TableColumn, cellValue: unknown, index: number) => VNode | string;
|
|
26
47
|
[key: string]: unknown;
|
|
27
48
|
}
|
|
49
|
+
/** 表单字段配置 */
|
|
28
50
|
export interface FormField {
|
|
51
|
+
/** 字段 key */
|
|
29
52
|
prop: string;
|
|
53
|
+
/** 字段标签 */
|
|
30
54
|
label: string;
|
|
55
|
+
/** 字段类型 */
|
|
31
56
|
type?: 'input' | 'textarea' | 'select' | 'radio' | 'checkbox' | 'date' | 'switch';
|
|
57
|
+
/** 占位符 */
|
|
32
58
|
placeholder?: string;
|
|
59
|
+
/** 校验规则 */
|
|
33
60
|
rules?: Record<string, unknown>[];
|
|
61
|
+
/** 选项数据 */
|
|
34
62
|
options?: DictOption[];
|
|
63
|
+
/** 栅格占宽 */
|
|
35
64
|
span?: number;
|
|
65
|
+
/** 自定义渲染组件 */
|
|
36
66
|
component?: VNode;
|
|
37
67
|
}
|
|
68
|
+
/** 分页信息 */
|
|
38
69
|
export interface Pagination {
|
|
70
|
+
/** 当前页 */
|
|
39
71
|
current: number;
|
|
72
|
+
/** 每页条数 */
|
|
40
73
|
pageSize: number;
|
|
74
|
+
/** 总条数 */
|
|
41
75
|
total: number;
|
|
42
76
|
}
|
|
77
|
+
/** 状态映射(用于 EeStatusTag) */
|
|
43
78
|
export interface StatusMapping {
|
|
79
|
+
/** 状态值 */
|
|
44
80
|
value: string | number;
|
|
81
|
+
/** 显示文字 */
|
|
45
82
|
label: string;
|
|
83
|
+
/** Element Plus Tag 类型 */
|
|
46
84
|
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
85
|
+
/** 主题效果 */
|
|
47
86
|
effect?: 'dark' | 'light' | 'plain';
|
|
48
87
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
width?: string;
|
|
3
|
+
height?: string;
|
|
4
|
+
/** X 轴类别数组 */
|
|
5
|
+
xAxisData?: (string | number)[];
|
|
6
|
+
/** 系列数据 [{ name, data, color?, stack? }] */
|
|
7
|
+
seriesData?: {
|
|
8
|
+
name: string;
|
|
9
|
+
data: (number | null)[];
|
|
10
|
+
color?: string;
|
|
11
|
+
stack?: string;
|
|
12
|
+
}[];
|
|
13
|
+
/** 是否堆叠 */
|
|
14
|
+
isStack?: boolean;
|
|
15
|
+
/** 柱宽,默认自适应 */
|
|
16
|
+
barWidth?: string | number;
|
|
17
|
+
/** 图表标题 */
|
|
18
|
+
title?: string;
|
|
19
|
+
/** 是否显示图例,默认 true */
|
|
20
|
+
legendShow?: boolean;
|
|
21
|
+
/** 是否悬浮提示,默认 true */
|
|
22
|
+
tooltipShow?: boolean;
|
|
23
|
+
/** 业务方额外配置,优先级高于全局配置 */
|
|
24
|
+
extraOption?: Record<string, any>;
|
|
25
|
+
/** 是否自适应窗口,默认 true */
|
|
26
|
+
isAutoResize?: boolean;
|
|
27
|
+
};
|
|
28
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
29
|
+
width: string;
|
|
30
|
+
height: string;
|
|
31
|
+
xAxisData: (string | number)[];
|
|
32
|
+
seriesData: {
|
|
33
|
+
name: string;
|
|
34
|
+
data: (number | null)[];
|
|
35
|
+
color?: string;
|
|
36
|
+
stack?: string;
|
|
37
|
+
}[];
|
|
38
|
+
isStack: boolean;
|
|
39
|
+
legendShow: boolean;
|
|
40
|
+
tooltipShow: boolean;
|
|
41
|
+
isAutoResize: boolean;
|
|
42
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
43
|
+
chartRef: HTMLDivElement;
|
|
44
|
+
}, HTMLDivElement>;
|
|
45
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
width?: string;
|
|
3
|
+
height?: string;
|
|
4
|
+
/** X 轴类别数组 */
|
|
5
|
+
xAxisData?: (string | number)[];
|
|
6
|
+
/** 系列数据 [{ name, data, color? }] */
|
|
7
|
+
seriesData?: {
|
|
8
|
+
name: string;
|
|
9
|
+
data: (number | null)[];
|
|
10
|
+
color?: string;
|
|
11
|
+
}[];
|
|
12
|
+
/** 是否平滑折线 */
|
|
13
|
+
isSmooth?: boolean;
|
|
14
|
+
/** 是否显示拐点圆点,默认 true */
|
|
15
|
+
showSymbol?: boolean;
|
|
16
|
+
/** 是否填充面积 */
|
|
17
|
+
isArea?: boolean;
|
|
18
|
+
/** 图表标题 */
|
|
19
|
+
title?: string;
|
|
20
|
+
/** 是否显示图例,默认 true */
|
|
21
|
+
legendShow?: boolean;
|
|
22
|
+
/** 是否悬浮提示,默认 true */
|
|
23
|
+
tooltipShow?: boolean;
|
|
24
|
+
/** 业务方额外配置 */
|
|
25
|
+
extraOption?: Record<string, any>;
|
|
26
|
+
/** 是否自适应窗口,默认 true */
|
|
27
|
+
isAutoResize?: boolean;
|
|
28
|
+
};
|
|
29
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
30
|
+
width: string;
|
|
31
|
+
height: string;
|
|
32
|
+
xAxisData: (string | number)[];
|
|
33
|
+
seriesData: {
|
|
34
|
+
name: string;
|
|
35
|
+
data: (number | null)[];
|
|
36
|
+
color?: string;
|
|
37
|
+
}[];
|
|
38
|
+
legendShow: boolean;
|
|
39
|
+
tooltipShow: boolean;
|
|
40
|
+
isAutoResize: boolean;
|
|
41
|
+
isSmooth: boolean;
|
|
42
|
+
showSymbol: boolean;
|
|
43
|
+
isArea: boolean;
|
|
44
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
45
|
+
chartRef: HTMLDivElement;
|
|
46
|
+
}, HTMLDivElement>;
|
|
47
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
width?: string;
|
|
3
|
+
height?: string;
|
|
4
|
+
/** 饼图数据 [{ name, value }] */
|
|
5
|
+
pieData?: {
|
|
6
|
+
name: string;
|
|
7
|
+
value: number;
|
|
8
|
+
}[];
|
|
9
|
+
/** 是否环形饼图 */
|
|
10
|
+
isRing?: boolean;
|
|
11
|
+
/** 内半径(环形饼图用),默认 ['0%', '60%'] */
|
|
12
|
+
radius?: [string, string];
|
|
13
|
+
/** 是否显示文字标签,默认 true */
|
|
14
|
+
labelShow?: boolean;
|
|
15
|
+
/** 图表标题 */
|
|
16
|
+
title?: string;
|
|
17
|
+
/** 是否显示图例,默认 true */
|
|
18
|
+
legendShow?: boolean;
|
|
19
|
+
/** 是否悬浮提示,默认 true */
|
|
20
|
+
tooltipShow?: boolean;
|
|
21
|
+
/** 业务方额外配置 */
|
|
22
|
+
extraOption?: Record<string, any>;
|
|
23
|
+
/** 是否自适应窗口,默认 true */
|
|
24
|
+
isAutoResize?: boolean;
|
|
25
|
+
};
|
|
26
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
27
|
+
width: string;
|
|
28
|
+
height: string;
|
|
29
|
+
legendShow: boolean;
|
|
30
|
+
tooltipShow: boolean;
|
|
31
|
+
isAutoResize: boolean;
|
|
32
|
+
pieData: {
|
|
33
|
+
name: string;
|
|
34
|
+
value: number;
|
|
35
|
+
}[];
|
|
36
|
+
isRing: boolean;
|
|
37
|
+
labelShow: boolean;
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
39
|
+
chartRef: HTMLDivElement;
|
|
40
|
+
}, HTMLDivElement>;
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
width?: string;
|
|
3
|
+
height?: string;
|
|
4
|
+
/** 雷达维度指标 [{ name, max }] */
|
|
5
|
+
indicator?: {
|
|
6
|
+
name: string;
|
|
7
|
+
max: number;
|
|
8
|
+
}[];
|
|
9
|
+
/** 各组维度数值 [{ name, value }] */
|
|
10
|
+
seriesData?: {
|
|
11
|
+
name: string;
|
|
12
|
+
value: number[];
|
|
13
|
+
color?: string;
|
|
14
|
+
}[];
|
|
15
|
+
/** 是否填充区域 */
|
|
16
|
+
isFill?: boolean;
|
|
17
|
+
/** 图表标题 */
|
|
18
|
+
title?: string;
|
|
19
|
+
/** 是否显示图例,默认 true */
|
|
20
|
+
legendShow?: boolean;
|
|
21
|
+
/** 是否悬浮提示,默认 true */
|
|
22
|
+
tooltipShow?: boolean;
|
|
23
|
+
/** 业务方额外配置 */
|
|
24
|
+
extraOption?: Record<string, any>;
|
|
25
|
+
/** 是否自适应窗口,默认 true */
|
|
26
|
+
isAutoResize?: boolean;
|
|
27
|
+
};
|
|
28
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
29
|
+
width: string;
|
|
30
|
+
height: string;
|
|
31
|
+
seriesData: {
|
|
32
|
+
name: string;
|
|
33
|
+
value: number[];
|
|
34
|
+
color?: string;
|
|
35
|
+
}[];
|
|
36
|
+
legendShow: boolean;
|
|
37
|
+
tooltipShow: boolean;
|
|
38
|
+
isAutoResize: boolean;
|
|
39
|
+
indicator: {
|
|
40
|
+
name: string;
|
|
41
|
+
max: number;
|
|
42
|
+
}[];
|
|
43
|
+
isFill: boolean;
|
|
44
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
45
|
+
chartRef: HTMLDivElement;
|
|
46
|
+
}, HTMLDivElement>;
|
|
47
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ECharts 全局默认样式配置
|
|
3
|
+
*
|
|
4
|
+
* 修改此文件后,所有使用封装图表组件的地方自动同步更新样式。
|
|
5
|
+
* 业务方可通过 extraOption prop 按需覆盖任意字段。
|
|
6
|
+
*/
|
|
7
|
+
/** 默认调色板(10 色) */
|
|
8
|
+
export declare const DEFAULT_COLOR: string[];
|
|
9
|
+
/** 默认字体 */
|
|
10
|
+
export declare const DEFAULT_FONT_FAMILY = "PingFang SC, Microsoft YaHei, sans-serif";
|
|
11
|
+
/**
|
|
12
|
+
* 全局 ECharts 默认配置
|
|
13
|
+
*
|
|
14
|
+
* 结构遵循 ECharts option 规范,合并优先级:globalDefault < componentDefault < extraOption
|
|
15
|
+
*/
|
|
16
|
+
export declare const GLOBAL_CHART_CONFIG: Record<string, any>;
|
|
17
|
+
/** 图表 loading 占位配置 */
|
|
18
|
+
export declare const LOADING_OPTION: {
|
|
19
|
+
text: string;
|
|
20
|
+
color: string;
|
|
21
|
+
textColor: string;
|
|
22
|
+
maskColor: string;
|
|
23
|
+
fontSize: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 深度合并配置(数组替换而非合并)
|
|
27
|
+
*
|
|
28
|
+
* @param target - 目标对象
|
|
29
|
+
* @param source - 源对象(优先级高于 target)
|
|
30
|
+
* @returns 合并后的新对象
|
|
31
|
+
*/
|
|
32
|
+
export declare function deepMerge<T extends Record<string, any>>(target: T, source?: Partial<T>): T;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
|
+
import { default as EeBaseBar } from './BaseBar';
|
|
3
|
+
import { default as EeBaseLine } from './BaseLine';
|
|
4
|
+
import { default as EeBasePie } from './BasePie';
|
|
5
|
+
import { default as EeBaseRadar } from './BaseRadar';
|
|
6
|
+
export { EeBaseBar, EeBaseLine, EeBasePie, EeBaseRadar };
|
|
7
|
+
/** 图表组件集合,供 app.use() 批量注册 */
|
|
8
|
+
export declare const chartComponents: Plugin[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import * as echarts from 'echarts';
|
|
3
|
+
export interface UseChartOptions {
|
|
4
|
+
/** 是否启用自适应 resize */
|
|
5
|
+
isAutoResize?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 创建图表控制器
|
|
9
|
+
*
|
|
10
|
+
* @param domRef - 图表容器 DOM 引用
|
|
11
|
+
* @param options - 配置项
|
|
12
|
+
*/
|
|
13
|
+
export declare function useChart(domRef: Ref<HTMLElement | undefined>, options?: UseChartOptions): {
|
|
14
|
+
instance: import('vue').ShallowRef<echarts.ECharts | undefined, echarts.ECharts | undefined>;
|
|
15
|
+
isReady: Ref<boolean, boolean>;
|
|
16
|
+
setOption: (option: Record<string, any>, notMerge?: boolean) => void;
|
|
17
|
+
handleResize: () => void;
|
|
18
|
+
showLoading: () => void;
|
|
19
|
+
hideLoading: () => void;
|
|
20
|
+
destroy: () => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EeDeptCascaderProps } from '../type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<EeDeptCascaderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
+
clear: () => any;
|
|
4
|
+
"update:modelValue": (val: any) => any;
|
|
5
|
+
change: (val: any) => any;
|
|
6
|
+
blur: (evt: FocusEvent) => any;
|
|
7
|
+
focus: (evt: FocusEvent) => any;
|
|
8
|
+
"load-success": (options: any[]) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<EeDeptCascaderProps> & Readonly<{
|
|
10
|
+
onClear?: (() => any) | undefined;
|
|
11
|
+
"onUpdate:modelValue"?: ((val: any) => any) | undefined;
|
|
12
|
+
onChange?: ((val: any) => any) | undefined;
|
|
13
|
+
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
14
|
+
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
15
|
+
"onLoad-success"?: ((options: any[]) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
labelField: string;
|
|
18
|
+
valueField: string;
|
|
19
|
+
size: "large" | "default" | "small";
|
|
20
|
+
detailEchoUrl: string;
|
|
21
|
+
clearable: boolean;
|
|
22
|
+
deptApiUrl: string;
|
|
23
|
+
childrenField: string;
|
|
24
|
+
showAllLevels: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
/** EeDeptCascader 组件属性 */
|
|
3
|
+
export interface EeDeptCascaderProps {
|
|
4
|
+
/** 双向绑定值 */
|
|
5
|
+
modelValue?: string | number | (string | number)[];
|
|
6
|
+
/** 部门树形接口地址,默认 /api/system/dept/tree */
|
|
7
|
+
deptApiUrl?: string;
|
|
8
|
+
/** 详情回显接口地址,默认 /api/system/dept/detail */
|
|
9
|
+
detailEchoUrl?: string;
|
|
10
|
+
/** 选项 label 字段名,默认 label */
|
|
11
|
+
labelField?: string;
|
|
12
|
+
/** 选项 value 字段名,默认 value */
|
|
13
|
+
valueField?: string;
|
|
14
|
+
/** 树形子节点字段名,默认 children */
|
|
15
|
+
childrenField?: string;
|
|
16
|
+
/** 是否展示完整层级路径,默认 true */
|
|
17
|
+
showAllLevels?: boolean;
|
|
18
|
+
/** 固定附加请求参数 */
|
|
19
|
+
extraParams?: Record<string, any>;
|
|
20
|
+
/** 外部 axios 请求实例,不传则从全局配置获取 */
|
|
21
|
+
requestInstance?: AxiosInstance;
|
|
22
|
+
/** 占位符文本 */
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
/** 是否可清空,默认 true */
|
|
25
|
+
clearable?: boolean;
|
|
26
|
+
/** 是否禁用 */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** 组件尺寸 */
|
|
29
|
+
size?: 'large' | 'default' | 'small';
|
|
30
|
+
}
|
|
31
|
+
/** EeDeptCascader 组件事件 */
|
|
32
|
+
export interface EeDeptCascaderEmits {
|
|
33
|
+
(e: 'update:modelValue', val: string | number | (string | number)[]): void;
|
|
34
|
+
(e: 'change', val: string | number | (string | number)[]): void;
|
|
35
|
+
(e: 'clear'): void;
|
|
36
|
+
(e: 'blur', evt: FocusEvent): void;
|
|
37
|
+
(e: 'focus', evt: FocusEvent): void;
|
|
38
|
+
(e: 'load-success', options: any[]): void;
|
|
39
|
+
}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
options?: DictOption[];
|
|
5
|
-
request?: () => Promise<DictOption[]>;
|
|
6
|
-
valueField?: string;
|
|
7
|
-
labelField?: string;
|
|
8
|
-
size?: 'large' | 'default' | 'small';
|
|
9
|
-
};
|
|
10
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
|
-
"update:modelValue": (val: string | number | unknown[]) => any;
|
|
12
|
-
change: (val: string | number | unknown[]) => any;
|
|
1
|
+
import { EeDictSelectProps } from '../type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<EeDictSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
+
search: (keyword: string) => any;
|
|
13
4
|
clear: () => any;
|
|
14
|
-
|
|
5
|
+
"update:modelValue": (val: string | number | (string | number)[]) => any;
|
|
6
|
+
change: (val: string | number | (string | number)[]) => any;
|
|
15
7
|
blur: (evt: FocusEvent) => any;
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
8
|
+
focus: (evt: FocusEvent) => any;
|
|
9
|
+
"load-success": (options: any[]) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<EeDictSelectProps> & Readonly<{
|
|
11
|
+
onSearch?: ((keyword: string) => any) | undefined;
|
|
19
12
|
onClear?: (() => any) | undefined;
|
|
20
|
-
|
|
13
|
+
"onUpdate:modelValue"?: ((val: string | number | (string | number)[]) => any) | undefined;
|
|
14
|
+
onChange?: ((val: string | number | (string | number)[]) => any) | undefined;
|
|
21
15
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
16
|
+
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
17
|
+
"onLoad-success"?: ((options: any[]) => any) | undefined;
|
|
22
18
|
}>, {
|
|
23
|
-
|
|
19
|
+
pageSize: number;
|
|
20
|
+
searchKey: string;
|
|
24
21
|
labelField: string;
|
|
22
|
+
valueField: string;
|
|
25
23
|
size: "large" | "default" | "small";
|
|
24
|
+
mode: "single" | "multiple";
|
|
25
|
+
clearable: boolean;
|
|
26
|
+
filterable: boolean;
|
|
26
27
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
28
|
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
/** EeDictSelect 组件属性 */
|
|
3
|
+
export interface EeDictSelectProps {
|
|
4
|
+
/** 双向绑定值 */
|
|
5
|
+
modelValue?: string | number | (string | number)[];
|
|
6
|
+
/** 字典编码,传入则自动调用默认字典列表接口 */
|
|
7
|
+
dictCode?: string;
|
|
8
|
+
/** 自定义远程字典接口地址,优先级高于 dictCode,覆盖默认字典接口 */
|
|
9
|
+
apiUrl?: string;
|
|
10
|
+
/** 自定义字典详情回显接口地址,不传则使用默认字典详情接口 */
|
|
11
|
+
detailEchoUrl?: string;
|
|
12
|
+
/** 选择模式,默认 single */
|
|
13
|
+
mode?: 'single' | 'multiple';
|
|
14
|
+
/** 选项 label 字段名,默认 label */
|
|
15
|
+
labelField?: string;
|
|
16
|
+
/** 选项 value 字段名,默认 value */
|
|
17
|
+
valueField?: string;
|
|
18
|
+
/** 搜索关键词参数字段名,默认 keyword */
|
|
19
|
+
searchKey?: string;
|
|
20
|
+
/** 每页条数,默认 20 */
|
|
21
|
+
pageSize?: number;
|
|
22
|
+
/** 固定附加请求参数 */
|
|
23
|
+
extraParams?: Record<string, any>;
|
|
24
|
+
/** 外部 axios 请求实例,不传则从全局配置获取 */
|
|
25
|
+
requestInstance?: AxiosInstance;
|
|
26
|
+
/** 静态选项数据,优先级最高,传入后不走接口 */
|
|
27
|
+
options?: Array<{
|
|
28
|
+
label: string;
|
|
29
|
+
value: any;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
/** 占位符文本 */
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
/** 是否可清空,默认 true */
|
|
35
|
+
clearable?: boolean;
|
|
36
|
+
/** 是否禁用 */
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/** 是否只读 */
|
|
39
|
+
readonly?: boolean;
|
|
40
|
+
/** 是否可搜索过滤,默认 true */
|
|
41
|
+
filterable?: boolean;
|
|
42
|
+
/** 组件尺寸 */
|
|
43
|
+
size?: 'large' | 'default' | 'small';
|
|
44
|
+
}
|
|
45
|
+
/** EeDictSelect 组件事件 */
|
|
46
|
+
export interface EeDictSelectEmits {
|
|
47
|
+
(e: 'update:modelValue', val: string | number | (string | number)[]): void;
|
|
48
|
+
(e: 'change', val: string | number | (string | number)[]): void;
|
|
49
|
+
(e: 'clear'): void;
|
|
50
|
+
(e: 'blur', evt: FocusEvent): void;
|
|
51
|
+
(e: 'focus', evt: FocusEvent): void;
|
|
52
|
+
(e: 'search', keyword: string): void;
|
|
53
|
+
(e: 'load-success', options: any[]): void;
|
|
54
|
+
}
|