joy-admin-components 0.2.106 → 0.2.108
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/dist/components/ConfrimButton/index.d.ts +9 -0
- package/dist/components/DownExcelTemp/index.d.ts +51 -18
- package/dist/joy-admin-components.css +1 -1
- package/dist/joy-admin-components.es.js +207 -182
- package/dist/joy-admin-components.umd.js +2 -2
- package/package.json +1 -1
- package/src/components/DownExcelTemp/index.d.ts +51 -18
- /package/src/components/{Layer → layer}/index.d.ts +0 -0
|
@@ -16,3 +16,12 @@ export interface ConfrimButtonEmits {
|
|
|
16
16
|
|
|
17
17
|
declare const ConfrimButton: DefineComponent<ConfrimButtonProps>;
|
|
18
18
|
export default ConfrimButton;
|
|
19
|
+
|
|
20
|
+
type __VLS_TemplateResult = {
|
|
21
|
+
attrs: Partial<{}>;
|
|
22
|
+
slots: {
|
|
23
|
+
default?(_: {}): any;
|
|
24
|
+
};
|
|
25
|
+
refs: {};
|
|
26
|
+
rootEl: HTMLSpanElement;
|
|
27
|
+
};
|
|
@@ -1,4 +1,40 @@
|
|
|
1
1
|
import { DefineComponent } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Excel sheet 表头配置项
|
|
4
|
+
*/
|
|
5
|
+
export interface DownExcelTempHeaderItem {
|
|
6
|
+
header: string;
|
|
7
|
+
key: string;
|
|
8
|
+
width?: number;
|
|
9
|
+
style?: any;
|
|
10
|
+
option?: Array<{ label: any; value: any }>;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
numFmt?: string;
|
|
13
|
+
locked?: boolean;
|
|
14
|
+
optionFormater?: (item: any) => string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* tableData 支持的类型:
|
|
19
|
+
* - 数组:直接使用静态数据
|
|
20
|
+
* - 函数:在点击时调用,可同步返回数组,也可返回 Promise(用于接口拉取)
|
|
21
|
+
*/
|
|
22
|
+
export type DownExcelTempTableData = any[] | (() => any[] | Promise<any[]>);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 单个 sheet 配置
|
|
26
|
+
*/
|
|
27
|
+
export interface DownExcelTempSheet {
|
|
28
|
+
tableHeader: DownExcelTempHeaderItem[];
|
|
29
|
+
/**
|
|
30
|
+
* 表格数据
|
|
31
|
+
* - 数组:直接写入 sheet
|
|
32
|
+
* - 函数:点击导出时调用;若返回 Promise,组件会自动 await,并在期间显示 loading
|
|
33
|
+
*/
|
|
34
|
+
tableData?: DownExcelTempTableData;
|
|
35
|
+
sort?: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
2
38
|
/**
|
|
3
39
|
* DownExcelTemp 组件 - 下载 Excel 导入模板
|
|
4
40
|
* 点击后根据配置生成并下载 Excel 模板文件
|
|
@@ -7,30 +43,27 @@ import { DefineComponent } from 'vue';
|
|
|
7
43
|
* ```vue
|
|
8
44
|
* <DownExcelTemp :sheetsConfig="config" fileName="商品导入模板" :version="1" />
|
|
9
45
|
* ```
|
|
46
|
+
*
|
|
47
|
+
* @example tableData 支持异步函数
|
|
48
|
+
* ```ts
|
|
49
|
+
* const config = {
|
|
50
|
+
* 商品信息: {
|
|
51
|
+
* tableHeader: [...],
|
|
52
|
+
* // 点击下载时才会调用接口拉取数据
|
|
53
|
+
* tableData: async () => {
|
|
54
|
+
* const { data } = await api.getList();
|
|
55
|
+
* return data;
|
|
56
|
+
* },
|
|
57
|
+
* },
|
|
58
|
+
* };
|
|
59
|
+
* ```
|
|
10
60
|
*/
|
|
11
61
|
export interface DownExcelTempProps {
|
|
12
62
|
/**
|
|
13
63
|
* Excel 多 sheet 配置
|
|
14
64
|
* key 为 sheet 名称,value 为该 sheet 的表头和数据配置
|
|
15
65
|
*/
|
|
16
|
-
sheetsConfig: Record<
|
|
17
|
-
string,
|
|
18
|
-
{
|
|
19
|
-
tableHeader: Array<{
|
|
20
|
-
header: string;
|
|
21
|
-
key: string;
|
|
22
|
-
width?: number;
|
|
23
|
-
style?: any;
|
|
24
|
-
option?: Array<{ label: any; value: any }>;
|
|
25
|
-
required?: boolean;
|
|
26
|
-
numFmt?: string;
|
|
27
|
-
locked?: boolean;
|
|
28
|
-
optionFormater?: (item: any) => string;
|
|
29
|
-
}>;
|
|
30
|
-
tableData?: any[];
|
|
31
|
-
sort?: number;
|
|
32
|
-
}
|
|
33
|
-
>;
|
|
66
|
+
sheetsConfig: Record<string, DownExcelTempSheet>;
|
|
34
67
|
/** 导出的文件名 */
|
|
35
68
|
fileName: string;
|
|
36
69
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.cmp-icon[data-v-7b9ec6d8],.cmp-icon[data-v-733f9daa]{padding:0!important}.confirm-button-wrapper[data-v-24cb35fd],.ImportButton[data-v-b8f856ea]{vertical-align:middle;line-height:1;display:inline-block}.searchBar-container .searchBar[data-v-db6f71dd]{transition:all .3s;overflow:hidden}.searchBar-container[data-v-db6f71dd] .el-form-item{margin-bottom:8px!important}.searchBar-container .btns[data-v-db6f71dd]{justify-content:space-between;align-items:center;display:flex}.searchBar-container .btns .left[data-v-db6f71dd]{align-items:center;display:flex}.searchBar-container .btns .left[data-v-db6f71dd] .el-tabs__header{margin:0}.searchBar-container .btns .right[data-v-db6f71dd]{text-align:right;align-items:center;display:flex}[data-v-
|
|
1
|
+
.cmp-icon[data-v-7b9ec6d8],.cmp-icon[data-v-733f9daa]{padding:0!important}.confirm-button-wrapper[data-v-24cb35fd],.ImportButton[data-v-b8f856ea]{vertical-align:middle;line-height:1;display:inline-block}.searchBar-container .searchBar[data-v-db6f71dd]{transition:all .3s;overflow:hidden}.searchBar-container[data-v-db6f71dd] .el-form-item{margin-bottom:8px!important}.searchBar-container .btns[data-v-db6f71dd]{justify-content:space-between;align-items:center;display:flex}.searchBar-container .btns .left[data-v-db6f71dd]{align-items:center;display:flex}.searchBar-container .btns .left[data-v-db6f71dd] .el-tabs__header{margin:0}.searchBar-container .btns .right[data-v-db6f71dd]{text-align:right;align-items:center;display:flex}[data-v-4b6daddc] .vxe-table-custom-wrapper.placement--top-right.is--active{max-height:400px!important}.cell-copy-enabled .vxe-body--column{-webkit-user-select:none;user-select:none}.cell-copy-enabled .vxe-body--column.cell-selected{position:relative;background-color:#409eff26!important}.cell-copy-enabled .vxe-body--column.cell-border-top:before{content:"";pointer-events:none;z-index:10;background-color:#409eff;height:1px;position:absolute;top:0;left:0;right:0}.cell-copy-enabled .vxe-body--column.cell-border-bottom:after{content:"";pointer-events:none;z-index:10;background-color:#409eff;height:1px;position:absolute;bottom:0;left:0;right:0}.cell-copy-enabled .vxe-body--column.cell-border-left{border-left:1px solid #409eff!important}.cell-copy-enabled .vxe-body--column.cell-border-right{border-right:1px solid #409eff!important}.down-excel-temp__spinner[data-v-86bece44]{vertical-align:-2px;border:2px solid;border-top-color:#0000;border-radius:50%;width:12px;height:12px;margin-right:4px;animation:.8s linear infinite down-excel-temp-rotate-86bece44;display:inline-block}@keyframes down-excel-temp-rotate-86bece44{to{transform:rotate(360deg)}}.drawer-content .drawer-btn{box-sizing:border-box;text-align:right;z-index:10;background-color:#fff;width:100%;padding:10px 60px 20px 20px;position:absolute;bottom:0}
|
|
2
2
|
/*$vite$:1*/
|