hfn-components 0.0.5 → 0.0.7

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.
Files changed (46) hide show
  1. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  2. package/es/component.d.ts +3 -0
  3. package/es/component.mjs +9 -0
  4. package/es/components/button/HtButton.vue.d.ts +19 -0
  5. package/es/components/button/HtButton.vue.mjs +16 -0
  6. package/es/components/button/HtButton.vue2.mjs +42 -0
  7. package/es/components/button/index.d.ts +20 -0
  8. package/es/components/button/index.mjs +6 -0
  9. package/es/components/button/instance.d.ts +2 -0
  10. package/es/components/button/instance.mjs +1 -0
  11. package/es/components/index.d.ts +1 -0
  12. package/es/components/index.mjs +2 -0
  13. package/es/components/table/HtTable.d.ts +142 -0
  14. package/es/components/table/HtTable.mjs +136 -0
  15. package/es/components/table/HtTable.vue.d.ts +1847 -0
  16. package/es/components/table/HtTable.vue.mjs +443 -0
  17. package/es/components/table/HtTable.vue2.mjs +128 -0
  18. package/es/components/table/index.d.ts +1845 -0
  19. package/es/components/table/index.mjs +7 -0
  20. package/es/constants/index.d.ts +1 -0
  21. package/es/constants/index.mjs +1 -0
  22. package/es/constants/key.d.ts +1 -0
  23. package/es/constants/key.mjs +3 -0
  24. package/es/defaults.d.ts +4 -0
  25. package/es/defaults.mjs +7 -0
  26. package/es/index.d.ts +5 -0
  27. package/es/index.mjs +8 -0
  28. package/es/make-installer.d.ts +4 -0
  29. package/es/make-installer.mjs +14 -0
  30. package/es/plugin.d.ts +2 -0
  31. package/es/plugin.mjs +3 -0
  32. package/es/utils/common.d.ts +3 -0
  33. package/es/utils/common.mjs +15 -0
  34. package/es/utils/index.d.ts +3 -0
  35. package/es/utils/index.mjs +3 -0
  36. package/es/utils/table.d.ts +2 -0
  37. package/es/utils/table.mjs +31 -0
  38. package/es/utils/tool.d.ts +2 -0
  39. package/es/utils/tool.mjs +42 -0
  40. package/global.d.ts +15 -0
  41. package/package.json +1 -1
  42. package/component.ts +0 -10
  43. package/defaults.ts +0 -6
  44. package/index.ts +0 -7
  45. package/make-installer.ts +0 -17
  46. package/plugin.ts +0 -1
@@ -0,0 +1,9 @@
1
+ var _export_sfc = (sfc, props) => {
2
+ const target = sfc.__vccOpts || sfc;
3
+ for (const [key, val] of props) {
4
+ target[key] = val;
5
+ }
6
+ return target;
7
+ };
8
+
9
+ export { _export_sfc as default };
@@ -0,0 +1,3 @@
1
+ import type { Plugin } from 'vue';
2
+ declare const _default: Plugin[];
3
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { HtTable } from './components/table/index.mjs';
2
+ import { HtButton } from './components/button/index.mjs';
3
+
4
+ var Components = [
5
+ HtTable,
6
+ HtButton
7
+ ];
8
+
9
+ export { Components as default };
@@ -0,0 +1,19 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ columns: ({
3
+ name: string;
4
+ dataIndex: string;
5
+ key: string;
6
+ title?: undefined;
7
+ } | {
8
+ title: string;
9
+ dataIndex: string;
10
+ key: string;
11
+ name?: undefined;
12
+ } | {
13
+ title: string;
14
+ key: string;
15
+ name?: undefined;
16
+ dataIndex?: undefined;
17
+ })[];
18
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
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 };
@@ -0,0 +1,42 @@
1
+ import { defineComponent } from 'vue';
2
+
3
+ var _sfc_main = /* @__PURE__ */ defineComponent({
4
+ ...{
5
+ name: "HtButton"
6
+ },
7
+ __name: "HtButton",
8
+ setup(__props, { expose: __expose }) {
9
+ __expose();
10
+ const columns = [
11
+ {
12
+ name: "Name",
13
+ dataIndex: "name",
14
+ key: "name"
15
+ },
16
+ {
17
+ title: "Age",
18
+ dataIndex: "age",
19
+ key: "age"
20
+ },
21
+ {
22
+ title: "Address",
23
+ dataIndex: "address",
24
+ key: "address"
25
+ },
26
+ {
27
+ title: "Tags",
28
+ key: "tags",
29
+ dataIndex: "tags"
30
+ },
31
+ {
32
+ title: "Action",
33
+ key: "action"
34
+ }
35
+ ];
36
+ const __returned__ = { columns };
37
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
38
+ return __returned__;
39
+ }
40
+ });
41
+
42
+ export { _sfc_main as default };
@@ -0,0 +1,20 @@
1
+ export declare const HtButton: import("hfn-components/es/utils").SFCWithInstall<import("vue").DefineComponent<{}, {
2
+ columns: ({
3
+ name: string;
4
+ dataIndex: string;
5
+ key: string;
6
+ title?: undefined;
7
+ } | {
8
+ title: string;
9
+ dataIndex: string;
10
+ key: string;
11
+ name?: undefined;
12
+ } | {
13
+ title: string;
14
+ key: string;
15
+ name?: undefined;
16
+ dataIndex?: undefined;
17
+ })[];
18
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>> & Record<string, any>;
19
+ export default HtButton;
20
+ export type { ButtonInstance } from './instance';
@@ -0,0 +1,6 @@
1
+ import button from './HtButton.vue.mjs';
2
+ import { withInstall } from '../../utils/common.mjs';
3
+
4
+ const HtButton = withInstall(button);
5
+
6
+ export { HtButton, HtButton as default };
@@ -0,0 +1,2 @@
1
+ import type HtButton from './HtButton.vue';
2
+ export type ButtonInstance = InstanceType<typeof HtButton>;
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ export * from './table';
@@ -0,0 +1,2 @@
1
+ export { HtTable } from './table/index.mjs';
2
+ export { tableProps } from './table/HtTable.mjs';
@@ -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 };