@hb-hellotech/hb-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.
Files changed (51) hide show
  1. package/README.md +1 -0
  2. package/dist/components/business-comp/list-page-comp/hb_form_item_filter_modal/index.d.ts +4 -0
  3. package/dist/components/business-comp/list-page-comp/hb_form_select_filter/index.d.ts +4 -0
  4. package/dist/components/business-comp/list-page-comp/hb_form_select_modal/index.d.ts +4 -0
  5. package/dist/components/business-comp/list-page-comp/hb_form_select_modal/src/HbMutilpleSelectModal.vue.d.ts +99 -0
  6. package/dist/components/business-comp/list-page-comp/hb_list_btns_act/index.d.ts +3 -0
  7. package/dist/components/business-comp/list-page-comp/hb_list_btns_act/src/HbListBtns.vue.d.ts +53 -0
  8. package/dist/components/business-comp/list-page-comp/hb_list_form/index.d.ts +4 -0
  9. package/dist/components/business-comp/list-page-comp/hb_list_page_act/index.d.ts +3 -0
  10. package/dist/components/business-comp/list-page-comp/hb_list_page_act/src/HbListPageAct.vue.d.ts +56 -0
  11. package/dist/components/business-comp/list-page-comp/hb_list_page_container/index.d.ts +3 -0
  12. package/dist/components/business-comp/list-page-comp/hb_list_page_container/src/HbListPageContainer.vue.d.ts +41 -0
  13. package/dist/components/business-comp/list-page-comp/hb_list_table/index.d.ts +4 -0
  14. package/dist/components/business-comp/list-page-comp/hb_list_table_act/index.d.ts +3 -0
  15. package/dist/components/business-comp/list-page-comp/hb_list_table_colums_set/index.d.ts +3 -0
  16. package/dist/components/business-comp/list-page-comp/index.d.ts +2 -0
  17. package/dist/components/func-comp/hb_func_comp_copy/index.d.ts +4 -0
  18. package/dist/components/func-comp/hb_func_comp_copy/src/copy.vue.d.ts +83 -0
  19. package/dist/components/func-comp/hb_func_comp_copy/src/type.d.ts +37 -0
  20. package/dist/components/func-comp/hb_func_comp_drag/index.d.ts +442 -0
  21. package/dist/components/func-comp/hb_func_comp_drag/src/index.vue.d.ts +181 -0
  22. package/dist/components/func-comp/hb_func_comp_drag/src/type.d.ts +45 -0
  23. package/dist/components/func-comp/hb_func_comp_tree/index.d.ts +457 -0
  24. package/dist/components/func-comp/hb_func_comp_tree/src/tree.d.ts +58 -0
  25. package/dist/components/func-comp/hb_func_comp_tree/src/tree.vue.d.ts +186 -0
  26. package/dist/components/func-comp/hb_func_comp_tree/src/treeNode.vue.d.ts +38 -0
  27. package/dist/components/func-comp/index.d.ts +2 -0
  28. package/dist/components/hooks/useCalTableHeight.d.ts +10 -0
  29. package/dist/components/hooks/useCalTableWidth.d.ts +5 -0
  30. package/dist/components/types/hb_form_item_filter_modal_type.d.ts +37 -0
  31. package/dist/components/types/hb_form_select_filter_type.d.ts +27 -0
  32. package/dist/components/types/hb_form_select_modal_type.d.ts +33 -0
  33. package/dist/components/types/hb_list_btns_act_type.d.ts +21 -0
  34. package/dist/components/types/hb_list_form_type.d.ts +70 -0
  35. package/dist/components/types/hb_list_page_act_type.d.ts +25 -0
  36. package/dist/components/types/hb_list_page_container_type.d.ts +18 -0
  37. package/dist/components/types/hb_list_table_act_type.d.ts +23 -0
  38. package/dist/components/types/hb_list_table_colums_set_type.d.ts +7 -0
  39. package/dist/components/types/hb_list_table_type.d.ts +34 -0
  40. package/dist/components/utils/createBem.d.ts +19 -0
  41. package/dist/components/utils/withInstall.d.ts +4 -0
  42. package/dist/hb_component_lib.js +36010 -0
  43. package/dist/hb_component_lib.umd.cjs +180 -0
  44. package/dist/index.d.ts +234 -0
  45. package/dist/style.css +1 -0
  46. package/dist/vite-env.d.ts +7 -0
  47. package/hooks/useCalTableHeight.ts +199 -0
  48. package/hooks/useCalTableWidth.ts +18 -0
  49. package/hooks/useListFormItem.ts +38 -0
  50. package/hooks/useModalDrag.ts +73 -0
  51. package/package.json +59 -0
@@ -0,0 +1,234 @@
1
+ export declare const location: {
2
+ en_US: {
3
+ hbLibComp: {
4
+ HbFileUploadModal: {
5
+ cancel: string;
6
+ clickUpload: string;
7
+ confirmImport: string;
8
+ dataImport: string;
9
+ downloadTemplate: string;
10
+ dragFile: string;
11
+ file: string;
12
+ fileUpload: string;
13
+ maxSupport: string;
14
+ onlySupport: string;
15
+ placeSelect: string;
16
+ selectFile: string;
17
+ };
18
+ HbLogModal: {
19
+ close: string;
20
+ operateContent: string;
21
+ operateLogs: string;
22
+ operateTime: string;
23
+ operator: string;
24
+ };
25
+ hbFormItemFilterModal: {
26
+ add: string;
27
+ cancel: string;
28
+ confirm: string;
29
+ moreConditionSearch: string;
30
+ mostMore: string;
31
+ mostMoreTip: string;
32
+ noData: string;
33
+ notShowTip: string;
34
+ titleTip: string;
35
+ };
36
+ hbFormSelectFilter: {
37
+ allSelect: string;
38
+ close: string;
39
+ };
40
+ hbLibListForm: {
41
+ queryCase: string;
42
+ };
43
+ hbLibListTableColumsSet: {
44
+ allSelect: string;
45
+ cancelFix: string;
46
+ confirm: string;
47
+ errorTip: string;
48
+ fix: string;
49
+ popoverTitle: string;
50
+ title: string;
51
+ };
52
+ hbListBtnsAct: {
53
+ close: string;
54
+ open: string;
55
+ reload: string;
56
+ };
57
+ hbListPageAct: {
58
+ close: string;
59
+ exitFullScreen: string;
60
+ fullScreen: string;
61
+ open: string;
62
+ query: string;
63
+ reset: string;
64
+ selfDefine: string;
65
+ };
66
+ hbListTable: {
67
+ noData: string;
68
+ };
69
+ hbMultiSelectModal: {
70
+ pleaseSelect: string;
71
+ };
72
+ hbTableAct: {
73
+ confirmContent: string;
74
+ more: string;
75
+ secendConfirm: string;
76
+ };
77
+ };
78
+ };
79
+ ja_JP: {
80
+ hbLibComp: {
81
+ HbFileUploadModal: {
82
+ cancel: string;
83
+ clickUpload: string;
84
+ confirmImport: string;
85
+ dataImport: string;
86
+ downloadTemplate: string;
87
+ dragFile: string;
88
+ file: string;
89
+ fileUpload: string;
90
+ maxSupport: string;
91
+ onlySupport: string;
92
+ placeSelect: string;
93
+ selectFile: string;
94
+ };
95
+ HbLogModal: {
96
+ close: string;
97
+ operateContent: string;
98
+ operateLogs: string;
99
+ operateTime: string;
100
+ operator: string;
101
+ };
102
+ hbFormItemFilterModal: {
103
+ add: string;
104
+ cancel: string;
105
+ confirm: string;
106
+ moreConditionSearch: string;
107
+ mostMore: string;
108
+ mostMoreTip: string;
109
+ noData: string;
110
+ notShowTip: string;
111
+ titleTip: string;
112
+ };
113
+ hbFormSelectFilter: {
114
+ allSelect: string;
115
+ close: string;
116
+ };
117
+ hbLibListForm: {
118
+ queryCase: string;
119
+ };
120
+ hbLibListTableColumsSet: {
121
+ allSelect: string;
122
+ cancelFix: string;
123
+ confirm: string;
124
+ errorTip: string;
125
+ fix: string;
126
+ popoverTitle: string;
127
+ title: string;
128
+ };
129
+ hbListBtnsAct: {
130
+ close: string;
131
+ open: string;
132
+ reload: string;
133
+ };
134
+ hbListPageAct: {
135
+ close: string;
136
+ exitFullScreen: string;
137
+ fullScreen: string;
138
+ open: string;
139
+ query: string;
140
+ reset: string;
141
+ selfDefine: string;
142
+ };
143
+ hbListTable: {
144
+ noData: string;
145
+ };
146
+ hbMultiSelectModal: {
147
+ pleaseSelect: string;
148
+ };
149
+ hbTableAct: {
150
+ confirmContent: string;
151
+ more: string;
152
+ secendConfirm: string;
153
+ };
154
+ };
155
+ };
156
+ zh_CN: {
157
+ hbLibComp: {
158
+ hbFormItemFilterModal: {
159
+ titleTip: string;
160
+ mostMore: string;
161
+ mostMoreTip: string;
162
+ notShowTip: string;
163
+ add: string;
164
+ noData: string;
165
+ cancel: string;
166
+ confirm: string;
167
+ moreConditionSearch: string;
168
+ };
169
+ hbFormSelectFilter: {
170
+ allSelect: string;
171
+ close: string;
172
+ };
173
+ hbListPageAct: {
174
+ query: string;
175
+ reset: string;
176
+ selfDefine: string;
177
+ open: string;
178
+ close: string;
179
+ fullScreen: string;
180
+ exitFullScreen: string;
181
+ };
182
+ hbListBtnsAct: {
183
+ reload: string;
184
+ open: string;
185
+ close: string;
186
+ };
187
+ hbTableAct: {
188
+ more: string;
189
+ secendConfirm: string;
190
+ confirmContent: string;
191
+ };
192
+ hbMultiSelectModal: {
193
+ pleaseSelect: string;
194
+ };
195
+ hbListTable: {
196
+ noData: string;
197
+ };
198
+ hbLibListTableColumsSet: {
199
+ popoverTitle: string;
200
+ title: string;
201
+ fix: string;
202
+ cancelFix: string;
203
+ allSelect: string;
204
+ confirm: string;
205
+ errorTip: string;
206
+ };
207
+ hbLibListForm: {
208
+ queryCase: string;
209
+ };
210
+ HbFileUploadModal: {
211
+ fileUpload: string;
212
+ confirmImport: string;
213
+ cancel: string;
214
+ maxSupport: string;
215
+ dataImport: string;
216
+ placeSelect: string;
217
+ file: string;
218
+ selectFile: string;
219
+ dragFile: string;
220
+ clickUpload: string;
221
+ onlySupport: string;
222
+ downloadTemplate: string;
223
+ };
224
+ HbLogModal: {
225
+ close: string;
226
+ operateLogs: string;
227
+ operator: string;
228
+ operateTime: string;
229
+ operateContent: string;
230
+ };
231
+ };
232
+ };
233
+ };
234
+ export declare const install: (app: any) => void;
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ [data-v-a5dec087]:root{--hb-theme-color: #ff5000;--hb-title-color: #333;--hb-space: 10px;--hb-h1-font-size: 20px;--hb-h2-font-size: 16px;--hb-text-font-size: 14px;--hb-subtext-font-size: 13px;--hb-subtext-color: #cccc;--hb-f-item-height: 34px;--hb-f-item-content-height: 30px;--hb-tip-font-size: 13px;--hb-border-radius: 6px;--hb-border-color: #d1d5db;--hb-list-button-height: 26px}.hb-sfcm[data-v-a5dec087] .ant-modal-header{border-bottom:1px solid var(--hb-border-color);margin-bottom:var(--hb-space)}.hb-sfcm__title[data-v-a5dec087]{font-size:var(--hb-h1-font-size);font-weight:700;color:var(--hb-title-color)}.hb-sfcm__title__tip[data-v-a5dec087]{margin-right:var(--hb-space);padding-left:var(--hb-space);color:#080808;font-size:16px;font-weight:500;position:relative}.hb-sfcm__title__tip[data-v-a5dec087]:before{content:"";width:6px;height:14px;background:var(--hb-theme-color);position:absolute;top:50%;left:0;transform:translateY(-50%);border-radius:var(--hb-border-radius)}.hb-sfcm__show__tag[data-v-a5dec087]{padding-top:var(--hb-space);overflow:hidden}.hb-sfcm__show__tag__item[data-v-a5dec087]{float:left;margin-right:var(--hb-space);padding:2px 9px;background:var(--hb-theme-color);color:#fff;border:1px solid var(--hb-theme-color);border-radius:var(--hb-border-radius);margin-bottom:var(--hb-space);cursor:move;user-select:none;display:flex;align-items:center}.hb-sfcm__show__tag__item.is-linked[data-v-a5dec087]{background:#ff7875;border-color:#ff7875;cursor:not-allowed}.hb-sfcm__show__tag .is-fixed[data-v-a5dec087]{background:none;color:#9ca3af;border:1px solid var(--hb-border-color);cursor:not-allowed}.hb-sfcm__show__tag .is-linked[data-v-a5dec087]{background:#ff7875;border-color:#ff7875;cursor:not-allowed}.hb-sfcm__show__tag .is-linked[data-v-a5dec087]:hover{background:#ff7875;border-color:#ff7875}.hb-sfcm__unshow__tag[data-v-a5dec087]{padding-top:var(--hb-space);overflow:hidden}.hb-sfcm__unshow__tag__item[data-v-a5dec087]{position:relative;float:left;margin-right:var(--hb-space);padding:2px 9px;color:#9ca3af;border:1px solid var(--hb-border-color);border-radius:var(--hb-border-radius);margin-bottom:var(--hb-space);cursor:pointer;user-select:none}.hb-sfcm__unshow__tag__item.is-linked[data-v-a5dec087]{color:#ff7875;border-color:#ff7875}.hb-sfcm__show__tag__item-close[data-v-a5dec087]{margin-left:6px;cursor:pointer}.hb-sfcm__show__tag__item-close[data-v-a5dec087]:hover{transform:scale(1.3)}.hb-sfcm__unshow__tag__item-add[data-v-a5dec087]{position:absolute;width:100%;height:100%;top:0;left:0;background:#1a1818;color:#fff;text-align:center;display:flex;align-items:center;justify-content:center;border-radius:var(--hb-border-radius)}.hb-sfcm__unshow__tag__empty[data-v-a5dec087]{text-align:center;color:var(--hb-border-color)}[data-v-80c9fbab]:root{--hb-theme-color: #ff5000;--hb-title-color: #333;--hb-space: 10px;--hb-h1-font-size: 20px;--hb-h2-font-size: 16px;--hb-text-font-size: 14px;--hb-subtext-font-size: 13px;--hb-subtext-color: #cccc;--hb-f-item-height: 34px;--hb-f-item-content-height: 30px;--hb-tip-font-size: 13px;--hb-border-radius: 6px;--hb-border-color: #d1d5db;--hb-list-button-height: 26px}.hb-form[data-v-80c9fbab] .ant-form-item{margin-bottom:var(--hb-space)}.hb-form .hb-form__footer[data-v-80c9fbab]{display:flex;justify-content:space-between}.hb-lib-form--container[data-v-80c9fbab]{overflow:hidden;margin:6px}.hide[data-v-80c9fbab]{height:0}.hb-form__form-item-col[data-v-80c9fbab]{flex:0 0 auto;min-width:200px;width:auto;padding-right:var(--hb-space);margin-bottom:16px}.form-footer[data-v-80c9fbab]{display:flex;align-items:center;margin-bottom:10px}.form-collapse-enter-active,.form-collapse-leave-active{transition:height .2s ease;overflow:hidden}.form-collapse-enter-from,.form-collapse-leave-to{height:0}.hb-lib-form-svg{width:16px;height:34px;margin-right:13px;cursor:pointer}.hb-lib-form-svg .icon{width:100%;height:100%}.hb-form-item-ui .ant-form-item.hb-lib-form-item-border--unneed{border:none!important}[data-v-83b1d605]:root{--hb-theme-color: #ff5000;--hb-title-color: #333;--hb-space: 10px;--hb-h1-font-size: 20px;--hb-h2-font-size: 16px;--hb-text-font-size: 14px;--hb-subtext-font-size: 13px;--hb-subtext-color: #cccc;--hb-f-item-height: 34px;--hb-f-item-content-height: 30px;--hb-tip-font-size: 13px;--hb-border-radius: 6px;--hb-border-color: #d1d5db;--hb-list-button-height: 26px}.hb-lib-list-page-act-item[data-v-83b1d605]{margin-right:var(--hb-space)}[data-v-a5c80d61]:root{--hb-theme-color: #ff5000;--hb-title-color: #333;--hb-space: 10px;--hb-h1-font-size: 20px;--hb-h2-font-size: 16px;--hb-text-font-size: 14px;--hb-subtext-font-size: 13px;--hb-subtext-color: #cccc;--hb-f-item-height: 34px;--hb-f-item-content-height: 30px;--hb-tip-font-size: 13px;--hb-border-radius: 6px;--hb-border-color: #d1d5db;--hb-list-button-height: 26px}.hb-lib-list-btns-box[data-v-a5c80d61]{display:flex;justify-content:space-between;align-items:center;background:white;padding:5px 5px 0;margin-top:5px;border-radius:6px 6px 0 0}.hb-lib-list-btns-box .hb-lib-list-btns-right[data-v-a5c80d61]{display:flex;align-items:center}.hb-lib-list-btns-act-svg[data-v-a5c80d61]{cursor:pointer;width:21px;height:21px;display:inline-block}.hb-lib-list-btns-act-svg .icon[data-v-a5c80d61]{width:100%;height:100%}.hb-lib-list-btns-act-open[data-v-a5c80d61]{cursor:pointer;width:21px;height:21px;display:flex;justify-content:center;align-items:center}.hb-lib-list-btns-act-open .icon[data-v-a5c80d61]{width:100%;height:100%}.hb-lib-list-btns-item[data-v-a5c80d61]:not(:last-child){margin-right:10px}.hb-lib-list-btns-left[data-v-a5c80d61]{display:flex;align-items:center}.flex-between[data-v-2307d348]{display:flex;justify-content:space-between;align-items:center}.flex-center[data-v-2307d348]{display:flex;align-items:center}.hb-lib-selector-wrapper[data-v-2307d348]{position:relative}.hb-lib-selector-wrapper .ant-input[data-v-2307d348]{cursor:pointer}.has-prefix[data-v-2307d348]:before{content:attr(data-prefix);position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#262626;font-size:14px;white-space:nowrap;pointer-events:none;z-index:1}.has-prefix[data-v-2307d348] .ant-select-selector{padding-left:calc(12px + var(--prefix-width, 0px))}.has-prefix[data-v-2307d348] .ant-select-selection-placeholder{padding-left:var(--prefix-width, 0px)}.hb-lib-selector-dropdown[data-v-2307d348]{padding:8px;min-width:200px}.hb-lib-selector-search[data-v-2307d348]{margin-bottom:8px}.hb-lib-selector-list[data-v-2307d348]{max-height:200px;overflow-y:auto}.hb-lib-selector-list[data-v-2307d348]::-webkit-scrollbar{width:6px}.hb-lib-selector-list[data-v-2307d348]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.hb-lib-selector-list[data-v-2307d348]::-webkit-scrollbar-thumb{background:#d9d9d9;border-radius:3px}.hb-lib-selector-list[data-v-2307d348]::-webkit-scrollbar-thumb:hover{background:#bfbfbf}.hb-lib-selector-option[data-v-2307d348]{display:flex;align-items:center;padding:8px;cursor:pointer;border-radius:4px;transition:all .2s ease;gap:8px}.hb-lib-selector-option[data-v-2307d348]:hover{background-color:#f5f5f5}.hb-lib-selector-option.selected[data-v-2307d348]{background-color:#e6f7ff}.hb-lib-option-content[data-v-2307d348]{flex:1}.hb-lib-option-label[data-v-2307d348]{font-weight:500;color:#262626}.hb-lib-selector-empty[data-v-2307d348]{text-align:center;color:#bfbfbf;padding:20px 0;font-size:14px}.hb-lib-selector-footer[data-v-2307d348]{border-top:1px solid #f0f0f0;padding-top:8px;margin-top:8px;display:flex;justify-content:space-between;align-items:center}.hb-lib-footer-buttons[data-v-2307d348]{display:flex;gap:8px}.selector-tag[data-v-2307d348]{margin-right:3px;border-radius:4px;border-color:#ff5000;color:#ff5000}.selector-tag .tag-label[data-v-2307d348]{font-weight:500}.selector-tag .tag-description[data-v-2307d348]{margin-left:4px;font-size:12px;opacity:.8}.rotate-180[data-v-2307d348]{transform:rotate(180deg)}.transition-transform[data-v-2307d348]{transition:transform .2s}.hb-lib-search-tag[data-v-2307d348]{margin-right:3px;border-radius:4px;border-color:#ff5000;color:#ff5000}.hb-lib-search-tag__description[data-v-2307d348]{margin-left:4px;font-size:12px;opacity:.8}.hb-lib-multipleSelectModal-modal .ant-table-filter-trigger{font-size:18px!important}.hb-lib-multipleSelectModal-modal .ant-input-group-addon{border:none!important;cursor:pointer}.hb-lib-multipleSelectModal-modal .ant-modal-body{padding:calc(var(--hb-space) / 2)}.hb-lib-multipleSelectModal-modal .ant-table-thead .ant-table-column-title{color:#000;font-weight:bolder;font-size:18px}.hb-lib-multipleSelectModal-modal .ant-table-thead .ant-table-cell{color:#000;font-weight:bolder;font-size:18px;padding:calc(var(--hb-space) / 2)!important}.hb-lib-multipleSelectModal-modal .ant-table-row .ant-table-cell{padding:calc(var(--hb-space) / 2)!important}.hb-lib-multipleSelectModal-modal .ant-table-pagination.ant-pagination{margin:calc(var(--hb-space) / 2) 0!important}.hb-lib-form-item-filter-modal-search{padding:8px}.hb-lib-form-item-filter-modal-search-input{width:188px;margin-bottom:8px;display:block}.hb-lib-form-item-filter-modal-buttons{display:flex;justify-content:space-between;margin-top:10px}.hb-lib-table-act-box[data-v-773f4443]{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px}.hb-lib-table-act-box .hb-lib-table-main-action[data-v-773f4443],.hb-lib-table-act-box .hb-lib-table-more-action[data-v-773f4443]{text-decoration:none}.hb-lib-table-act-box .hb-lib-table-more-action[data-v-773f4443]{display:inline-flex;align-items:center}.hb-lib-table-confirm-modal-content[data-v-773f4443]{font-size:16px}.hb-lib-table-act-box .ant-divider-vertical{margin:0}.ant-dropdown-menu-title-content>a:hover{color:var(--hb-theme-color)!important}.hb-lib-list-table[data-v-f27e967a]{background:white;padding:0 5px;border-radius:0 0 6px 6px}.hb-lib-list-table[data-v-f27e967a] .copy-text-eyevue.ab{position:relative!important;right:0!important;top:0!important}.hb-lib-list-table-act[data-v-f27e967a]{display:flex;justify-content:space-between;align-items:center}.nowrap-table[data-v-f27e967a] .ant-table-tbody>.ant-table-row>td{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;height:var(--hb-lib-table-td-height)!important;box-sizing:content-box}[data-v-5220f215]:root{--hb-theme-color: #ff5000;--hb-title-color: #333;--hb-space: 10px;--hb-h1-font-size: 20px;--hb-h2-font-size: 16px;--hb-text-font-size: 14px;--hb-subtext-font-size: 13px;--hb-subtext-color: #cccc;--hb-f-item-height: 34px;--hb-f-item-content-height: 30px;--hb-tip-font-size: 13px;--hb-border-radius: 6px;--hb-border-color: #d1d5db;--hb-list-button-height: 26px}.ant-alert[data-v-5220f215]{box-sizing:border-box;margin:0;color:#000000a6;font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;font-feature-settings:"tnum";position:relative;padding:8px 15px 8px 37px;word-wrap:break-word;border-radius:var(--hb-border-radius);border:1px solid #ffb27a;background-color:#fff2e6}.ant-alert .com-alert[data-v-5220f215]{display:flex;justify-content:space-between;width:100%;align-items:center}.ant-alert .com-alert a[data-v-5220f215]{color:#ff5000}.select-all-container[data-v-5220f215]{padding:8px 0}.hb-lib-table-setting-box[data-v-5220f215]{display:flex}.hb-lib-table-set-drag[data-v-5220f215]{max-height:300px;overflow-y:auto}.hb-lib-table-drag-item[data-v-5220f215]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border:1px solid #f0f0f0;margin-bottom:4px;background-color:#fff;border-radius:var(--hb-border-radius);width:280px}.hb-lib-table-drag-item[data-v-5220f215]:hover{background-color:#f5f5f5}.hb-lib-table-drag-item .drag-handle[data-v-5220f215]{cursor:move;color:#999;padding:4px;user-select:none}.ghost[data-v-5220f215]{opacity:.5;background:#c8ebfb}.table-setting-checkbox-group[data-v-5220f215]{display:flex;flex-wrap:wrap}.table-setting-checkbox-group[data-v-5220f215] .ant-checkbox-group-item{margin-right:0;width:33.33%}.hb-lib-table-set-btn-group[data-v-5220f215]{margin-top:10px;display:flex;justify-content:end;align-items:center;border-top:1px solid #f0f0f0;padding-top:8px}.drag-hide[data-v-5220f215]{visibility:hidden}.hb-lib-table-drag-item-act-btn[data-v-5220f215]{display:inline-block;cursor:pointer;width:14px;height:20px}.hb-lib-table-drag-item-act-btn .icon[data-v-5220f215]{width:100%;height:100%}.hb-lib-table-col-set[data-v-5220f215]{display:inline-block;cursor:pointer;width:22px;height:23px}.hb-lib-table-col-set .icon[data-v-5220f215]{width:100%;height:100%}.hb-lib-table-drag-item-act[data-v-5220f215]{display:flex;align-items:center;width:40px;justify-content:space-between}.alertInfoContent{width:auto!important}.hb-lib-copy-text-eyevue[data-v-69b8d557]{font-size:17px;cursor:pointer}.hb-lib-copy-text-eyevue.ab[data-v-69b8d557]{position:absolute;right:34px;top:50%;transform:translateY(-50%);background:white}.hb-lib-copy-text-eyevue.normal[data-v-69b8d557]{position:relative}.drag-slot-wrapper[data-v-027fef58]{cursor:move;padding:8px;background-color:#f9f9f9;border:1px solid #eee;margin-bottom:10px}:root{--hb-theme-color: #ff5000;--hb-title-color: #333;--hb-space: 10px;--hb-h1-font-size: 20px;--hb-h2-font-size: 16px;--hb-text-font-size: 14px;--hb-subtext-font-size: 13px;--hb-subtext-color: #cccc;--hb-f-item-height: 34px;--hb-f-item-content-height: 30px;--hb-tip-font-size: 13px;--hb-border-radius: 6px;--hb-border-color: #d1d5db;--hb-list-button-height: 26px}.hb-lib-list-page-container{background:white}.hb-lib-list-page-container .newButton{height:var(--hb-small-button-height)!important;padding:0 var(--hb-space)!important}.hb-lib-list-page-container .newButton .buttonText{line-height:var(--hb-small-button-height)!important}.hb-lib-list-page-container .ant-table-pagination.ant-pagination{margin:calc(var(--hb-space) / 2) 0}.list-page-box{padding:var(--hb-space)}.list-page-box .ant-table-row .ant-table-cell,.list-page-box .ant-table-thead .ant-table-cell{padding:calc(var(--hb-space) / 2)!important}.list-page-box .ant-tabs-top>.ant-tabs-nav{margin-bottom:calc(var(--hb-space) / 2)!important}.list-page-box .ant-tabs-nav .ant-tabs-nav-list .ant-tabs-tab{padding:calc(var(--hb-space) / 2) 0!important}.list-page-box .ant-table-body::-webkit-scrollbar-thumb{background:#d9d9d9;border-radius:4px}.hb-lib-hb-lib-list-page-act-box{display:flex;justify-content:space-between;box-shadow:0 4px 3px #f0f0f0cf;padding:calc(var(--hb-space) / 2) var(--hb-space)}.hb-lib-list-page-act{display:flex}.hb-lib-list-page-breadcrumb{font-size:var(--hb-text-font-size);color:#3e3e3e;display:flex;align-items:center}.hb-lib-list-page-form-box{display:flex;justify-content:space-between}.hb-form-item-ui{flex:1}.hb-form-item-ui .ant-form-item{border:1px solid #d1d5db!important;border-radius:var(--hb-border-radius)!important;margin-bottom:var(--hb-space)!important;margin-right:var(--hb-space)!important;height:34px;min-width:250px!important}.hb-form-item-ui .ant-input{border:none!important;border-radius:var(--hb-border-radius)!important;padding:4px var(--hb-space) 4px 0px!important}.hb-form-item-ui .ant-input:focus{outline:none!important;box-shadow:none!important}.hb-form-item-ui .ant-form-item-label>label{padding:0 0 0 var(--hb-space)}.hb-form-item-ui .ant-select-selector{border:none!important;border-radius:var(--hb-border-radius)!important;padding:0px var(--hb-space) 0px var(--hb-space)!important;outline:none!important;box-shadow:none!important}.hb-form-item-ui .ant-select-selector:focus{outline:none!important;box-shadow:none!important}.hb-form-item-ui .ant-select:focus{outline:none!important;box-shadow:none!important}.hb-form-item-ui .ant-select-focused{outline:none!important;box-shadow:none!important}.hb-form-item-ui .ant-input-affix-wrapper{height:32px!important;border:none!important;border-radius:var(--hb-border-radius)!important}.hb-form-item-ui .ant-input-affix-wrapper:focus{outline:none!important;box-shadow:none!important}.hb-form-item-ui .ant-picker,.hb-form-item-ui .ant-picker-range{border:none!important;border-radius:var(--hb-border-radius)!important}.hb-form-item-ui .ant-picker-focused{box-shadow:none!important}.hb-form-item-ui .ant-input-affix-wrapper:focus,.hb-form-item-ui .ant-input-affix-wrapper-focused{box-shadow:none!important}.hb-form-item-ui .ant-form-item-control-input-content{display:flex}.hb-form-item-ui .ant-select-selection-item{display:flex;align-items:center}.hb-form-item-ui .ant-select-selection-placeholder{padding-left:var(--hb-space)!important}.hb-form-item-ui .ant-select-selection-overflow{flex-wrap:nowrap;overflow:hidden}.hb-form-item-ui .ant-input-group-addon{border:none!important}.hb-lib-detail-box .ant-card{margin-bottom:var(--hb-space)!important}.hb-lib-detail-box .ant-card-head{min-height:var(--hb-card-head)!important}.hb-lib-detail-box .ant-card-head .ant-card-head-title{padding:calc(var(--hb-space) / 2) 0!important}.hb-lib-detail-box .ant-card-body{padding:var(--hb-space)!important}.hb-lib-detail-box .ant-table-row .ant-table-cell,.hb-lib-detail-box .ant-table-thead .ant-table-cell{padding:calc(var(--hb-space) / 2)!important}.hb-lib-detail-box .ant-table-pagination.ant-pagination{margin:calc(var(--hb-space) / 2) 0!important}.hb-lib-detail-box .ant-descriptions-row,.hb-lib-detail-box .ant-descriptions-item{padding-bottom:calc(var(--hb-space) / 2)!important}
@@ -0,0 +1,7 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module '*.vue' {
4
+ import type { DefineComponent } from 'vue';
5
+ const component: DefineComponent<{}, {}, any>;
6
+ export default component;
7
+ }
@@ -0,0 +1,199 @@
1
+ // src/hooks/useCalTableHeight.ts
2
+ import { ref, onMounted, onUnmounted, nextTick, watch } from 'vue';
3
+
4
+ interface TableHeightOptions {
5
+ formRef?: any; // 表单引用,用于监听表单变化
6
+ offsetBottom?: number; // 底部预留空间,默认为50
7
+ minHeight?: number; // 最小高度,默认为300
8
+ }
9
+
10
+ const useCalTableHeight = (options: TableHeightOptions = {}) => {
11
+ const { formRef, offsetBottom = 50, minHeight = 300 } = options;
12
+
13
+ const tableHeight = ref(0);
14
+ let formBoxObserver: ResizeObserver | null = null;
15
+ let paginationObserver: MutationObserver | null = null;
16
+ let formContentObserver: MutationObserver | null = null;
17
+
18
+ // 防抖处理窗口大小变化
19
+ let resizeTimer: any = null;
20
+ let calHeightTimer: any = null;
21
+
22
+ // 计算表格高度的主要函数
23
+ const calTableHeight = () => {
24
+ // 清除之前的定时器
25
+ if (calHeightTimer) {
26
+ clearTimeout(calHeightTimer);
27
+ }
28
+
29
+ // 使用防抖确保不会频繁计算
30
+ calHeightTimer = setTimeout(() => {
31
+ requestAnimationFrame(() => {
32
+ nextTick(() => {
33
+ const tableElement = document.querySelector('.ant-table') as HTMLElement;
34
+ const paginationElement = document.querySelector('.ant-pagination') as HTMLElement;
35
+
36
+ if (tableElement) {
37
+ const tableOffsetTop = tableElement.getBoundingClientRect().top;
38
+ const windowHeight = window.innerHeight;
39
+
40
+ // 计算分页器高度,如果不存在则为0
41
+ const paginationHeight = paginationElement
42
+ ? paginationElement.offsetHeight + 20 // 20是分页器上下间距
43
+ : 40; // 默认分页器高度+间距
44
+
45
+ // 为底部留出更多空间,确保分页器可见
46
+ const reservedSpace = paginationHeight + offsetBottom;
47
+
48
+ let calculatedHeight = windowHeight - tableOffsetTop - reservedSpace;
49
+
50
+ // 确保表格高度不会过小
51
+ if (calculatedHeight < minHeight) {
52
+ calculatedHeight = minHeight;
53
+ }
54
+
55
+ tableHeight.value = calculatedHeight;
56
+ }
57
+ });
58
+ });
59
+ }, 100);
60
+ };
61
+
62
+ // 监听分页器变化
63
+ const observePagination = () => {
64
+ const paginationWrapper = document.querySelector('.ant-pagination');
65
+ if (paginationWrapper) {
66
+ const observer = new MutationObserver(() => {
67
+ calTableHeight();
68
+ });
69
+
70
+ observer.observe(paginationWrapper, {
71
+ childList: true,
72
+ subtree: true,
73
+ attributes: true,
74
+ attributeFilter: ['style', 'class'],
75
+ });
76
+
77
+ return observer;
78
+ }
79
+ return null;
80
+ };
81
+
82
+ // 监听 page-form-box 尺寸变化
83
+ const observeFormBox = () => {
84
+ const formBox = document.querySelector('.hb-lib-list-page-form-box');
85
+ if (formBox) {
86
+ // 使用 ResizeObserver 监听元素尺寸变化
87
+ formBoxObserver = new ResizeObserver(() => {
88
+ const tooltips = document.querySelectorAll('.ant-tooltip');
89
+ tooltips.forEach((tooltip) => {
90
+ tooltip.style.display = 'none';
91
+ });
92
+ calTableHeight();
93
+ });
94
+ // 通过ResizeObserver可以指定监听某个盒子的尺寸变化
95
+ formBoxObserver.observe(formBox);
96
+ }
97
+ };
98
+
99
+ // 监听表单内容变化
100
+ const observeFormContent = () => {
101
+ const formBox = document.querySelector('.hb-lib-list-page-form-box');
102
+ if (formBox) {
103
+ formContentObserver = new MutationObserver(() => {
104
+ // 延迟执行以确保 DOM 更新完成
105
+ setTimeout(() => {
106
+ calTableHeight();
107
+ }, 100);
108
+ });
109
+
110
+ formContentObserver.observe(formBox, {
111
+ childList: true,
112
+ subtree: true,
113
+ attributes: true,
114
+ attributeFilter: ['style', 'class'],
115
+ });
116
+ }
117
+ };
118
+
119
+ const handleResize = () => {
120
+ if (resizeTimer) {
121
+ clearTimeout(resizeTimer);
122
+ }
123
+ resizeTimer = setTimeout(() => {
124
+ calTableHeight();
125
+ }, 100);
126
+ };
127
+
128
+ // 初始化监听
129
+ const initObserver = () => {
130
+ // 监听窗口大小变化
131
+ window.addEventListener('resize', handleResize);
132
+
133
+ // 监听 page-form-box 尺寸变化
134
+ nextTick(() => {
135
+ observeFormBox();
136
+ observeFormContent();
137
+
138
+ // 观察分页器变化
139
+ paginationObserver = observePagination();
140
+ });
141
+ };
142
+
143
+ // 清理事件监听
144
+ const cleanup = () => {
145
+ window.removeEventListener('resize', handleResize);
146
+
147
+ if (formBoxObserver) {
148
+ formBoxObserver.disconnect();
149
+ }
150
+
151
+ if (formContentObserver) {
152
+ formContentObserver.disconnect();
153
+ }
154
+
155
+ if (paginationObserver) {
156
+ paginationObserver.disconnect();
157
+ }
158
+
159
+ if (resizeTimer) {
160
+ clearTimeout(resizeTimer);
161
+ }
162
+
163
+ if (calHeightTimer) {
164
+ clearTimeout(calHeightTimer);
165
+ }
166
+ };
167
+
168
+ // 如果提供了formRef,则监听其变化
169
+ if (formRef) {
170
+ watch(
171
+ () => formRef,
172
+ () => {
173
+ // 表单数据变化时延迟计算高度
174
+ setTimeout(() => {
175
+ calTableHeight();
176
+ }, 200);
177
+ },
178
+ { deep: true }
179
+ );
180
+ }
181
+
182
+ // 组件挂载时初始化
183
+ onMounted(() => {
184
+ calTableHeight();
185
+ initObserver();
186
+ });
187
+
188
+ // 组件卸载时清理
189
+ onUnmounted(() => {
190
+ cleanup();
191
+ });
192
+
193
+ return {
194
+ tableHeight,
195
+ calTableHeight,
196
+ };
197
+ };
198
+
199
+ export default useCalTableHeight;
@@ -0,0 +1,18 @@
1
+ import { computed, type ComputedRef } from 'vue';
2
+
3
+ const useCalTableWidth = (columns: ComputedRef<any[]> | any[]) => {
4
+ const tableWidth = computed(() => {
5
+ const cols = Array.isArray(columns) ? columns : columns.value;
6
+ if (!cols || cols.length === 0) return 0;
7
+ return cols
8
+ .map((item: any) => {
9
+ if (!item.width) return 0;
10
+ return Number(item.width.toString().replace('px', '')) || 0;
11
+ })
12
+ .reduce((a: number, b: number) => a + b, 0);
13
+ });
14
+
15
+ return { tableWidth };
16
+ };
17
+
18
+ export default useCalTableWidth;
@@ -0,0 +1,38 @@
1
+ export interface LocalShowList_intf {
2
+ label?: string;
3
+ key: string;
4
+ isFixed?: boolean;
5
+ isActive?: boolean;
6
+ isLinked?: boolean;
7
+ // 用于多语言 设置 对应locales对象
8
+ labelLanguage?: string;
9
+ [key: string]: any;
10
+ }
11
+ import { ref } from 'vue';
12
+
13
+ // 用于处理搜索条件
14
+ const useListFormItem = (props: LocalShowList_intf[]) => {
15
+ const formItems = ref<LocalShowList_intf[]>();
16
+ formItems.value = props.slice();
17
+
18
+ const DeepCloneFromItem = JSON.parse(JSON.stringify(formItems.value));
19
+ // queryParam是搜索方案点击后存储的搜索条件
20
+ const handleSearchCase = (queryParam: any) => {
21
+ let showFormItems: any = [];
22
+ let queryParamKeys = Object.keys(queryParam);
23
+ DeepCloneFromItem.forEach((item: LocalShowList_intf) => {
24
+ if (queryParamKeys.includes(item.key)) {
25
+ showFormItems.push(item);
26
+ }
27
+ });
28
+ formItems.value = showFormItems;
29
+ };
30
+
31
+ return {
32
+ formItems,
33
+ DeepCloneFromItem,
34
+ handleSearchCase,
35
+ };
36
+ };
37
+
38
+ export default useListFormItem;
@@ -0,0 +1,73 @@
1
+ import { nextTick } from 'vue';
2
+
3
+ const useModalDrag = (container: string) => {
4
+ let canMove = true;
5
+ const start = () => {
6
+ nextTick(() => {
7
+ const modalWrap: any = document.querySelector(`.${container} .ant-modal`);
8
+
9
+ if (modalWrap) {
10
+ let isDragging = false;
11
+ let offset = { x: 0, y: 0 };
12
+ const modalHeader: any = modalWrap.querySelector('.ant-modal-header');
13
+ const modalFooter: any = modalWrap.querySelector('.ant-modal-footer');
14
+ if (modalHeader) {
15
+ modalHeader.style.cursor = 'move';
16
+ modalFooter.style.cursor = 'move';
17
+
18
+ modalHeader.addEventListener('mousedown', (e) => {
19
+ isDragging = true;
20
+ offset.x = e.clientX - modalWrap.offsetLeft;
21
+ offset.y = e.clientY - modalWrap.offsetTop;
22
+ document.body.style.userSelect = 'none';
23
+ });
24
+ modalFooter.addEventListener('mousedown', (e) => {
25
+ isDragging = true;
26
+ offset.x = e.clientX - modalWrap.offsetLeft;
27
+ offset.y = e.clientY - modalWrap.offsetTop;
28
+ document.body.style.userSelect = 'none';
29
+ });
30
+
31
+ document.addEventListener('mousemove', (e) => {
32
+ if (!isDragging || !canMove) return;
33
+ const left = e.clientX - offset.x;
34
+ const top = e.clientY - offset.y;
35
+ modalWrap.style.left = `${left}px`;
36
+ modalWrap.style.top = `${top}px`;
37
+ });
38
+
39
+ document.addEventListener('mouseup', () => {
40
+ isDragging = false;
41
+ document.body.style.userSelect = '';
42
+ });
43
+ }
44
+ }
45
+ });
46
+ };
47
+
48
+ const stop = () => {
49
+ canMove = false;
50
+ };
51
+
52
+ // 新增:重置模态框位置为居中
53
+ const resetPosition = () => {
54
+ nextTick(() => {
55
+ const modalWrap: any = document.querySelector(`.${container} .ant-modal`);
56
+ if (modalWrap) {
57
+ const windowWidth = window.innerWidth;
58
+ const windowHeight = window.innerHeight;
59
+ const modalWidth = modalWrap.offsetWidth;
60
+ const modalHeight = modalWrap.offsetHeight;
61
+
62
+ const left = (windowWidth - modalWidth) / 2;
63
+ const top = (windowHeight - modalHeight) / 2;
64
+
65
+ modalWrap.style.left = `${left}px`;
66
+ modalWrap.style.top = `${top}px`;
67
+ }
68
+ });
69
+ };
70
+ return { start, stop, resetPosition };
71
+ };
72
+
73
+ export default useModalDrag;
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@hb-hellotech/hb-ui",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "main": "./dist/componentLib.umd.cjs",
6
+ "module": "./dist/componentLib.js",
7
+ "types": "./dist/src/index.d.ts",
8
+ "author": "hello-tech",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/componentLib.js",
12
+ "require": "./dist/componentLib.umd.cjs"
13
+ },
14
+ "./dist/style.css": {
15
+ "import": "./dist/style.css",
16
+ "require": "./dist/style.css"
17
+ }
18
+ },
19
+ "files": [
20
+ "package.json",
21
+ "README.md",
22
+ "LICENSE",
23
+ "dist",
24
+ "hooks"
25
+ ],
26
+ "scripts": {
27
+ "dev": "vite",
28
+ "pub": "npm publish --tag latest --access public",
29
+ "build": "vite build"
30
+ },
31
+ "dependencies": {
32
+ "@ant-design/icons-vue": "^6.1.0",
33
+ "@rollup/plugin-alias": "^4.0.2",
34
+ "@types/node": "^18.11.7",
35
+ "@types/throttle-debounce": "^5.0.0",
36
+ "@vueuse/core": "^10.9.0",
37
+ "ant-design-vue": "^3.2.15",
38
+ "child_process": "^1.0.2",
39
+ "dayjs": "^1.11.18",
40
+ "less": "^4.1.3",
41
+ "lodash": "^4.17.21",
42
+ "path": "^0.12.7",
43
+ "rollup-plugin-external-globals": "^0.8.0",
44
+ "sass": "^1.55.0",
45
+ "throttle-debounce": "^5.0.0",
46
+ "vite-plugin-dts": "^1.6.6",
47
+ "vite-plugin-libcss": "^1.0.5",
48
+ "vue": "^3.5.22",
49
+ "vue-i18n": "^9.2.2",
50
+ "vue-router": "^4.1.6",
51
+ "vuedraggable": "4.1.0"
52
+ },
53
+ "devDependencies": {
54
+ "@vitejs/plugin-vue": "^3.2.0",
55
+ "typescript": "^4.6.4",
56
+ "vite": "^3.2.0",
57
+ "vue-tsc": "^1.0.9"
58
+ }
59
+ }