hbte-saas-ui 0.0.1

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 (137) hide show
  1. package/.browserslistrc +3 -0
  2. package/.editorconfig +7 -0
  3. package/.env.development +1 -0
  4. package/.env.lib +1 -0
  5. package/.eslintrc.js +14 -0
  6. package/.prettierrc +3 -0
  7. package/README.md +53 -0
  8. package/babel.config.js +3 -0
  9. package/docs/.vuepress/config.js +23 -0
  10. package/docs/.vuepress/styles/index.styl +4 -0
  11. package/docs/AdvQuery.md +26 -0
  12. package/docs/CustomQuery.md +21 -0
  13. package/docs/EditArea.md +16 -0
  14. package/docs/FilterDrop.md +29 -0
  15. package/docs/FullTable.md +68 -0
  16. package/docs/Pagination.md +22 -0
  17. package/docs/QueryForm.md +27 -0
  18. package/docs/README.md +17 -0
  19. package/docs/Table.md +58 -0
  20. package/docs/ToolGroup.md +32 -0
  21. package/examples/App.vue +97 -0
  22. package/examples/image/hb-image-viewer/3k.jpg +0 -0
  23. package/examples/image/hb-image-viewer/a.jpg +0 -0
  24. package/examples/image/hb-image-viewer/b.jpg +0 -0
  25. package/examples/main.js +39 -0
  26. package/examples/mock/authority.js +1108 -0
  27. package/examples/mock/dept.js +4001 -0
  28. package/examples/mock/fulltable.js +407 -0
  29. package/examples/mock/organizeData.js +18965 -0
  30. package/examples/router/index.js +111 -0
  31. package/examples/views/ElementCpTest.vue +299 -0
  32. package/examples/views/Fragment.vue +196 -0
  33. package/examples/views/HBAdvQuery.vue +150 -0
  34. package/examples/views/HBAuthority.vue +339 -0
  35. package/examples/views/HBDialog.vue +39 -0
  36. package/examples/views/HBEditarea.vue +350 -0
  37. package/examples/views/HBFilterDrop.vue +72 -0
  38. package/examples/views/HBFloatFooter.vue +42 -0
  39. package/examples/views/HBFullTable.vue +751 -0
  40. package/examples/views/HBImageViewer.vue +57 -0
  41. package/examples/views/HBNavMenu.vue +37 -0
  42. package/examples/views/HBOrganizeDialog.vue +133 -0
  43. package/examples/views/HBPagination.vue +80 -0
  44. package/examples/views/HBSelectVague.vue +57 -0
  45. package/examples/views/HBToolgroup.vue +29 -0
  46. package/examples/views/HBTopBar.vue +16 -0
  47. package/lib/demo.html +10 -0
  48. package/lib/fonts/iconfont.9e99af35.ttf +0 -0
  49. package/lib/hbte-ui.common.js +38291 -0
  50. package/lib/hbte-ui.css +1 -0
  51. package/lib/hbte-ui.umd.js +38301 -0
  52. package/lib/hbte-ui.umd.min.js +21 -0
  53. package/lib/img/nodata.f87d17c1.png +0 -0
  54. package/lib/img/user-logo--default.a53bd193.png +0 -0
  55. package/package.json +40 -0
  56. package/packages/adv-query/index.js +5 -0
  57. package/packages/adv-query/src/main.vue +294 -0
  58. package/packages/area-select/index.js +7 -0
  59. package/packages/area-select/src/main.vue +37 -0
  60. package/packages/authority/index.js +5 -0
  61. package/packages/authority/src/main.vue +606 -0
  62. package/packages/config.js +3 -0
  63. package/packages/custom-query/index.js +5 -0
  64. package/packages/custom-query/src/main.vue +80 -0
  65. package/packages/dialog/index.js +7 -0
  66. package/packages/dialog/src/main.vue +176 -0
  67. package/packages/edit-area/index.js +13 -0
  68. package/packages/edit-area/src/config.js +3 -0
  69. package/packages/edit-area/src/main.vue +304 -0
  70. package/packages/edit-area/src/simulateEvent.js +219 -0
  71. package/packages/filter-drop/index.js +6 -0
  72. package/packages/filter-drop/src/main.vue +107 -0
  73. package/packages/float-footer/index.js +7 -0
  74. package/packages/float-footer/src/main.vue +40 -0
  75. package/packages/fragment/index.js +7 -0
  76. package/packages/fragment/src/main.vue +74 -0
  77. package/packages/fragment/src/old.vue +144 -0
  78. package/packages/full-table/index.js +6 -0
  79. package/packages/full-table/src/config.js +14 -0
  80. package/packages/full-table/src/main.vue +141 -0
  81. package/packages/image-viewer/index.js +8 -0
  82. package/packages/image-viewer/src/main.js +14 -0
  83. package/packages/image-viewer/src/main.vue +138 -0
  84. package/packages/image-viewer/src/svg/cancel.svg +2 -0
  85. package/packages/image-viewer/src/svg/delete.svg +2 -0
  86. package/packages/image-viewer/src/svg/download.svg +2 -0
  87. package/packages/image-viewer/src/svg/rotate.svg +77 -0
  88. package/packages/image-viewer/src/svg/scaledown.svg +71 -0
  89. package/packages/image-viewer/src/svg/scaleup.svg +72 -0
  90. package/packages/index.js +43 -0
  91. package/packages/nav-menu/index.js +7 -0
  92. package/packages/nav-menu/src/main.vue +277 -0
  93. package/packages/organize-dialog/index.js +5 -0
  94. package/packages/organize-dialog/src/main.vue +427 -0
  95. package/packages/pagination/index.js +6 -0
  96. package/packages/pagination/src/main.vue +145 -0
  97. package/packages/query-form/index.js +5 -0
  98. package/packages/query-form/src/main.vue +142 -0
  99. package/packages/select-vague/index.js +5 -0
  100. package/packages/select-vague/src/main.vue +80 -0
  101. package/packages/table/index.js +5 -0
  102. package/packages/table/src/main.vue +265 -0
  103. package/packages/theme-chalk/adv-query.scss +107 -0
  104. package/packages/theme-chalk/authority.scss +103 -0
  105. package/packages/theme-chalk/common/elementCover.scss +722 -0
  106. package/packages/theme-chalk/common/flex.scss +66 -0
  107. package/packages/theme-chalk/common/global.scss +147 -0
  108. package/packages/theme-chalk/common/reset.scss +92 -0
  109. package/packages/theme-chalk/common/var.scss +46 -0
  110. package/packages/theme-chalk/custom-query.scss +10 -0
  111. package/packages/theme-chalk/dialog.scss +9 -0
  112. package/packages/theme-chalk/edit-area.scss +119 -0
  113. package/packages/theme-chalk/filter-drop.scss +81 -0
  114. package/packages/theme-chalk/float-footer.scss +14 -0
  115. package/packages/theme-chalk/fonts/iconfont.ttf +0 -0
  116. package/packages/theme-chalk/fragment.scss +51 -0
  117. package/packages/theme-chalk/full-table.scss +40 -0
  118. package/packages/theme-chalk/icon.scss +96 -0
  119. package/packages/theme-chalk/image-viewer.scss +94 -0
  120. package/packages/theme-chalk/images/company-logo--default.png +0 -0
  121. package/packages/theme-chalk/images/nodata.png +0 -0
  122. package/packages/theme-chalk/images/user-logo--default.png +0 -0
  123. package/packages/theme-chalk/index.scss +21 -0
  124. package/packages/theme-chalk/nav-menu.scss +205 -0
  125. package/packages/theme-chalk/organize-dialog.scss +170 -0
  126. package/packages/theme-chalk/pagination.scss +91 -0
  127. package/packages/theme-chalk/select.scss +8 -0
  128. package/packages/theme-chalk/table.scss +102 -0
  129. package/packages/theme-chalk/tool-group.scss +105 -0
  130. package/packages/theme-chalk/top-bar.scss +195 -0
  131. package/packages/tool-group/index.js +13 -0
  132. package/packages/tool-group/src/config.js +40 -0
  133. package/packages/tool-group/src/main.vue +93 -0
  134. package/packages/top-bar/index.js +7 -0
  135. package/packages/top-bar/src/main.vue +280 -0
  136. package/public/index.html +20 -0
  137. package/vue.config.js +6 -0
@@ -0,0 +1,407 @@
1
+ /**
2
+ * 将接口模拟为函数,模拟接口对参数的处理
3
+ */
4
+ const baseData = {
5
+ tableData: [
6
+ {
7
+ name: "用户a",
8
+ id: "1",
9
+ code: "123,456",
10
+ company: "未知公司1",
11
+ addr: "地址1",
12
+ addrId: "a",
13
+ date: "2022-01-01",
14
+ remark: "未知说明",
15
+ open: false,
16
+ size: "small",
17
+ color: "红,绿",
18
+ edit1: "文本1",
19
+ edit2: ["2"],
20
+ edit2Label: ["值2"],
21
+ edit3: "",
22
+ daterange: "2020-01-02,2020-03-05",
23
+ },
24
+ {
25
+ name: "用户b",
26
+ id: "2",
27
+ code: "123,456",
28
+ company: "未知公司2",
29
+ addr: "地址1",
30
+ addrId: "a",
31
+ date: "2022-01-01",
32
+ remark: "未知说明",
33
+ open: false,
34
+ size: "small",
35
+ color: "红,绿",
36
+ edit1: "文本1",
37
+ edit2: ["2"],
38
+ edit2Label: ["值2"],
39
+ edit3: "",
40
+ daterange: "2020-01-02,2020-03-05",
41
+ },
42
+ {
43
+ name: "用户c",
44
+ id: "3",
45
+ code: "123,456",
46
+ company: "未知公司3",
47
+ addr: "地址1",
48
+ addrId: "a",
49
+ date: "2022-01-01",
50
+ remark: "未知说明",
51
+ open: false,
52
+ size: "small",
53
+ color: "红,绿",
54
+ edit1: "文本1",
55
+ edit2: ["2"],
56
+ edit2Label: ["值2"],
57
+ edit3: "",
58
+ daterange: "2020-01-02,2020-03-05",
59
+ },
60
+ {
61
+ name: "用户d",
62
+ id: "4",
63
+ code: "123,456",
64
+ company: "未知公司4",
65
+ addr: "地址1",
66
+ addrId: "a",
67
+ date: "2022-01-01",
68
+ remark: "未知说明",
69
+ open: false,
70
+ size: "small",
71
+ color: "红,绿",
72
+ edit1: "文本1",
73
+ edit2: ["2"],
74
+ edit2Label: ["值2"],
75
+ edit3: "",
76
+ daterange: "2020-01-02,2020-03-05",
77
+ },
78
+ {
79
+ name: "用户e",
80
+ id: "5",
81
+ code: "123,456",
82
+ company: "未知公司5",
83
+ addr: "地址1",
84
+ addrId: "a",
85
+ date: "2022-01-01",
86
+ remark: "未知说明",
87
+ open: false,
88
+ size: "small",
89
+ color: "红,绿",
90
+ edit1: "文本1",
91
+ edit2: ["2"],
92
+ edit2Label: ["值2"],
93
+ edit3: "",
94
+ daterange: "2020-01-02,2020-03-05",
95
+ },
96
+ {
97
+ name: "用户f",
98
+ id: "6",
99
+ code: "123,456",
100
+ company: "未知公司6",
101
+ addr: "地址1",
102
+ addrId: "a",
103
+ date: "2022-01-01",
104
+ remark: "未知说明",
105
+ open: false,
106
+ size: "small",
107
+ color: "红,绿",
108
+ edit1: "文本1",
109
+ edit2: ["2"],
110
+ edit2Label: ["值2"],
111
+ edit3: "",
112
+ daterange: "2020-01-02,2020-03-05",
113
+ },
114
+ {
115
+ name: "用户g",
116
+ id: "7",
117
+ code: "123,456",
118
+ company: "未知公司7",
119
+ addr: "地址1",
120
+ addrId: "a",
121
+ date: "2022-01-01",
122
+ remark: "未知说明",
123
+ open: false,
124
+ size: "small",
125
+ color: "红,绿",
126
+ edit1: "文本1",
127
+ edit2: ["2"],
128
+ edit2Label: ["值2"],
129
+ edit3: "",
130
+ daterange: "2020-01-02,2020-03-05",
131
+ },
132
+ {
133
+ name: "用户名",
134
+ id: "8",
135
+ code: "123,456",
136
+ company: "未知公司8",
137
+ addr: "地址1",
138
+ addrId: "a",
139
+ date: "2022-01-01",
140
+ remark: "未知说明",
141
+ open: false,
142
+ size: "small",
143
+ color: "红,绿",
144
+ edit1: "文本1",
145
+ edit2: ["2"],
146
+ edit2Label: ["值2"],
147
+ edit3: "",
148
+ daterange: "2020-01-02,2020-03-05",
149
+ },
150
+ {
151
+ name: "用户名",
152
+ id: "9",
153
+ code: "123,456",
154
+ company: "未知公司9",
155
+ addr: "地址1",
156
+ addrId: "a",
157
+ date: "2022-01-01",
158
+ remark: "未知说明",
159
+ open: false,
160
+ size: "small",
161
+ color: "红,绿",
162
+ edit1: "文本1",
163
+ edit2: ["2"],
164
+ edit2Label: ["值2"],
165
+ edit3: "",
166
+ daterange: "2020-01-02,2020-03-05",
167
+ },
168
+ {
169
+ name: "用户名",
170
+ id: "10",
171
+ code: "123,456",
172
+ company: "未知公司10",
173
+ addr: "地址1",
174
+ addrId: "a",
175
+ date: "2022-01-01",
176
+ remark: "未知说明",
177
+ open: false,
178
+ size: "small",
179
+ color: "红,绿",
180
+ edit1: "文本1",
181
+ edit2: ["2"],
182
+ edit2Label: ["值2"],
183
+ edit3: "",
184
+ daterange: "2020-01-02,2020-03-05",
185
+ },
186
+ {
187
+ name: "用户名",
188
+ id: "11",
189
+ code: "123,456",
190
+ company: "未知公司11",
191
+ addr: "地址1",
192
+ addrId: "a",
193
+ date: "2022-01-01",
194
+ remark: "未知说明",
195
+ open: false,
196
+ size: "small",
197
+ color: "红,绿",
198
+ edit1: "文本1",
199
+ edit2: ["2"],
200
+ edit2Label: ["值2"],
201
+ edit3: "",
202
+ daterange: "2020-01-02,2020-03-05",
203
+ },
204
+ {
205
+ name: "用户名",
206
+ id: "12",
207
+ code: "123,456",
208
+ company: "未知公司12",
209
+ addr: "地址1",
210
+ addrId: "a",
211
+ date: "2022-01-01",
212
+ remark: "未知说明",
213
+ open: false,
214
+ size: "small",
215
+ color: "红,绿",
216
+ edit1: "文本1",
217
+ edit2: ["2"],
218
+ edit2Label: ["值2"],
219
+ edit3: "",
220
+ daterange: "2020-01-02,2020-03-05",
221
+ },
222
+ {
223
+ name: "用户名",
224
+ id: "13",
225
+ code: "123,456",
226
+ company: "未知公司13",
227
+ addr: "地址1",
228
+ addrId: "a",
229
+ date: "2022-01-01",
230
+ remark: "未知说明",
231
+ open: false,
232
+ size: "small",
233
+ color: "红,绿",
234
+ edit1: "文本1",
235
+ edit2: ["2"],
236
+ edit2Label: ["值2"],
237
+ edit3: "",
238
+ daterange: "2020-01-02,2020-03-05",
239
+ },
240
+ {
241
+ name: "用户名",
242
+ id: "14",
243
+ code: "123,456",
244
+ company: "未知公司14",
245
+ addr: "地址1",
246
+ addrId: "a",
247
+ date: "2022-01-01",
248
+ remark: "未知说明",
249
+ open: false,
250
+ size: "small",
251
+ color: "红,绿",
252
+ edit1: "文本1",
253
+ edit2: ["2"],
254
+ edit2Label: ["值2"],
255
+ edit3: "",
256
+ daterange: "2020-01-02,2020-03-05",
257
+ },
258
+ {
259
+ name: "用户名",
260
+ id: "15",
261
+ code: "123,456",
262
+ company: "未知公司15",
263
+ addr: "地址1",
264
+ addrId: "a",
265
+ date: "2022-01-01",
266
+ remark: "未知说明",
267
+ open: false,
268
+ size: "small",
269
+ color: "红,绿",
270
+ edit1: "文本1",
271
+ edit2: ["2"],
272
+ edit2Label: ["值2"],
273
+ edit3: "",
274
+ daterange: "2020-01-02,2020-03-05",
275
+ },
276
+ {
277
+ name: "用户名",
278
+ id: "16",
279
+ code: "123,456",
280
+ company: "未知公司16",
281
+ addr: "地址1",
282
+ addrId: "a",
283
+ date: "2022-01-01",
284
+ remark: "未知说明",
285
+ open: false,
286
+ size: "small",
287
+ color: "红,绿",
288
+ edit1: "文本1",
289
+ edit2: ["2"],
290
+ edit2Label: ["值2"],
291
+ edit3: "",
292
+ daterange: "2020-01-02,2020-03-05",
293
+ },
294
+ {
295
+ name: "用户名",
296
+ id: "17",
297
+ code: "123,456",
298
+ company: "未知公司17",
299
+ addr: "地址1",
300
+ addrId: "a",
301
+ date: "2022-01-01",
302
+ remark: "未知说明",
303
+ open: false,
304
+ size: "small",
305
+ color: "红,绿",
306
+ edit1: "文本1",
307
+ edit2: ["2"],
308
+ edit2Label: ["值2"],
309
+ edit3: "",
310
+ daterange: "2020-01-02,2020-03-05",
311
+ },
312
+ {
313
+ name: "用户名",
314
+ id: "18",
315
+ code: "123,456",
316
+ company: "未知公司18",
317
+ addr: "地址1",
318
+ addrId: "a",
319
+ date: "2022-01-01",
320
+ remark: "未知说明",
321
+ open: false,
322
+ size: "small",
323
+ color: "红,绿",
324
+ edit1: "文本1",
325
+ edit2: ["2"],
326
+ edit2Label: ["值2"],
327
+ edit3: "",
328
+ daterange: "2020-01-02,2020-03-05",
329
+ },
330
+ {
331
+ name: "用户名",
332
+ id: "19",
333
+ code: "123,456",
334
+ company: "未知公司19",
335
+ addr: "地址1",
336
+ addrId: "a",
337
+ date: "2022-01-01",
338
+ remark: "未知说明",
339
+ open: false,
340
+ size: "small",
341
+ color: "红,绿",
342
+ edit1: "文本1",
343
+ edit2: ["2"],
344
+ edit2Label: ["值2"],
345
+ edit3: "",
346
+ daterange: "2020-01-02,2020-03-05",
347
+ },
348
+ {
349
+ name: "用户名",
350
+ id: "20",
351
+ code: "123,456",
352
+ company: "未知公司20",
353
+ addr: "地址1",
354
+ addrId: "a",
355
+ date: "2022-01-01",
356
+ remark: "未知说明",
357
+ open: false,
358
+ size: "small",
359
+ color: "红,绿",
360
+ edit1: "文本1",
361
+ edit2: ["2"],
362
+ edit2Label: ["值2"],
363
+ edit3: "",
364
+ daterange: "2020-01-02,2020-03-05",
365
+ },
366
+ ],
367
+ tableDataEmpty: [],
368
+ columns: [],
369
+ };
370
+ export default {
371
+ // 请求列表数据
372
+ getTableData: (pageNum, pageSize, kw) => {
373
+ let data = baseData.tableData;
374
+ if (kw) {
375
+ data = data.filter((item) => item.name.indexOf(kw) !== -1);
376
+ }
377
+ const dataSplit = data.slice(pageSize * (pageNum - 1), pageSize * pageNum);
378
+ return {
379
+ list: dataSplit,
380
+ total: data.length,
381
+ };
382
+ },
383
+ // 请求空列表数据
384
+ getTableDataEmpty: () => {
385
+ return {
386
+ list: baseData.tableDataEmpty,
387
+ total: 0,
388
+ };
389
+ },
390
+ // 请求服务器的列信息
391
+ getColumns: () => {
392
+ return baseData.columns;
393
+ },
394
+ // 修改列信息
395
+ setColumns: (columns) => {
396
+ baseData.columns = columns;
397
+ return true;
398
+ },
399
+ // 修改列表数据
400
+ setTableCell: (id, prop, value) => {
401
+ const row = baseData.tableData.find((item) => item.id === id);
402
+ if (row) {
403
+ row[prop] = value;
404
+ }
405
+ return !!row;
406
+ },
407
+ };