hfn-components 0.0.4 → 0.0.6
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/es/component.d.ts +3 -0
- package/es/component.mjs +9 -0
- package/{dist/es/packages → es}/components/button/HtButton.vue.d.ts +0 -7
- package/es/components/button/HtButton.vue.mjs +16 -0
- package/{dist/es/packages → es}/components/button/HtButton.vue2.mjs +6 -11
- package/{dist/es/packages → es}/components/button/index.d.ts +3 -9
- package/{dist/es/packages → es}/components/button/index.mjs +2 -2
- package/es/components/button/instance.d.ts +2 -0
- package/es/components/button/instance.mjs +1 -0
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +2 -0
- package/es/components/table/HtTable.d.ts +142 -0
- package/es/components/table/HtTable.mjs +136 -0
- package/es/components/table/HtTable.vue.d.ts +1847 -0
- package/es/components/table/HtTable.vue.mjs +443 -0
- package/es/components/table/HtTable.vue2.mjs +128 -0
- package/es/components/table/index.d.ts +1845 -0
- package/{dist/es/packages → es}/components/table/index.mjs +2 -1
- package/es/constants/index.d.ts +1 -0
- package/es/constants/index.mjs +1 -0
- package/es/constants/key.d.ts +1 -0
- package/es/constants/key.mjs +3 -0
- package/es/defaults.d.ts +4 -0
- package/es/defaults.mjs +7 -0
- package/es/index.d.ts +5 -0
- package/es/index.mjs +8 -0
- package/es/make-installer.d.ts +4 -0
- package/es/make-installer.mjs +14 -0
- package/es/plugin.d.ts +2 -0
- package/es/plugin.mjs +3 -0
- package/{dist/es/packages → es}/utils/common.d.ts +1 -1
- package/es/utils/index.d.ts +3 -0
- package/es/utils/index.mjs +3 -0
- package/es/utils/table.d.ts +2 -0
- package/es/utils/table.mjs +31 -0
- package/es/utils/tool.d.ts +2 -0
- package/es/utils/tool.mjs +42 -0
- package/global.d.ts +15 -0
- package/package.json +5 -10
- package/README.en.md +0 -36
- package/README.md +0 -4
- package/dist/es/node_modules/.pnpm/ant-design-vue@3.2.20_vue@3.4.21_typescript@5.3.3_/node_modules/ant-design-vue/dist/antd.css.mjs +0 -6
- package/dist/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +0 -28
- package/dist/es/packages/components/button/HtButton.vue.mjs +0 -6
- package/dist/es/packages/components/index.d.ts +0 -6
- package/dist/es/packages/components/index.mjs +0 -12
- package/dist/es/packages/components/table/HtTable.vue.d.ts +0 -280
- package/dist/es/packages/components/table/HtTable.vue.mjs +0 -6
- package/dist/es/packages/components/table/HtTable.vue2.mjs +0 -110
- package/dist/es/packages/components/table/index.d.ts +0 -278
- package/dist/es/packages/utils/index.d.ts +0 -1
- /package/{dist/es → es}/_virtual/_plugin-vue_export-helper.mjs +0 -0
- /package/{dist/es/packages → es}/utils/common.mjs +0 -0
package/es/component.mjs
ADDED
|
@@ -15,12 +15,5 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
15
15
|
name?: undefined;
|
|
16
16
|
dataIndex?: undefined;
|
|
17
17
|
})[];
|
|
18
|
-
data: {
|
|
19
|
-
key: string;
|
|
20
|
-
name: string;
|
|
21
|
-
age: number;
|
|
22
|
-
address: string;
|
|
23
|
-
tags: string[];
|
|
24
|
-
}[];
|
|
25
18
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
26
19
|
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _sfc_main from './HtButton.vue2.mjs';
|
|
2
|
+
import { openBlock, createElementBlock, toDisplayString } from 'vue';
|
|
3
|
+
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
|
+
|
|
5
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6
|
+
return openBlock(), createElementBlock(
|
|
7
|
+
"button",
|
|
8
|
+
null,
|
|
9
|
+
"\u6D4B\u8BD5\u6309\u94AElibiluo" + toDisplayString($setup.columns[1].name),
|
|
10
|
+
1
|
|
11
|
+
/* TEXT */
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
var button = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/button/HtButton.vue"]]);
|
|
15
|
+
|
|
16
|
+
export { button as default };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent
|
|
1
|
+
import { defineComponent } from 'vue';
|
|
2
2
|
|
|
3
3
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
...{
|
|
5
5
|
name: "HtButton"
|
|
6
6
|
},
|
|
7
7
|
__name: "HtButton",
|
|
8
|
-
setup(__props) {
|
|
8
|
+
setup(__props, { expose: __expose }) {
|
|
9
|
+
__expose();
|
|
9
10
|
const columns = [
|
|
10
11
|
{
|
|
11
12
|
name: "Name",
|
|
@@ -32,15 +33,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
33
|
key: "action"
|
|
33
34
|
}
|
|
34
35
|
];
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
null,
|
|
39
|
-
"\u6D4B\u8BD5\u6309\u94AElibiluo" + toDisplayString(columns[1].name),
|
|
40
|
-
1
|
|
41
|
-
/* TEXT */
|
|
42
|
-
);
|
|
43
|
-
};
|
|
36
|
+
const __returned__ = { columns };
|
|
37
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
38
|
+
return __returned__;
|
|
44
39
|
}
|
|
45
40
|
});
|
|
46
41
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
export declare const HtButton: import("/Users/libiluo/Desktop/company/component-library/dist/hfn-components/es/utils").SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
2
2
|
columns: ({
|
|
3
3
|
name: string;
|
|
4
4
|
dataIndex: string;
|
|
@@ -15,12 +15,6 @@ declare const Button: import("packages/utils/common").SFCWithInstall<import("vue
|
|
|
15
15
|
name?: undefined;
|
|
16
16
|
dataIndex?: undefined;
|
|
17
17
|
})[];
|
|
18
|
-
data: {
|
|
19
|
-
key: string;
|
|
20
|
-
name: string;
|
|
21
|
-
age: number;
|
|
22
|
-
address: string;
|
|
23
|
-
tags: string[];
|
|
24
|
-
}[];
|
|
25
18
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>> & Record<string, any>;
|
|
26
|
-
export default
|
|
19
|
+
export default HtButton;
|
|
20
|
+
export type { ButtonInstance } from './instance';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './table';
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type HtTable from './HtTable.vue';
|
|
2
|
+
import type { ExtractPropTypes, PropType } from "vue";
|
|
3
|
+
import { ColumnGroupType, ColumnType, TablePaginationConfig, SortOrder } from 'ant-design-vue/es/table/interface';
|
|
4
|
+
import { TableColumnType } from 'ant-design-vue';
|
|
5
|
+
interface CustomColumn {
|
|
6
|
+
title: string;
|
|
7
|
+
key: string;
|
|
8
|
+
titles: string[];
|
|
9
|
+
dataIndex?: string;
|
|
10
|
+
width?: string | number;
|
|
11
|
+
align?: 'left' | 'center' | 'right';
|
|
12
|
+
slotData?: string;
|
|
13
|
+
fixed?: 'left' | 'right';
|
|
14
|
+
filters?: any[];
|
|
15
|
+
filterMultiple?: boolean;
|
|
16
|
+
sorter?: boolean;
|
|
17
|
+
sortOrder?: SortOrder;
|
|
18
|
+
}
|
|
19
|
+
export type TableColumns = CustomColumn | ColumnGroupType<any> | ColumnType<any>;
|
|
20
|
+
export interface ActionItem {
|
|
21
|
+
label?: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
type: string;
|
|
24
|
+
icon?: string;
|
|
25
|
+
iconType?: string;
|
|
26
|
+
menu?: Array<any>;
|
|
27
|
+
url?: string;
|
|
28
|
+
handler: (record: any) => void;
|
|
29
|
+
showAction?: (record: any) => boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface HtTableColumnType extends TableColumnType {
|
|
32
|
+
componentType: string;
|
|
33
|
+
}
|
|
34
|
+
export declare const tableProps: {
|
|
35
|
+
readonly loading: {
|
|
36
|
+
readonly type: BooleanConstructor;
|
|
37
|
+
readonly default: false;
|
|
38
|
+
};
|
|
39
|
+
readonly columns: {
|
|
40
|
+
readonly type: PropType<TableColumns[]>;
|
|
41
|
+
readonly default: () => never[];
|
|
42
|
+
};
|
|
43
|
+
readonly actions: {
|
|
44
|
+
readonly type: PropType<ActionItem[]>;
|
|
45
|
+
readonly default: () => never[];
|
|
46
|
+
};
|
|
47
|
+
readonly dataSource: {
|
|
48
|
+
readonly type: ArrayConstructor;
|
|
49
|
+
readonly default: () => never[];
|
|
50
|
+
};
|
|
51
|
+
readonly total: {
|
|
52
|
+
readonly type: NumberConstructor;
|
|
53
|
+
readonly default: 0;
|
|
54
|
+
};
|
|
55
|
+
readonly pageSize: {
|
|
56
|
+
readonly type: NumberConstructor;
|
|
57
|
+
readonly default: 20;
|
|
58
|
+
};
|
|
59
|
+
readonly nowPage: {
|
|
60
|
+
readonly type: NumberConstructor;
|
|
61
|
+
readonly default: 1;
|
|
62
|
+
};
|
|
63
|
+
readonly selectShow: {
|
|
64
|
+
readonly type: BooleanConstructor;
|
|
65
|
+
readonly default: false;
|
|
66
|
+
};
|
|
67
|
+
readonly selectedKeys: {
|
|
68
|
+
readonly type: PropType<(string | number)[]>;
|
|
69
|
+
readonly default: () => never[];
|
|
70
|
+
};
|
|
71
|
+
readonly isPagination: {
|
|
72
|
+
readonly type: BooleanConstructor;
|
|
73
|
+
readonly default: true;
|
|
74
|
+
};
|
|
75
|
+
readonly showOriginalPagination: {
|
|
76
|
+
readonly type: PropType<false | object | TablePaginationConfig>;
|
|
77
|
+
readonly default: false;
|
|
78
|
+
};
|
|
79
|
+
readonly isScroll: {
|
|
80
|
+
readonly type: BooleanConstructor;
|
|
81
|
+
readonly default: true;
|
|
82
|
+
};
|
|
83
|
+
readonly categoryList: {
|
|
84
|
+
readonly type: ArrayConstructor;
|
|
85
|
+
readonly default: () => never[];
|
|
86
|
+
};
|
|
87
|
+
readonly yIsScroll: {
|
|
88
|
+
readonly type: BooleanConstructor;
|
|
89
|
+
readonly default: false;
|
|
90
|
+
};
|
|
91
|
+
readonly yHeight: {
|
|
92
|
+
readonly type: NumberConstructor;
|
|
93
|
+
readonly default: 0;
|
|
94
|
+
};
|
|
95
|
+
readonly isPeople: {
|
|
96
|
+
readonly type: BooleanConstructor;
|
|
97
|
+
readonly default: false;
|
|
98
|
+
};
|
|
99
|
+
readonly switching: {
|
|
100
|
+
readonly type: BooleanConstructor;
|
|
101
|
+
readonly default: false;
|
|
102
|
+
};
|
|
103
|
+
readonly selectKey: {
|
|
104
|
+
readonly type: StringConstructor;
|
|
105
|
+
readonly default: "";
|
|
106
|
+
};
|
|
107
|
+
readonly isTeam: {
|
|
108
|
+
readonly type: BooleanConstructor;
|
|
109
|
+
readonly default: false;
|
|
110
|
+
};
|
|
111
|
+
readonly isTotal: {
|
|
112
|
+
readonly type: BooleanConstructor;
|
|
113
|
+
readonly default: false;
|
|
114
|
+
};
|
|
115
|
+
readonly totalData: {
|
|
116
|
+
readonly type: ArrayConstructor;
|
|
117
|
+
readonly default: () => never[];
|
|
118
|
+
};
|
|
119
|
+
readonly totalIndex: {
|
|
120
|
+
readonly type: BooleanConstructor;
|
|
121
|
+
readonly default: true;
|
|
122
|
+
};
|
|
123
|
+
readonly isExcess: {
|
|
124
|
+
readonly type: BooleanConstructor;
|
|
125
|
+
readonly default: false;
|
|
126
|
+
};
|
|
127
|
+
readonly isRowKey: {
|
|
128
|
+
readonly type: BooleanConstructor;
|
|
129
|
+
readonly default: true;
|
|
130
|
+
};
|
|
131
|
+
readonly isSticky: {
|
|
132
|
+
readonly type: BooleanConstructor;
|
|
133
|
+
readonly default: false;
|
|
134
|
+
};
|
|
135
|
+
readonly smallHeader: {
|
|
136
|
+
readonly type: BooleanConstructor;
|
|
137
|
+
readonly default: true;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
export type TableProps = ExtractPropTypes<typeof tableProps>;
|
|
141
|
+
export type HtTabletInstance = InstanceType<typeof HtTable>;
|
|
142
|
+
export {};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
const tableProps = {
|
|
2
|
+
// loading状态
|
|
3
|
+
loading: {
|
|
4
|
+
type: Boolean,
|
|
5
|
+
default: false
|
|
6
|
+
},
|
|
7
|
+
// 表格列配置
|
|
8
|
+
columns: {
|
|
9
|
+
type: Array,
|
|
10
|
+
default: () => []
|
|
11
|
+
},
|
|
12
|
+
actions: {
|
|
13
|
+
type: Array,
|
|
14
|
+
default: () => []
|
|
15
|
+
},
|
|
16
|
+
// 表格数据
|
|
17
|
+
dataSource: {
|
|
18
|
+
type: Array,
|
|
19
|
+
default: () => []
|
|
20
|
+
},
|
|
21
|
+
// 表格数据总数
|
|
22
|
+
total: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 0
|
|
25
|
+
},
|
|
26
|
+
// 每页条数
|
|
27
|
+
pageSize: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 20
|
|
30
|
+
},
|
|
31
|
+
// 当前页
|
|
32
|
+
nowPage: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 1
|
|
35
|
+
},
|
|
36
|
+
// 是否显示选择框
|
|
37
|
+
selectShow: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false
|
|
40
|
+
},
|
|
41
|
+
// 选中数据
|
|
42
|
+
selectedKeys: {
|
|
43
|
+
type: Array,
|
|
44
|
+
default: () => []
|
|
45
|
+
},
|
|
46
|
+
// isClear: {
|
|
47
|
+
// type: Boolean,
|
|
48
|
+
// default: false
|
|
49
|
+
// },
|
|
50
|
+
// isAdvisor: {
|
|
51
|
+
// type: Boolean,
|
|
52
|
+
// default: false
|
|
53
|
+
// },
|
|
54
|
+
// 是否显示分页
|
|
55
|
+
isPagination: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: true
|
|
58
|
+
},
|
|
59
|
+
// 是否启用表格分页器
|
|
60
|
+
showOriginalPagination: {
|
|
61
|
+
type: [Boolean, Object],
|
|
62
|
+
default: false
|
|
63
|
+
},
|
|
64
|
+
// 表格x轴是否可滚动
|
|
65
|
+
isScroll: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: true
|
|
68
|
+
},
|
|
69
|
+
categoryList: {
|
|
70
|
+
type: Array,
|
|
71
|
+
default: () => []
|
|
72
|
+
},
|
|
73
|
+
// isStrategy: {
|
|
74
|
+
// type: Number,
|
|
75
|
+
// default: 1
|
|
76
|
+
// },
|
|
77
|
+
// 表格y轴是否可滚动
|
|
78
|
+
yIsScroll: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: false
|
|
81
|
+
},
|
|
82
|
+
// y轴滚动高度
|
|
83
|
+
yHeight: {
|
|
84
|
+
type: Number,
|
|
85
|
+
default: 0
|
|
86
|
+
},
|
|
87
|
+
// 是否是个人
|
|
88
|
+
isPeople: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: false
|
|
91
|
+
},
|
|
92
|
+
switching: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: false
|
|
95
|
+
},
|
|
96
|
+
selectKey: {
|
|
97
|
+
// 多选时默认选择的字段
|
|
98
|
+
type: String,
|
|
99
|
+
default: ""
|
|
100
|
+
},
|
|
101
|
+
isTeam: {
|
|
102
|
+
// 区分个人&团队
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: false
|
|
105
|
+
},
|
|
106
|
+
isTotal: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: false
|
|
109
|
+
},
|
|
110
|
+
totalData: {
|
|
111
|
+
type: Array,
|
|
112
|
+
default: () => []
|
|
113
|
+
},
|
|
114
|
+
totalIndex: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: true
|
|
117
|
+
},
|
|
118
|
+
isExcess: {
|
|
119
|
+
type: Boolean,
|
|
120
|
+
default: false
|
|
121
|
+
},
|
|
122
|
+
isRowKey: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
default: true
|
|
125
|
+
},
|
|
126
|
+
isSticky: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
default: false
|
|
129
|
+
},
|
|
130
|
+
smallHeader: {
|
|
131
|
+
type: Boolean,
|
|
132
|
+
default: true
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export { tableProps };
|